Skip to content

Commit

Permalink
Further enhancements, code cleanup and documentation improvements.
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 98f5963 commit 01f1de1
Show file tree
Hide file tree
Showing 10 changed files with 159 additions and 87 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
<!-- Copyright Contributors to the ODPi Egeria project. -->
<!-- Copyright Contributors to the ODPi Egeria project. -->

# OMAG Server Chassis Spring

Expand All @@ -15,18 +15,54 @@ To build the boot application jar from the current module use:

### Starting the application locally

You can run the application locally from this module with java using following command:
You can run the application locally in the current module with java using following command:

```bash
java -jar build/libs/server-chassis-spring-*-SNAPSHOT.jar --omag.server-config=classpath:samples/metadata-repository-server.json --server.port=9080 --server.ssl.enabled=false
java -jar build/libs/server-chassis-spring-*-SNAPSHOT.jar --omag.server-config-file=classpath:samples/metadata-repository-server.yml --server.port=9080 --server.ssl.enabled=false
```

The command will run the application using provided parameters. For demo purpose we turn ssl off and run the application on http port 9080.
```
Project Egeria - Open Metadata and Governance
____ __ ___ ___ ______ _____
/ __ \ / |/ // | / ____/ / ___/ ___ ____ _ __ ___ ____
/ / / // /|_/ // /| | / / __ \__ \ / _ \ / __/| | / // _ \ / __/
/ /_/ // / / // ___ |/ /_/ / ___/ // __// / | |/ // __// /
\____//_/ /_//_/ |_|\____/ /____/ \___//_/ |___/ \___//_/
:: Powered by Spring Boot (v3.1.1) ::
2023-09-07T10:08:05.779+02:00 INFO 4334 --- [ main] o.o.o.s.springboot.OMAGServer : Starting OMAGServer using Java 17.0.8 with PID 4334 (/Developer/egeria/open-metadata-implementation/server-chassis/server-chassis-spring/build/libs/server-chassis-spring-4.4-SNAPSHOT.jar started by DEVELOPER in /Developer/egeria/open-metadata-implementation/server-chassis/server-chassis-spring)
2023-09-07T10:08:05.781+02:00 INFO 4334 --- [ main] o.o.o.s.springboot.OMAGServer : No active profile set, falling back to 1 default profile: "default"
2023-09-07T10:08:07.435+02:00 INFO 4334 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 9080 (http)
2023-09-07T10:08:07.444+02:00 INFO 4334 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2023-09-07T10:08:07.444+02:00 INFO 4334 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.10]
2023-09-07T10:08:07.505+02:00 INFO 4334 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2023-09-07T10:08:07.506+02:00 INFO 4334 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1681 ms
2023-09-07T10:08:08.228+02:00 INFO 4334 --- [ main] EnvironmentConfiguration$$SpringCGLIB$$0 : SSL configuration started working directory: /Developer/egeria/open-metadata-implementation/server-chassis/server-chassis-spring
2023-09-07T10:08:08.685+02:00 INFO 4334 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator'
2023-09-07T10:08:08.749+02:00 INFO 4334 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 9080 (http) with context path ''
2023-09-07T10:08:08.763+02:00 INFO 4334 --- [ main] o.o.o.s.springboot.OMAGServer : Started OMAGServer in 3.384 seconds (process running for 3.851)
2023-09-07T10:08:08.786+02:00 INFO 4334 --- [ main] o.o.o.s.s.config.OMAGConfigHelper : Using configuration from class path resource [samples/metadata-repository-server.yml]
2023-09-07T10:08:09.024+02:00 INFO 4334 --- [ main] o.o.o.s.springboot.OMAGServer : Sending activation request for server: cocoMDS1 and user: OMAGServer
2023-09-07T10:08:09.208+02:00 INFO 4334 --- [ main] o.o.o.s.springboot.OMAGServer : Activation succeeded for server: cocoMDS1
```

The command will run the application using parameters provided. The OMAG server instance is created and activated using the configuration file supplied via application property `omag.server-config-file`.
<br/>To demonstrate basic functionality, we turn ssl off `server.ssl.enabled=false` and run the application on http port 9080 `server.port=9080`.

### Quick-start configuration properties

