Skip to content

Commit

Permalink
Minimize json/yaml configuration files used, POC testing changes
Browse files Browse the repository at this point in the history
Signed-off-by: Ljupcho Palashevski <lpalashevski@gmail.com>
  • Loading branch information
lpalashevski committed Sep 8, 2023
1 parent a21129e commit a144475
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ public void loadConfig() throws OMAGServerActivationError {
Yaml yaml = new Yaml();
omagServerConfig = yaml.loadAs(serverProperties.getServerConfigFile().getInputStream(), OMAGServerConfig.class);
}
LOG.info("Configuration document for server: {} - loaded successfully", omagServerConfig.getLocalServerName());

} else if (serverProperties.getServer() != null) {
LOG.info("Configuring server using omag. application properties [EXPERIMENTAL]");

LOG.info("Configuration document for server not provided");
LOG.info("[EXPERIMENTAL] Configuring server using omag. application properties");

omagServerConfig = new OMAGServerConfig();
omagServerConfig.setLocalServerName(serverProperties.getServer().getName());
Expand Down Expand Up @@ -89,6 +90,8 @@ public void loadConfig() throws OMAGServerActivationError {
}
}

LOG.info("Configuration document for server: {} - loaded successfully", omagServerConfig.getLocalServerName());

} catch (Exception e) {
LOG.info("Configuration document cannot be loaded from the resource provided - check application configuration");
throw new OMAGServerActivationError(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ management.endpoint.health.show-details=always
management.endpoint.metrics.enabled=true
management.endpoints.web.exposure.include=metrics,health

#omag.server-config-file=classpath:samples/metadata-access-server.json
#omag.server-config-file=classpath:samples/metadata-repository-server.json
omag.server-config-file=classpath:samples/metadata-repository-server.yml
default.omag.server.user=omag-system


Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ omag:
server:
max-page-size: 1000
name: cocoMDS1
user: "${default.omag.server.user}"
user: system
type: OMAG_SERVER
repository-services:
audit-log-connectors:
- provider-class-name: "org.odpi.openmetadata.adapters.repositoryservices.auditlogstore.console.ConsoleAuditLogStoreProvider"
configuration-properties:
supportedSeverities: ["Error"]
supportedSeverities:
- Error
dummySecretProperty: "${app-secrets.dummyPassword}"
local-repository:
metadata-collection-id: "838005fc-e09f-4688-af89-58254a155cc6"
local-connection:
Expand All @@ -19,4 +21,7 @@ omag:
endpoint:
address: "https://localhost:9443/servers/cocoMDS1"
events-to-save: ALL
events-to-send: ALL
events-to-send: ALL
---
app-secrets:
dummyPassword: top-secret
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"class": "OMAGServerConfig",
"versionId": "V2.0",
"localServerId": "996892b6-7299-4046-8928-b6687a7818ee",
"localServerName": "cocoMDS1",
"localServerType": "Open Metadata and Governance Server",
"localServerURL": "https://localhost:9443",
"localServerUserId": "OMAGServer",
"maxPageSize": 1000,
"repositoryServicesConfig": {
Expand All @@ -17,27 +14,7 @@
"displayName": "Console",
"connectorType": {
"class": "ConnectorType",
"headerVersion": 0,
"type": {
"typeId": "954421eb-33a6-462d-a8ca-b5709a1bd0d4",
"typeName": "ConnectorType",
"typeVersion": 1,
"typeDescription": "A set of properties describing a type of connector."
},
"guid": "4afac741-3dcc-4c60-a4ca-a6dede994e3f",
"qualifiedName": "Egeria:AuditLogDestinationConnector:Console",
"displayName": "Console Audit Log Destination Connector",
"description": "Connector supports logging of audit log messages to stdout.",
"connectorProviderClassName": "org.odpi.openmetadata.adapters.repositoryservices.auditlogstore.console.ConsoleAuditLogStoreProvider",
"connectorFrameworkName": "Open Connector Framework (OCF)",
"connectorInterfaceLanguage": "Java",
"connectorInterfaces": [
"org.odpi.openmetadata.frameworks.connectors.SecureConnectorExtension",
"org.odpi.openmetadata.repositoryservices.connectors.stores.auditlogstore.OMRSAuditLogStore"
],
"recognizedConfigurationProperties": [
"supportedSeverities"
]
"connectorProviderClassName": "org.odpi.openmetadata.adapters.repositoryservices.auditlogstore.console.ConsoleAuditLogStoreProvider"
},
"configurationProperties": {
"supportedSeverities": [
Expand All @@ -61,32 +38,13 @@
"localRepositoryConfig": {
"class": "LocalRepositoryConfig",
"metadataCollectionId": "838005fc-e09f-4688-af89-58254a155cc6",
"localRepositoryMode": "OPEN_METADATA_NATIVE",
"localRepositoryLocalConnection": {
"class": "Connection",
"headerVersion": 0,
"displayName": "In Memory Local Repository Connection",
"connectorType": {
"class": "ConnectorType",
"headerVersion": 0,
"type": {
"typeId": "954421eb-33a6-462d-a8ca-b5709a1bd0d4",
"typeName": "ConnectorType",
"typeVersion": 1,
"typeDescription": "A set of properties describing a type of connector."
},
"guid": "65cc9091-757f-4bcd-b937-426160be8bc2",
"qualifiedName": "Egeria:OMRSRepositoryConnector:InMemory",
"displayName": "In Memory OMRS Repository Connector",
"description": "Native open metadata repository connector that maps open metadata calls to a set of in memory hash maps - demo use only.",
"connectorProviderClassName": "org.odpi.openmetadata.adapters.repositoryservices.inmemory.repositoryconnector.InMemoryOMRSRepositoryConnectorProvider",
"connectorFrameworkName": "Open Connector Framework (OCF)",
"connectorInterfaceLanguage": "Java",
"connectorInterfaces": [
"org.odpi.openmetadata.frameworks.connectors.SecureConnectorExtension",
"org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent",
"org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSMetadataCollectionManager"
]
"connectorProviderClassName": "org.odpi.openmetadata.adapters.repositoryservices.inmemory.repositoryconnector.InMemoryOMRSRepositoryConnectorProvider"
}
},
"localRepositoryRemoteConnection": {
Expand All @@ -95,29 +53,10 @@
"displayName": "Local Repository Remote Connection",
"connectorType": {
"class": "ConnectorType",
"headerVersion": 0,
"type": {
"typeId": "954421eb-33a6-462d-a8ca-b5709a1bd0d4",
"typeName": "ConnectorType",
"typeVersion": 1,
"typeDescription": "A set of properties describing a type of connector."
},
"guid": "75ea56d1-656c-43fb-bc0c-9d35c5553b9e",
"qualifiedName": "Egeria:OMRSRepositoryConnector:CohortMemberClient:REST",
"displayName": "REST Cohort Member Client Connector",
"description": "Cohort member client connector that provides access to open metadata located in a remote repository via REST calls.",
"connectorProviderClassName": "org.odpi.openmetadata.adapters.repositoryservices.rest.repositoryconnector.OMRSRESTRepositoryConnectorProvider",
"connectorFrameworkName": "Open Connector Framework (OCF)",
"connectorInterfaceLanguage": "Java",
"connectorInterfaces": [
"org.odpi.openmetadata.frameworks.connectors.SecureConnectorExtension",
"org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent",
"org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSMetadataCollectionManager"
]
"connectorProviderClassName": "org.odpi.openmetadata.adapters.repositoryservices.rest.repositoryconnector.OMRSRESTRepositoryConnectorProvider"
},
"endpoint": {
"class": "Endpoint",
"headerVersion": 0,
"address": "https://localhost:9443/servers/cocoMDS1"
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
localServerName: cocoMDS1
localServerType: Open Metadata and Governance Server
localServerURL: https://localhost:9443
localServerUserId: OMAGServer
maxPageSize: 1000
repositoryServicesConfig:
Expand All @@ -14,7 +13,6 @@ repositoryServicesConfig:
- Error
localRepositoryConfig:
metadataCollectionId: 838005fc-e09f-4688-af89-58254a155cc6
localRepositoryMode: OPEN_METADATA_NATIVE
localRepositoryLocalConnection:
connectorType:
connectorProviderClassName: >-
Expand Down

0 comments on commit a144475

Please sign in to comment.