Skip to content

Commit

Permalink
Merge pull request #8251 from dwolfson/docker-compose-changes
Browse files Browse the repository at this point in the history
Added egeria-platform docker compose file and readme.
  • Loading branch information
dwolfson committed Jun 22, 2024
2 parents c11e61f + e2d726d commit ffe6a75
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Overview
This directory contains sample Docker Compose scripts to support the deployment of Egeria for experimentation,
development, and learning. Rather than having to install Egeria, prerequisites and tools separately, these scripts make
it easy to get a stack running quickly.
These are not meant for production use. Please see the [Planning Guide](https://egeria-project.org/guides/planning/)
for more information about designing Egeria deployments. The Egeria community has also created samples for other
deployment styles, such as Cloud Native approaches and the use of Helm charts to configure Kubernetes clusters. These
options may be better starting points for production deployments - depending upon your requirements.
Please feel free to engage with the community on our slack channel - we'd love your feedback and participation.


For a quick and simple environment to explore some of Egeria's base capabilities, the **egeria-platform.yml** Docker Compose
deployment may be a good starting point. Once this script executes successfully, you will have two docker containers running. One for the Egeria platform and one for Kafka. With this running configuration, you can work with any of Egeria's standard interfaces - java APIs, python APIs, or just plain RESTful http calls - and of course, to make use of tools and interfaces that have been built using these APIs.

The set of **Docker Compose** configurations will grow and evolve over time to cover additional scenarios.

# Contents

Our first docker compose script is called **egeria-platform.yml**. After running this script, you will have a running environment
that consists of a single Egeria runtime platform and the Apache Kafka event system. Information about configuring
Egeria can be found at [Configuring Egeria](https://egeria-project.org/guides/admin/configuring-the-omag-server-platform/).
We use standard, out-of-the-box configurations for both - a minimal amount of configuration for:

## Egeria Platform - Default Configuration
We use the Egeria platform docker image - [egeria-platform](https://hub.docker.com/r/odpi/egeria-platform).

* Port - By default the platform uses port 9443 and exposes this port to the host environment, This means that Egeria requests
can be made to platform URL **https://localhost:9443** or, if your environment is configured to support it, it can use
the domain name of your host machine.
* SSL - By default strict SSL is set to false
* Auto-Started Servers - by default a useful set of Egeria Operational Metadata and Governance (OMAG) servers are pre-installed
and started when the Egeria platform is started. The pre-configured and started servers are:
* simple-metadata-store
* active-metadata-store
* engine-host
* integration-daemon
* view-server
A description of these servers can be found at [sample configs](open-metadata-resources/open-metadata-deployment/sample-configs/README.md)
* Content Packs - pre-constructed information sets that can be used to configure Egeria and pre-load metadata, reference data and glossary data. See [Content Packs](https://egeria-project.org/content-packs/).
* Out-of-the-box Connectors - descriptions of the integration connectors can be found at [Integration Connectors](https://egeria-project.org/connectors/).

## Kafka - configured for Egeria
We use the bitnami/kafka image described at [kafka](https://hub.docker.com/r/bitnami/kafka)
* Port - We use the default port of 9092 for Kafka. This port is also exposed in the host environment. Changing this port also requires corresponding changes to the Egeria configuration.
* Other configuration can be seen in the *egeria-platform.yaml* file.

# Usage
Follow these steps to use Docker Compose.

1. Install and Configure Docker and Docker Compose.
* Docker and Docker compose must be installed and running - see https://docs.docker.com/install/
* Configure docker with at least 6GB memory
2. Download the [**egeria-platform.yaml**](https://raw.githubusercontent.com/odpi/egeria/main/open-metadata-resources/open-metadata-deployment/docker-compose/egeria-platform-compose/egeria-platform.yaml)
3. Run the docker compose script from a terminal window in the directory where you downloaded `egeria-platform.yaml`. At the command line issue:

`docker compose -f egeria-platform.yaml up`

This will download the docker images for Kafka and Egeria, then create and start the two containers. Both kafka and Egeria will then automatically configure themselves. For Egeria, this means not only starting up the initial set of servers, but then loading the **CoreContentPack.omarchive** into the metadata repository, and then configuring all the servers. This can take several minutes the first time the containers are created. Subsequent startups will be much faster.

4. Using either the **docker desktop** application or the docker command line you can see the two new containers running. To do this with the docker command line, you can issue:

`docker ps`

5. The environment is ready to be used.

6. You can control the containers with docker compose commands - see [docker compose](https://docs.docker.com/reference/cli/docker/compose/). These commands can be used to administer and use the docker containers.

## Next Steps

Now that your Egeria environment is running and configured it is waiting for you to make requests.
Some tutorials for working with Egeria can be found at [Tutorials](https://egeria-project.org/education/tutorials/). For those that want to try the new python client, you can find a quick introduction at [pyegeria](https://getting-started-with-egeria.pdr-associates.com/recipe-6-charming-python.html).

As always, your feedback and participation are welcome.


License: CC BY 4.0, Copyright Contributors to the ODPi Egeria project.
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the Egeria project


# To run
# * Ensure Docker is installed and running
# * Start Egeria Platform stack using
# 'docker-compose -f ./egeria-platform.yaml up'
#
# Assumptions:
# * Ports 9443 and 9092 are available on the host system - these are the default ports for Kafka and Egeria.
# * by default, no external volumes are used - comments below give examples of using external volumes
# * by default, Egeria will start with its set of default servers (active-metadata-store,view-server,
# integration-daemon,engine-host,simple-metadata-store) - you can change this.
# * by default, strict SSL validation is turned off
#
# See the following link for more info on volumes & why we need to use root:
# https://docs.bitnami.com/containers/how-to/work-with-non-root-containers


services:
kafka:
image: 'bitnami/kafka:latest'
ports:
- '9092:9092'
environment:
- KAFKA_CFG_NODE_ID=0
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
- KAFKA_CFG_PROCESS_ROLES=controller,broker
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka:9093
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER

egeria-platform:
depends_on:
- kafka
image: 'docker.io/odpi/egeria-platform:latest'
ports:
- '9443:9443'


# Persistence
# volumes:
# - "YOUR DATA DIRECTORY"/data:/deployments/data
# - "YOUR EXTRA LIBRARY DIRECTORY"/extra:/deployments/extra
# - "ANOTHER DIRECTOR TO MOUNT"/:/deployments/user_mount


#
# Change external to true and create volumes manually if you wish to persist between runs
#
volumes:
zookeeper-data:
external: false
kafka-data:
external: false

0 comments on commit ffe6a75

Please sign in to comment.