odpi / egeria

Egeria core
https://egeria-project.org
Apache License 2.0
795 stars 259 forks source link

Fix docker container #8227

Closed mandy-chessell closed 2 months ago

mandy-chessell commented 2 months ago

Description

The Docker file in the omag-server-platform distribution had stopped working. The problem was that the file permissions for egeria's /deployment directory was read-only. The Dockerfile needed a --CHMOD option on the COPY command.

The servers within the container were also unable to call one another via https://localhost:9443. In addition, the Egeria servers inside the containers needed access to Apache Kafka running outside the container.

The host name localhost inside the docker container needs to be host.docker.internal. Since we only want one version of the sample configuration files, they have been changed to use placeholder variables for the platform URL root in the sample servers' configuration documents.

in the application.properties file for bare metal running, the placeholder properties are set to

platform.placeholder.variables=\
  {\
    "kafkaEndpoint" : "localhost:9092",\
    "egeriaEndpoint" : "https://localhost:9443"\
  }

And in the docker container, they are:

platform.placeholder.variables=\
  {\
    "kafkaEndpoint" : "host.docker.internal:9092",\
    "egeriaEndpoint" : "https://host.docker.internal:9443"\
  }

The additional advantage of this change is that it is easy to change the port and host name of egeria for more complex deployments.

Related Issue(s)

None

Testing

Running newly created docker containers after the changes.

Release Notes & Documentation

Currenlty the documentation for docker containers is in the readmes associated with the distribution and they thave been updated. Longer term, the planning guide needs details of running with containers.

Additional notes

This change was discovered while converting the release process to use the omag-server-platform distribution rather than the obsolete open-metadata-assemblies distribution.