Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to deployment #7724

Merged
merged 9 commits into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
84 changes: 84 additions & 0 deletions logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- SPDX-License-Identifier: Apache-2.0 -->
<!-- Copyright Contributors to the ODPi Egeria project. -->

<!-- This logback file will be read every 60 seconds in case the configuration has changed. -->
<!-- Add scanPeriod option to change the refresh time. -->
<configuration scan="true">

<!-- This logback file sets up two logging destinations for the server identified by ${EGERIA_SERVER_1}. -->
<!-- It should be installed for each platform where this server is running. -->
<!-- If more servers are added to the platform then duplicate the appenders and loggers for each server. -->
<property name="LOG_DIR_PLATFORM" value="./data/platform/logs" />
<property name="EGERIA_SERVER_1" value="cocoMDS1" />
<property name="LOG_DIR_SERVER_1" value="./data/servers/${EGERIA_SERVER_1}/logs" />

<!-- This appender defines the destination of developer (debug) logging. -->
<appender name="PLATFORM_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_DIR_PLATFORM}/debug.log</file>
<!-- This filter only allows ERROR level log messages to be stored. -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${LOG_DIR_PLATFORM}/debug.log.%d{yyyy-MM-dd}.%i.gz</fileNamePattern>
<maxFileSize>1000KB</maxFileSize>
<maxHistory>1000</maxHistory>
<totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<!-- This appender defines the destination of Egeria's audit log records. -->
<!-- It requires the SLF4J audit log destination to be set up in the server's configuration. -->
<appender name="AUDIT_LOG_${EGERIA_SERVER_1}" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_DIR_SERVER_1}/audit.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${LOG_DIR_SERVER_1}/audit.log.%d{yyyy-MM-dd}.%i.gz</fileNamePattern>
<maxFileSize>1000KB</maxFileSize>
<maxHistory>1000</maxHistory>
<totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<!-- This appender defines the console (standard out) destination. -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}.%M:%L - %m%n</pattern>
</encoder>
</appender>

<!-- This logger defines the level of entries from Egeria's audit log records. Can be INFO or ERROR -->
<logger name="org.odpi.openmetadata.frameworks.auditlog.${EGERIA_SERVER_1}" level="INFO">
<appender-ref ref="AUDIT_LOG_${EGERIA_SERVER_1}" />
</logger>

<!-- This logger defines the level of entries for logging from the springboot chassis for the OMAG Server Platform. Can be TRACE, DEBUG, INFO, WARN and ERROR -->
<logger name="org.odpi.openmetadata.serverchassis.springboot" level="INFO">
<appender-ref ref="STDOUT" />
</logger>

<!-- This logger defines the level of entries for logging from Tomcat for the OMAG Server Platform. Can be TRACE, DEBUG, INFO, WARN and ERROR -->
<logger name="org.springframework.boot.web.embedded.tomcat" level="INFO">
<appender-ref ref="STDOUT" />
</logger>

<!-- This logger defines the level of entries for debug logging. Can be TRACE, DEBUG, INFO, WARN and ERROR -->
<root level="ERROR">
<appender-ref ref="PLATFORM_LOG" />
</root>

