Skip to content

Commit

Permalink
Fix docker container
Browse files Browse the repository at this point in the history
Signed-off-by: Mandy Chessell <mandy.e.chessell@gmail.com>
  • Loading branch information
mandy-chessell committed Jun 12, 2024
1 parent 059bc2a commit 7d8fbb6
Show file tree
Hide file tree
Showing 13 changed files with 260 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/merge-v5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ jobs:
# Publish container images(egeria) to quay.io and docker.io
- name: Copy the distribution content to be used in docker copy command
run: |
cp -f release.application.properties ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz/assembly/platform/application.properties
cp -r ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz/assembly/opt/sample-configs/*-* ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz/assembly/platform/data
cp -f container.application.properties ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz/assembly/platform/application.properties
cp -r ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz/assembly/opt/sample-configs/*-* ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz/assembly/platform/data/servers
- name: Build and push(egeria) to quay.io and docker.io (tag latest only for main!)
if: ${{ github.ref == 'refs/heads/main'}}
uses: docker/build-push-action@v5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-v5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ jobs:
# Publish container images(egeria) to quay.io and docker.io
- name: Copy the distribution content to be used in docker copy command
run: |
cp -f release.application.properties ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz/assembly/platform/application.properties
cp -r ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz/assembly/opt/sample-configs/*-* ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz/assembly/platform/data
cp -f container.application.properties ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz/assembly/platform/application.properties
cp -r ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz/assembly/opt/sample-configs/*-* ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz/assembly/platform/data/servers
- name: Build and push(egeria) to quay.io and docker.io
uses: docker/build-push-action@v5
with:
Expand Down
3 changes: 2 additions & 1 deletion application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ server.port=9443
################################################
platform.placeholder.variables=\
{\
"kafkaEndpoint" : "localhost:9092"\
"kafkaEndpoint" : "localhost:9092",\
"egeriaEndpoint" : "https://localhost:9443"\
}

################################################
Expand Down
226 changes: 226 additions & 0 deletions container.application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the ODPi Egeria project.

# ========================================================================================================
# The application.properties file is used to configure the OMAG Server Platform which is implemented as
# a spring boot application.

###############################################
### Default port for the OMAG Server Platform
################################################
server.port=9443

###############################################
### Set up the configuration document store the OMAG Server Platform
### The values below will set up the clear text config document store
### (the default is the encrypted config document store).
################################################
platform.configstore.provider=org.odpi.openmetadata.adapters.adminservices.configurationstore.file.FileBasedServerConfigStoreProvider
platform.configstore.endpoint=data/servers/{0}/config/{0}.config

###############################################
### Set up the platform metadata security connector that provides authorization
### for platform administration, server operations and diagnostic calls.
### By default, there is no platform metadata security connector.
### The values below are for a sample platform metadata security connector where the only userId
### that is permitted to use the administration and platform services is `garygeeke`.
###############################################
platform.security.provider=org.odpi.openmetadata.metadatasecurity.samples.CocoPharmaPlatformSecurityProvider
platform.security.name=Coco Pharmaceuticals Platform

###############################################
### Set up the default configuration document for any new OMAG Server configurations.
###############################################
#platform.default.config.document=\
# {\
# "class": "OMAGServerConfig",\
# "organizationName": "myOrg",\
# "maxPageSize": 1200,\
# "eventBusConfig": \
# {\
# "class": "EventBusConfig",\
# "topicURLRoot": "egeria.omag",\
# "configurationProperties":\
# {\
# "producer": {"bootstrap.servers": "{{kafkaEndpoint}}"},\
# "consumer": {"bootstrap.servers": "{{kafkaEndpoint}}"}\
# }\
# }\
# }

################################################
### Placeholder variables are added to field values in the configuration document
### when the server is being configured using double curly braces. They are replaced by
### the values specified in platform.placeholder.variables each time the server starts up.
###
### The "kafkaEndpoint" value is the Apache Kafka endpoint, and it is used in the active-metadata-store
### sample configuration. If your Apache Kafka broker is listening on a different endpoint
### and you want to use active-metadata-store, change this variable to your Apache Kafka's address.
################################################
platform.placeholder.variables=\
{\
"kafkaEndpoint" : "host.docker.internal:9092",\
"egeriaEndpoint" : "https://host.docker.internal:9443"\
}

################################################
### startup servers configuration
################################################
#userId used to start up the list of configured servers default is 'system'
startup.user=system
# Comma separated names of servers to be started. The server names should be unquoted.
startup.server.list=active-metadata-store,engine-host,integration-daemon,view-server,simple-metadata-store

################################################
### SSL security.
# The keystore determines the information sent out by the server to identify itself.
# The truststore is where the certificates of trusted servers the platform is calling are located.
# (Note SSL certificate checking is performed on client-side only.)
################################################
server.ssl.key-store=keystore.p12
server.ssl.key-store-password=egeria
server.ssl.keyStoreType=PKCS12
server.ssl.keyAlias=egeriaserverchassis

server.ssl.trust-store=truststore.p12
server.ssl.trust-store-password=egeria

# WARNING! setting 'strict.ssl=false' allows java clients to open https connections without checking the validity of
# certificates from the servers it is calling.
# Alternate you can import self-signed certificates into java truststore or set up a truststore only for this app
# by adding the store into server.ssl.trust-store parameter
strict.ssl=false


################################################
# User security
################################################

# Authentication source (possible values: demo, ldap, ad)
authentication.source=demo
# Authentication mode (possible values: session,token,redis)
authentication.mode=token

#token timeout in minutes
token.timeout=15
token.absolute.timeout=720
token.secret=doNotTell

#LDAP authentication

ldap.domain=
ldap.user.search.base=ou=people,dc=egeria,dc=com
ldap.user.search.filter=uid={0}
ldap.group.search.base=ou=Groups,dc=egeria,dc=com
ldap.group.search.filter=member={0}
ldap.url=ldap://localhost:389
ldap.group.role.attribute=
ldap.npa.dn=
ldap.npa.password=
#ldap.user.dn.patterns patterns is a list of values separated by ";" as comma is used in the ldap pattern
ldap.user.dn.patterns=

# Redis configuration
#redis.host=localhost
#redis.port=6379

################################################
### Additional demo users configuration for when authentication.source=demo
### This file is located in the resources folder of the user-authn module and built into its runtime jar
################################################
spring.config.import=classpath:demo-users.yml

################################################
### Comma separated list of header names to extract from incoming HTTP requests and add to thread local.
### The default value is null and adds no headers.
### Setting the list to * means all headers are captured.
### Otherwise, list the header name in use.
################################################
authn.header.name.list=

################################################
### CORS
################################################
# Comma-separated list of origins.
# Example configuration below is for setting up local development environment where egeria-ui is hosted on one of the two urls.
# cors.allowed-origins=http://localhost,http://localhost:8081
cors.allowed-origins=*

################################################
# landing page (/api/public/app/info)
################################################
app.description=Have a question? || Get in touch via our Slack community https://slack.lfai.foundation/ @@What is Open Metadata? || Find out more on our website https://egeria-project.org/ @@Have more cool ideas? || Feel free to let us know your ideas so we can make it better.
app.title=Egeria Open Metadata | Find the right data with governance

# ##############################################################
# Component visibility for Role based access ###################
# ##############################################################
# How it works?
#
# The roles are defined in external authentication source (provider) configured with `authentication.source`.
# For demo purposes, we are providing simple file based authentication provider. See demo-users.yml
# The matrix controlling what components are allowed on the UI views for specific role is defined in the 'role.visibleComponents' prefixed properties as follows"
#
# role.visibleComponents.{ROLE-1}={component-name-1}
# role.visibleComponents.{ROLE-2}={component-name-1},{component-name-2}
#
# This will configure the application to show the component named 'component-name-1' for all uses assigned to 'ROLE-1'
# In the same way, users that have assigned 'ROLE-2' can see more 'component-name-1' and 'component-name-2'.
# It is also possible to use wildcard '*' to enable full visibility of all components to users in the given role.
#
# Complete list of components names that can be used:
#
# about
# asset-catalog
# asset-details
# asset-details-print
# glossary
# repository-explorer
# type-explorer
# asset-lineage
# asset-lineage-print
# end-to-end
# ultimate-source
# ultimate-destination
# vertical-lineage
#
# Below is the default configuration for the two COCO_PHARMA roles we use for demo:

role.visibleComponents.COCO_PHARMA_USER=about,asset-catalog,asset-details,asset-details-print,asset-lineage,asset-lineage-print,end-to-end,ultimate-source,ultimate-destination,vertical-lineage,glossary,repository-explorer
role.visibleComponents.COCO_PHARMA_ADMIN=*

################################################
### Which java packages should be scanned to locate the Spring resource definitions that define the REST APIs?
################################################
scan.packages=org.odpi.openmetadata.*

################################################
### Logging
################################################
logging.level.root=OFF
logging.level.org.springframework=ERROR
logging.level.org.springframework.boot.web.embedded.tomcat=INFO
logging.level.org.odpi.openmetadata.platformchassis.springboot=INFO
#tracing REST calls
#logging.level.org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger=DEBUG

################################################
### Swagger Docs
################################################
springdoc.version='@springdoc.version@'
springdoc.api-docs.enabled=true
springdoc.api-docs.path=/v3/api-docs
springdoc.swagger-ui.path=/swagger-ui.html
springdoc.swagger-ui.displayRequestDuration=true
springdoc.swagger-ui.tagsSorter=alpha
springdoc.swagger-ui.operationsSorter=alpha
springdoc.swagger-ui.docExpansion=none

################################################
### Spring Boot Actuator
################################################
# Endpoints web configuration
#management.endpoints.web.exposure.include=*
management.health.cassandra.enabled=false
management.health.redis.enabled=false
management.health.ldap.enabled=false
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class OMAGServerConfig extends AdminServicesConfigHeader
*/
public static final String defaultLocalServerType = null;
private static final String defaultLocalOrganizationName = null;
private static final String defaultLocalServerURL = "https://localhost:9443";
private static final String defaultLocalServerURL = "{{egeriaEndpoint}}";
private static final String defaultLocalServerUserId = "OMAGServer";
public static final int defaultMaxPageSize = 1000;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ GET {{baseURL}}/open-metadata/platform-services/users/{{adminUserId}}/server-pla
###
# @name Get Platform Security Connection
# Retrieve the Connection object used to create the connector that verifies the authorization of users calling the platform and admin services.
GET {{baseURL}}/open-metadata/platform-services/users/{{adminUserId}}/platform/security/connection
GET {{baseURL}}/open-metadata/platform-services/users/{{adminUserId}}/server-platform/security/connection

