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

Omag server development #7816

Merged
merged 5 commits into from
Aug 2, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ distributions {
contents {
into('server') {
// Just the chassis - for backward compatibility
from { project(':open-metadata-implementation:platform-chassis:platform-chassis-spring').bootJar }
from { project(':open-metadata-implementation:server-chassis:server-chassis-spring').bootJar }
rename { String fileName ->
fileName.replace("platform-chassis-spring", "server-chassis-spring")
fileName.replace("server-chassis-spring", "omag-server")
}
fileMode = 0755
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,28 @@

![egeria-content-status-in-development.png](..%2F..%2F..%2Fimages%2Fegeria-content-status-in-development.png)

This module is providing OMAG server chassis spring-boot based application that is able to launch single pre-configured OMAG server instance.
This module provides spring-boot based application that is able to launch single pre-configured OMAG server instance.

### Building the module with Gradle

To build current module from the project home folder execute following Gradle command:
To build the boot application jar from the current module use:

`./gradlew clean :open-metadata-implementation:server-chassis:server-chassis-spring:build`
`./gradlew clean build`

### Starting the application
### Starting the application locally

To start the OMAG Server application manually using java from the project home, execute following bash command:
You can run the application locally from this module with java using following command:

```bash
# Go to project home folder
cd ../../../
# Execute java using -jar parameter starting the bootJar package and --omag.server.config setting the location of the OMAG server configuration file
java -jar open-metadata-implementation/server-chassis/server-chassis-spring/build/libs/server-chassis-spring-*-SNAPSHOT.jar --omag.server.config=file:open-metadata-implementation/server-chassis/server-chassis-spring/src/main/resources/metadata-repository-server.json
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
```
Alternately, for development purpose in IDE such as IntelliJ you can use default Spring Boot run configuration.

### Application Properties
The command will run the application using provided parameters. For demo purpose we turn ssl off and run the application on http port 9080.

`omag.server.config` - The OMAG server configuration JSON file location. Notice the 'file:' prefix. With this, spring-boot loads the resource from a file on a given path on the filesystem.
### Configuration properties

| 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 |
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*/

plugins {
id 'java'
id 'org.springframework.boot'
id "io.freefair.lombok"
}


Expand All @@ -23,10 +23,13 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-actuator-autoconfigure'
implementation 'org.springframework.boot:spring-boot-actuator'
implementation 'org.springframework.boot:spring-boot-starter-tomcat'
implementation 'jakarta.servlet:jakarta.servlet-api'
implementation 'org.slf4j:slf4j-api'
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'com.fasterxml.jackson.core:jackson-annotations'
implementation 'jakarta.servlet:jakarta.servlet-api'
implementation 'jakarta.validation:jakarta.validation-api'
implementation 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
runtimeOnly 'ch.qos.logback:logback-classic'
Expand All @@ -46,11 +49,11 @@ dependencies {
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 project(':open-metadata-implementation:access-services:data-manager:data-manager-spring')
// 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'
Expand Down
Loading