</configuration>


Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ distributions {
//distributionBaseName = "${rootProject.name}-distribution"
contents {
into('server') {
// Just the chassis
// Just the chassis - for backward compatibility
from { project(':open-metadata-implementation:server-chassis:server-chassis-spring').bootJar }
fileMode = 0755
}
Expand Down Expand Up @@ -148,6 +148,48 @@ distributions {
from { project(':open-metadata-resources:open-metadata-samples:governance-services-sample').jar }
fileMode = 0755
}
into('platform') {
// OMAG Server Platform - new name consistent with documentation
from { project(':open-metadata-implementation:server-chassis:server-chassis-spring').bootJar }
rename { String fileName ->
fileName.replace("server-chassis-spring", "omag-server-platform")
}
fileMode = 0755
}
into('platform/lib') {
// All our connectors, plus discovery sample & the sample Coco security connectors
from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:audit-log-connectors:audit-log-console-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:audit-log-connectors:audit-log-event-topic-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:audit-log-connectors:audit-log-file-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:audit-log-connectors:audit-log-slf4j-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:cohort-registry-store-connectors:cohort-registry-file-store-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-archive-connectors:open-metadata-archive-file-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-archive-connectors:open-metadata-archive-directory-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-collection-store-connectors:inmemory-repository-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-collection-store-connectors:graph-repository-connector').fatJar }
from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-collection-store-connectors:omrs-rest-repository-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:avro-file-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:basic-file-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:csv-file-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:data-folder-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:configuration-store-connectors:configuration-encrypted-file-store-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:configuration-store-connectors:configuration-file-store-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:discovery-service-connectors').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:dynamic-archiver-connectors').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:governance-action-connectors').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:files-integration-connectors').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:kafka-integration-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:openapi-integration-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:openlineage-integration-connectors').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:elasticsearch-integration-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:event-bus-connectors:open-metadata-topic-connectors:inmemory-open-metadata-topic-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:event-bus-connectors:open-metadata-topic-connectors:kafka-open-metadata-topic-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:open-lineage-connectors:open-lineage-janus-connector').jar }
from { project(':open-metadata-resources:open-metadata-samples:open-metadata-security-samples').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:spring-rest-client-connector').jar }
from { project(':open-metadata-resources:open-metadata-samples:governance-services-sample').jar }
fileMode = 0755
}
into('utilities') {
from { project(':open-metadata-resources:open-metadata-archives:design-model-archives:glossary-canonical-model').shadowJar }
from { project(':open-metadata-resources:open-metadata-archives:open-metadata-types-utility').shadowJar }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
The Asset Consumer OMAS makes use of standard checked exceptions

* **InvalidParameterException** - one of the parameters is null or invalid.
* **NewInstanceException** - the access service is not able to register a new instance of itself in the platform's instance map.
* **PropertyServerException** - there is a problem retrieving information from the property server.
* **UserNotAuthorizedException** - the requesting user is not authorized to issue this request.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

/**
* The API package defines the Java interfaces supported by the Asset Consumer OMAS.
*
* These Java interfaces wrap the REST API calls to the server and the asynchronous event passing through Asset Consumer OMAS's Out Topic.
*/
package org.odpi.openmetadata.accessservices.assetconsumer.api;
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import org.odpi.openmetadata.accessservices.assetconsumer.properties.InformalTagProperties;

import java.io.Serializable;

import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;

Expand All @@ -21,10 +19,8 @@
@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
public class InformalTagElement implements MetadataElement, Serializable
public class InformalTagElement implements MetadataElement
{
private static final long serialVersionUID = 1L;

private ElementHeader elementHeader = null;
private InformalTagProperties informalTagProperties = null;
private TaggedElement taggedElement = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,19 @@
import org.odpi.openmetadata.accessservices.assetconsumer.properties.MeaningProperties;
import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader;

import java.io.Serializable;
import java.util.Objects;

import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader;

/**
* MeaningElement contains the properties and header for a GlossaryTerm entity retrieved from the metadata repository.
*/
@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
public class MeaningElement implements MetadataElement, Serializable
public class MeaningElement implements MetadataElement
{
private static final long serialVersionUID = 1L;

private ElementHeader elementHeader = null;
private MeaningProperties meaningProperties = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader;
import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub;

import java.io.Serial;
import java.io.Serializable;

import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;

Expand All @@ -22,11 +19,8 @@
@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
public class TaggedElement implements Serializable
public class TaggedElement
{
@Serial
private static final long serialVersionUID = 1L;

private ElementHeader relationshipHeader = null;
private ElementStub relatedElement = null;
private boolean isPublic = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;

import java.io.Serializable;

import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;

Expand All @@ -19,23 +17,69 @@
@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
public enum AssetConsumerEventType implements Serializable
public enum AssetConsumerEventType
{
/**
* An event that is not recognized by the local server.
*/
UNKNOWN_EVENT (0, "Unknown Event", "An event that is not recognized by the local server."),

/**
* An element has been distributed around the cohort - could be for the first time.
*/
REFRESH_ELEMENT_EVENT (1, "Refresh Element", "An element has been distributed around the cohort - could be for the first time."),

/**
* A new element has been created.
*/
NEW_ELEMENT_CREATED (2, "New Element", "A new element has been created."),

/**
* An element's properties has been updated.
*/
ELEMENT_UPDATED (3, "Element Updated", "An element's properties has been updated."),

/**
* An element and all its anchored elements have been deleted.
*/
ELEMENT_DELETED (4, "Element Deleted", "An element and all its anchored elements have been deleted."),

/**
* A classification has been added to an element.
*/
ELEMENT_CLASSIFIED (5, "Element Classified", "A classification has been added to an element."),

/**
* The properties for a classification attached to an element have been updated.
*/
ELEMENT_RECLASSIFIED (6, "Element Reclassified", "The properties for a classification attached to an element have been updated."),

/**
* A classification has been removed from an element.
*/
ELEMENT_DECLASSIFIED (7, "Element Declassified", "A classification has been removed from an element."),

/**
* An element that was once deleted has been restored.
*/
ELEMENT_RESTORED (8, "Element Restored", "An element that was once deleted has been restored."),

/**
* An element's GUID has changed.
*/
ELEMENT_GUID_CHANGED (9, "Element GUID Changed", "An element's GUID has changed."),

/**
* An element's type has changed.
*/
ELEMENT_TYPE_CHANGED (10, "Element Type Changed", "An element's type has changed."),

/**
* An element's home has changed.
*/
ELEMENT_HOME_CHANGED (11, "Element Home Changed", "An element's home has changed."),
;

private static final long serialVersionUID = 1L;

private final int eventTypeCode;
private final String eventTypeName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import com.fasterxml.jackson.annotation.*;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import java.util.Objects;
Expand All @@ -20,10 +19,8 @@
@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
public class AssetConsumerOutTopicEvent implements Serializable
public class AssetConsumerOutTopicEvent
{
private static final long serialVersionUID = 1L;

private long eventVersionId = 1L;
private AssetConsumerEventType eventType = null;
private Date eventTime = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

/**
* This package defines the event payloads sent on the Asset Consumer OMAS's out topic.
*
* <br><br>
* The event version number indicates which version of the payload is in use. With the version number in
* place it is possible to change the payload over time and enable the consumer to adjust.
* The event type enum defines the type of event.
*
* <br><br>
* Following the header are the common properties for all asset events. This includes the latest version of
* the asset, its origin and the license associated with the Asset's metadata.
*
* Finally are the specialist extensions for each type of event. New asset events include the creation time of the
* <br><br>
* Finally, there are the specialist extensions for each type of event. New asset events include the creation time of the
* asset. Updated asset events include the update time and the original values of the asset (if available).
*/
package org.odpi.openmetadata.accessservices.assetconsumer.events;
Expand Down
Loading