###
# @name Set Platform Security Connection
# Set up the connection for the platform security connector. This connector verifies the authorization of any user calling the platform or admin services. This call is preconfigured to set up the sample platform security connector. This allows only the Coco Pharmaceuticals IT administrator, `garygeeke`, to issue platform calls.
# Once you have set up this security connector in your OMAG Server Platform, the default user `me` in the `Egeria` environment will no longer be authorized to issue REST calls to the server (try some of the requests that were "working" earlier to verify this). To switch the user to one that the OMAG Server Platform will accept, click on the eye symbol (top right), then click on `edit` and change the current value of `user` to `garygeeke`.
POST {{baseURL}}/open-metadata/platform-services/users/{{adminUserId}}/platform/security/connection
POST {{baseURL}}/open-metadata/platform-services/users/{{adminUserId}}/server-platform/security/connection
Content-Type: application/json

{
Expand All @@ -32,7 +32,7 @@ Content-Type: application/json
###
# @name Delete Platform Security Connection
# Remove the currently configured Platform Security Connection. This means that no security checks will be performed by the OMAG Server Platform.
DELETE {{baseURL}}/open-metadata/platform-services/users/{{adminUserId}}/platform/security/connection
DELETE {{baseURL}}/open-metadata/platform-services/users/{{adminUserId}}/server-platform/security/connection

###
# @name Get registered access services
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ Content-Type: application/json
{
"class": "ViewServiceRequestBody",
"omagserverName": "active-metadata-store",
"omagserverPlatformRootURL": "{{baseURL}}",
"omagserverPlatformRootURL": "{{egeriaEndpoint}}",
"resourceEndpoints": [
{
"class": "ResourceEndpointConfig",
"resourceCategory": "Platform",
"platformName": "Platform:9443",
"platformRootURL": "{{baseURL}}",
"platformRootURL": "{{egeriaEndpoint}}",
"description": "This is the default OMAG Server Platform."
},
{
Expand Down Expand Up @@ -209,7 +209,7 @@ Content-Type: application/json
"engineUserId": "generalnpa"
}
],
"omagserverPlatformRootURL": "{{baseURL}}",
"omagserverPlatformRootURL": "{{egeriaEndpoint}}",
"omagserverName": "active-metadata-store"
}

Expand All @@ -236,7 +236,7 @@ Content-Type: application/json

{
"class": "IntegrationGroupConfig",
"omagserverPlatformRootURL": "{{baseURL}}",
"omagserverPlatformRootURL": "{{egeriaEndpoint}}",
"omagserverName" : "active-metadata-store",
"integrationGroupQualifiedName" : "Egeria:IntegrationGroup:DefaultIntegrationGroup"
}
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 7d8fbb6

Please sign in to comment.