diff --git a/open-metadata-resources/open-metadata-deployment/charts/egeria-base/README.md b/open-metadata-resources/open-metadata-deployment/charts/egeria-base/README.md index d840d66b013..c57ded4acbd 100644 --- a/open-metadata-resources/open-metadata-deployment/charts/egeria-base/README.md +++ b/open-metadata-resources/open-metadata-deployment/charts/egeria-base/README.md @@ -114,6 +114,25 @@ cp ~/libs/*jar egeria-base/libs These files will be copied into a kubernetes config map, which is then made available as a mounted volume to the runtime image of egeria & added to the class loading path as `/extlib`. You still need to configure the egeria server(s) appropriately ## Accessing Egeria +When this chart is installed, an initialization job is run to configure the egeria metadata server and UI. + +For example looking at kubernetes jobs will show something like: +```bash +$ kubectl get pods [17:27:11] +NAME READY STATUS RESTARTS AGE +egeria-base-config-crhrv 1/1 Running 0 4m16s +egeria-base-platform-0 1/1 Running 0 4m16s +egeria-base-presentation-699669cfd4-9swjb 1/1 Running 0 4m16s +egeria-kafka-0 1/1 Running 2 4m16s +egeria-zookeeper-0 1/1 Running 0 4m16s +``` + +You should wait until that first 'egeria-base-config' job completes, it will then disappear from the list. +This job issues REST calls against the egeria serves to configure them for this simple environment (see scripts directory). + +The script will not run again, since we will have now configured the servers with persistent storage, and for the platform +to autostart our servers. So even if a pod is removed and restarted, the egeria platform and servers should return in the same state. + We now have egeria running within a Kubernetes cluster, but by default no services are exposed externally - they are all of type `ClusterIP` - we can see these with ```bash diff --git a/open-metadata-resources/open-metadata-deployment/charts/egeria-base/scripts/config-egeria.sh b/open-metadata-resources/open-metadata-deployment/charts/egeria-base/scripts/config-egeria.sh index 53421295e7d..0616aa3f712 100644 --- a/open-metadata-resources/open-metadata-deployment/charts/egeria-base/scripts/config-egeria.sh +++ b/open-metadata-resources/open-metadata-deployment/charts/egeria-base/scripts/config-egeria.sh @@ -80,6 +80,19 @@ curl -f -k --verbose --basic admin:admin -X POST \ "${EGERIA_ENDPOINT}/open-metadata/admin-services/users/${EGERIA_USER}/servers/${VIEW_SERVER}/cohorts/${EGERIA_COHORT}" # Configure the view services +echo -e '\n\n > Setting up Glossary Author:\n' + + curl -f -k --verbose --basic admin:admin \ + --header "Content-Type: application/json" \ + "${EGERIA_ENDPOINT}/open-metadata/admin-services/users/${EGERIA_USER}/servers/${VIEW_SERVER}/view-services/glossary-author" \ + --data @- < Setting up TEX:\n' curl -f -k --verbose --basic admin:admin \ @@ -216,9 +229,7 @@ curl -k \ { "STARTUP_SERVER_LIST": "$POSTCONFIG_STARTUP_SERVER_LIST" } -} +} EOF -sleep 10000 - -echo '-- End of configuration' \ No newline at end of file +echo '-- End of configuration' diff --git a/open-metadata-resources/open-metadata-deployment/charts/egeria-base/templates/platform.yaml b/open-metadata-resources/open-metadata-deployment/charts/egeria-base/templates/platform.yaml index 98a81c989cc..cabe95c3622 100644 --- a/open-metadata-resources/open-metadata-deployment/charts/egeria-base/templates/platform.yaml +++ b/open-metadata-resources/open-metadata-deployment/charts/egeria-base/templates/platform.yaml @@ -112,7 +112,8 @@ spec: {{ if .Values.egeria.persistence }} volumeMounts: - mountPath: "/deployments/data" - name: {{ .Release.Name }}-egeria-data + # NO need to include release name in template - included as a SS + name: data {{ end }} - name: extlib mountPath: /extlib @@ -124,7 +125,7 @@ spec: {{ if .Values.egeria.persistence }} volumeClaimTemplates: - metadata: - name: {{ .Release.Name }}-egeria-data + name: data spec: accessModes: - ReadWriteOnce diff --git a/open-metadata-resources/open-metadata-deployment/charts/egeria-base/values.yaml b/open-metadata-resources/open-metadata-deployment/charts/egeria-base/values.yaml index 8ca0e8d59f2..57c2d077553 100644 --- a/open-metadata-resources/open-metadata-deployment/charts/egeria-base/values.yaml +++ b/open-metadata-resources/open-metadata-deployment/charts/egeria-base/values.yaml @@ -59,7 +59,7 @@ options: # Default will be true, but during dev set to false # This setting will control if the k8s job (and hence pod/logs) are deleted after egeria configuration # Set to false to assist in debugging - jobdelete: false + jobdelete: true # --- Docker image sources --- @@ -82,7 +82,7 @@ imageDefaults: image: egeria: name: egeria - presentation + presentation: name: egeria-react-ui tag: 2.6.0 configure: diff --git a/open-metadata-resources/open-metadata-deployment/compose/tutorials/.env b/open-metadata-resources/open-metadata-deployment/compose/tutorials/.env index a3776feaaa5..04ef7888279 100644 --- a/open-metadata-resources/open-metadata-deployment/compose/tutorials/.env +++ b/open-metadata-resources/open-metadata-deployment/compose/tutorials/.env @@ -14,4 +14,6 @@ CURL_CA_BUNDLE= PYTHONWARNINGS=ignore:Unverified HTTPS request # Set to either 'in-memory-repository' or 'local-graph-repository' -repositoryType=local-graph-repository +# See README - changes are needed in the .yaml configuration to actually persist data +#repositoryType=local-graph-repository +repositoryType=in-memory-repository diff --git a/open-metadata-resources/open-metadata-deployment/compose/tutorials/README.md b/open-metadata-resources/open-metadata-deployment/compose/tutorials/README.md index 19999559a01..0974bbfac48 100644 --- a/open-metadata-resources/open-metadata-deployment/compose/tutorials/README.md +++ b/open-metadata-resources/open-metadata-deployment/compose/tutorials/README.md @@ -11,6 +11,9 @@ to get a stack running quickly This has much reduced function than Egeria's kubernetes support via Helm which is a better option for real-world coding & deployment. The same configuration we have here for the lab is also available for k8s. + +It is recommended you consider switching to k8s as it offers us more flexibility. + See https://github.com/odpi/egeria/tree/master/open-metadata-resources/open-metadata-deployment/charts/odpi-egeria-lab Components included are: @@ -113,16 +116,18 @@ This can be quite verbose when the servers start up, since a lot of type informa To follow 'in real time' you can use `docker logs -f ` (-f for 'follow') ## Persistence +By default, persistence is disabled. However in the egeria-tutorial.yaml file you can uncomment the required +definitions for volumes, and their use. -This docker-compose environment uses docker volumes to persist data. However they are bound to the lifecycle imposed by docker-compose. This means that when you issue the 'docker-compose -f ./egeria-tutorial.yaml down' they are deleted. To avoid this you will need to manually create the volumes and change their definition to external. +Note that if you do this, and allow docker to automatically create volumes, they are bound to the lifecycle imposed by docker-compose. This means that when you issue the 'docker-compose -f ./egeria-tutorial.yaml down' they are deleted. To avoid this you will need to manually create the volumes and change their definition to external. To do this edit egeria-tutorial.yaml and change `external: false` to `external: true`. Then manually create each volume ie `docker volume create datalake-data` before running `docker-compose -f ./egeria-tutorial.yaml up`. Now when you subsequently do the down, the volumes will be left behind. Use `docker volume ls` to list & `docker volume rm ` to delete. -Egeria is also set to use the local graph repository by default, which will write to data in these volumes +The Egeria notebook environment uses the in-memory repository by default, so you will also need to switch this to write data to these volumes: -Set the value of 'repositoryType' to 'in-memory-repository' in the .env file to not use the graph repository. +Set the value of 'repositoryType' to 'local-graph-repository' in the .env file to use the graph repository. ### Using the environment to extend notebooks or develop new ones diff --git a/open-metadata-resources/open-metadata-deployment/compose/tutorials/egeria-tutorial.yaml b/open-metadata-resources/open-metadata-deployment/compose/tutorials/egeria-tutorial.yaml index d4937535f2b..fe4b4257611 100644 --- a/open-metadata-resources/open-metadata-deployment/compose/tutorials/egeria-tutorial.yaml +++ b/open-metadata-resources/open-metadata-deployment/compose/tutorials/egeria-tutorial.yaml @@ -24,8 +24,9 @@ services: - '12181:2181' networks: - cocopharma - volumes: - - zookeeper-data:/bitnami/zookeeper + # Persistence + #volumes: + # - zookeeper-data:/bitnami/zookeeper kafka: depends_on: @@ -39,8 +40,9 @@ services: - '19092:9092' networks: - cocopharma - volumes: - - kafka-data:/bitnami/kafka + # Persistence + #volumes: + # - kafka-data:/bitnami/kafka notebook: image: '${egeria_repo}/jupyter:${egeria_version}' @@ -78,8 +80,9 @@ services: - cocopharma env_file: - '.env' - volumes: - - core-data:/deployments/data + # Persistence + #volumes: + # - core-data:/deployments/data datalake: depends_on: @@ -91,8 +94,9 @@ services: - cocopharma env_file: - '.env' - volumes: - - datalake-data:/deployments/data + # Persistence + #volumes: + # - datalake-data:/deployments/data dev: depends_on: @@ -104,8 +108,9 @@ services: - cocopharma env_file: - '.env' - volumes: - - dev-data:/deployments/data + # Persistence + #volumes: + # - dev-data:/deployments/data factory: depends_on: @@ -117,8 +122,9 @@ services: - cocopharma env_file: - '.env' - volumes: - - factory-data:/deployments/data + # Persistence + #volumes: + # - factory-data:/deployments/data ui: depends_on: @@ -164,19 +170,21 @@ services: networks: cocopharma: +# Persistence: # These are the persistent volumes used by each of the egeria servers. See the README.md for further information # # Change external to true and create volumes manually if you wish to persist between runs -volumes: - core-data: - external: false - datalake-data: - external: false - dev-data: - external: false - factory-data: - external: false - zookeeper-data: - external: false - kafka-data: - external: false +# +#volumes: +# core-data: +# external: false +# datalake-data: +# external: false +# dev-data: +# external: false +# factory-data: +# external: false +# zookeeper-data: +# external: false +# kafka-data: +# external: false