Skip to content

Commit

Permalink
Merge pull request #4653 from planetf1/egeria-release-2.6
Browse files Browse the repository at this point in the history
#4652 Typo, docs, improvements, view service config addition for egeria base helm chart
  • Loading branch information
planetf1 authored Feb 2, 2021
2 parents f2dfdec + cf0e687 commit d970bd6
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 @- <<EOF
{
"class": "ViewServiceConfig",
"omagserverPlatformRootURL": "${EGERIA_ENDPOINT}"
"omagserverName" : "${EGERIA_SERVER}"
}
EOF

echo -e '\n\n > Setting up TEX:\n'

curl -f -k --verbose --basic admin:admin \
Expand Down Expand Up @@ -216,9 +229,7 @@ curl -k \
{
"STARTUP_SERVER_LIST": "$POSTCONFIG_STARTUP_SERVER_LIST"
}
}
}
EOF

sleep 10000

echo '-- End of configuration'
echo '-- End of configuration'
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -124,7 +125,7 @@ spec:
{{ if .Values.egeria.persistence }}
volumeClaimTemplates:
- metadata:
name: {{ .Release.Name }}-egeria-data
name: data
spec:
accessModes:
- ReadWriteOnce
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---

Expand All @@ -82,7 +82,7 @@ imageDefaults:
image:
egeria:
name: egeria
presentation
presentation:
name: egeria-react-ui
tag: 2.6.0
configure:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 <container>` (-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 <id>` 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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ services:
- '12181:2181'
networks:
- cocopharma
volumes:
- zookeeper-data:/bitnami/zookeeper
# Persistence
#volumes:
# - zookeeper-data:/bitnami/zookeeper

kafka:
depends_on:
Expand All @@ -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}'
Expand Down Expand Up @@ -78,8 +80,9 @@ services:
- cocopharma
env_file:
- '.env'
volumes:
- core-data:/deployments/data
# Persistence
#volumes:
# - core-data:/deployments/data

datalake:
depends_on:
Expand All @@ -91,8 +94,9 @@ services:
- cocopharma
env_file:
- '.env'
volumes:
- datalake-data:/deployments/data
# Persistence
#volumes:
# - datalake-data:/deployments/data

dev:
depends_on:
Expand All @@ -104,8 +108,9 @@ services:
- cocopharma
env_file:
- '.env'
volumes:
- dev-data:/deployments/data
# Persistence
#volumes:
# - dev-data:/deployments/data

factory:
depends_on:
Expand All @@ -117,8 +122,9 @@ services:
- cocopharma
env_file:
- '.env'
volumes:
- factory-data:/deployments/data
# Persistence
#volumes:
# - factory-data:/deployments/data

ui:
depends_on:
Expand Down Expand Up @@ -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

0 comments on commit d970bd6

Please sign in to comment.