| Property name | Environment variable | Description |
|-------------------------|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| omag.server-config-file | OMAG_SERVERCONFIGFILE | [REQUIRED] The [OMAGServerConfig document](https://egeria-project.org/concepts/configuration-document/) file location. <br/>Note the value should be defined as spring Resource i.e. starting with `classpath:` or `file:` <br/> Both JSON and YAML files are supported. See [samples](src%2Fmain%2Fresources%2Fsamples) for sample configuration files. |
| server.port | SERVER_PORT | Configures port used by the embedded Tomcat server. |
| server.ssl.enabled | SERVER_SSL_ENABLED | Configures if SSL should be enabled for the embedded Tomcat server. |

### Configuration properties
Application can be further customized by setting supported spring boot and application specific properties.
<br/>The default configuration that is already packaged within the JAR distribution is [application.properties](src%2Fmain%2Fresources%2Fapplication.properties).
<br/>Following Spring application [external configuration](https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.external-config) feature, all the properties can be customized at deploy/run time as shown in the quick-start example above.

| Property name | Environment variable | | Description |
|--------------------|----------------------|:----|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| omag.server-config | OMAG_SERVER-CONFIG | | The [OMAGServerConfig document](https://egeria-project.org/concepts/configuration-document/) json file location **(Required)**. Note the value should be spring Resource i.e. starting with `classpath:` or `file:` |
| server.port | SERVER_PORT | | Configures port used by the embedded Tomcat server |
| server.ssl.enabled | SERVER_SSL_ENABLED | | Configures if SSL should be enabled for the embedded Tomcat server |
----
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
Copyright Contributors to the ODPi Egeria project.
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,66 @@ dependencies {
implementation project(':open-metadata-implementation:admin-services:admin-services-api')
implementation project(':open-metadata-implementation:server-operations:server-operations-api')
implementation project(':open-metadata-implementation:server-operations:server-operations-server')
implementation project(path: ':open-metadata-implementation:adapters:open-connectors:connector-configuration-factory')
implementation project(path: ':open-metadata-implementation:repository-services:repository-services-implementation')

/* IN DEVELOPMENT */

/* Pulling dependencies for some fo the sub-systems enabling 'Metadata Access Store' services */

runtimeOnly project(':open-metadata-implementation:repository-services:repository-services-spring')
runtimeOnly project(':open-metadata-implementation:access-services:asset-manager:asset-manager-spring')
runtimeOnly project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-spring')
runtimeOnly project(':open-metadata-implementation:access-services:data-manager:data-manager-spring')

/* Pulling dependencies for some fo the sub-systems enabling 'Integration Daemon' services to test Database Integrator via JDBC integration connector */

// runtimeOnly project(':open-metadata-implementation:integration-services:database-integrator:database-integrator-server')
// runtimeOnly 'org.odpi.egeria:egeria-connector-resource-jdbc:1.1'
// runtimeOnly 'org.odpi.egeria:egeria-connector-integration-jdbc:1.1'
// runtimeOnly 'com.oracle.database.jdbc:ojdbc10:19.19.0.0'
if (!project.hasProperty("adminChassisOnly")) {
runtimeOnly project(':open-metadata-implementation:view-services:server-author-view:server-author-view-spring')
runtimeOnly project(':open-metadata-implementation:view-services:glossary-author-view:glossary-author-view-spring')
runtimeOnly project(':open-metadata-implementation:view-services:glossary-browser:glossary-browser-spring')
runtimeOnly project(':open-metadata-implementation:view-services:glossary-workflow:glossary-workflow-spring')
runtimeOnly project(':open-metadata-implementation:view-services:my-profile:my-profile-spring')
runtimeOnly project(':open-metadata-implementation:view-services:rex-view:rex-view-spring')
runtimeOnly project(':open-metadata-implementation:view-services:tex-view:tex-view-spring')
runtimeOnly project(':open-metadata-implementation:view-services:dino-view:dino-view-spring')
runtimeOnly project(':open-metadata-implementation:access-services:security-officer:security-officer-spring')
runtimeOnly project(':open-metadata-implementation:access-services:security-manager:security-manager-spring')
runtimeOnly project(':open-metadata-implementation:access-services:data-manager:data-manager-spring')
runtimeOnly project(':open-metadata-implementation:access-services:glossary-view:glossary-view-spring')
runtimeOnly project(':open-metadata-implementation:access-services:asset-lineage:asset-lineage-spring')
runtimeOnly project(':open-metadata-implementation:access-services:data-engine:data-engine-spring')
runtimeOnly project(':open-metadata-implementation:access-services:subject-area:subject-area-spring')
runtimeOnly project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-spring')
runtimeOnly project(':open-metadata-implementation:access-services:governance-program:governance-program-spring')
runtimeOnly project(':open-metadata-implementation:access-services:governance-engine:governance-engine-spring')
runtimeOnly project(':open-metadata-implementation:access-services:discovery-engine:discovery-engine-spring')
runtimeOnly project(':open-metadata-implementation:access-services:stewardship-action:stewardship-action-spring')
runtimeOnly project(':open-metadata-implementation:access-services:community-profile:community-profile-spring')
runtimeOnly project(':open-metadata-implementation:access-services:design-model:design-model-spring')
runtimeOnly project(':open-metadata-implementation:access-services:data-privacy:data-privacy-spring')
runtimeOnly project(':open-metadata-implementation:access-services:it-infrastructure:it-infrastructure-spring')
runtimeOnly project(':open-metadata-implementation:access-services:project-management:project-management-spring')
runtimeOnly project(':open-metadata-implementation:access-services:dev-ops:dev-ops-spring')
runtimeOnly project(':open-metadata-implementation:access-services:software-developer:software-developer-spring')
runtimeOnly project(':open-metadata-implementation:access-services:digital-architecture:digital-architecture-spring')
runtimeOnly project(':open-metadata-implementation:access-services:digital-service:digital-service-spring')
runtimeOnly project(':open-metadata-implementation:access-services:data-science:data-science-spring')
runtimeOnly project(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-spring')
runtimeOnly project(':open-metadata-implementation:access-services:asset-manager:asset-manager-spring')
runtimeOnly project(':open-metadata-implementation:access-services:asset-owner:asset-owner-spring')
runtimeOnly project(':open-metadata-implementation:engine-services:asset-analysis:asset-analysis-spring')
runtimeOnly project(':open-metadata-implementation:engine-services:repository-governance:repository-governance-spring')
runtimeOnly project(':open-metadata-implementation:engine-services:governance-action:governance-action-spring')
runtimeOnly project(':open-metadata-implementation:integration-services:security-integrator:security-integrator-spring')
runtimeOnly project(':open-metadata-implementation:integration-services:organization-integrator:organization-integrator-spring')
runtimeOnly project(':open-metadata-implementation:integration-services:infrastructure-integrator:infrastructure-integrator-spring')
runtimeOnly project(':open-metadata-implementation:integration-services:lineage-integrator:lineage-integrator-spring')
runtimeOnly project(':open-metadata-implementation:integration-services:files-integrator:files-integrator-spring')
runtimeOnly project(':open-metadata-implementation:integration-services:display-integrator:display-integrator-spring')
runtimeOnly project(':open-metadata-implementation:integration-services:database-integrator:database-integrator-spring')
runtimeOnly project(':open-metadata-implementation:integration-services:analytics-integrator:analytics-integrator-spring')
runtimeOnly project(':open-metadata-implementation:integration-services:api-integrator:api-integrator-spring')
runtimeOnly project(':open-metadata-implementation:integration-services:catalog-integrator:catalog-integrator-spring')
runtimeOnly project(':open-metadata-implementation:integration-services:search-integrator:search-integrator-spring')
runtimeOnly project(':open-metadata-implementation:integration-services:topic-integrator:topic-integrator-spring')
runtimeOnly project(':open-metadata-implementation:repository-services:repository-services-spring')
runtimeOnly project(':open-metadata-conformance-suite:open-metadata-conformance-suite-spring')
runtimeOnly project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-spring')
runtimeOnly project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-spring')
runtimeOnly project(':open-metadata-implementation:framework-services:oif-metadata-management:oif-metadata-spring')
runtimeOnly project(':open-metadata-implementation:governance-servers:data-engine-proxy-services:data-engine-proxy-services-spring')
runtimeOnly project(':open-metadata-implementation:governance-servers:integration-daemon-services:integration-daemon-services-spring')
runtimeOnly project(':open-metadata-implementation:governance-servers:engine-host-services:engine-host-services-spring')
runtimeOnly project(':open-metadata-implementation:governance-servers:open-lineage-services:open-lineage-services-spring')
}

testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.springframework.boot:spring-boot-test'
Expand Down
Loading

0 comments on commit 01f1de1

Please sign in to comment.