Skip to content

Commit

Permalink
Merge pull request #274 from lpalashevski/omag-server
Browse files Browse the repository at this point in the history
Omag server chart
  • Loading branch information
lpalashevski authored Sep 11, 2023
2 parents 588c032 + 5d5b70c commit 40d84c0
Show file tree
Hide file tree
Showing 15 changed files with 757 additions and 0 deletions.
26 changes: 26 additions & 0 deletions charts/egeria-server/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the Egeria project.

# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
11 changes: 11 additions & 0 deletions charts/egeria-server/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the Egeria project.
---
# This helm chart was generated using helm create https://helm.sh/docs/helm/helm_create/
# Only part of the resources such as deployment and service are relevant, the rest are kept as placeholder templates.
apiVersion: v2
name: egeria-server
description: A Helm chart used to demonstrate Egeria stand-alone OMAG server deployment
type: application
version: 4.3-prerelease.1
appVersion: "4.3"
79 changes: 79 additions & 0 deletions charts/egeria-server/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
<!-- Copyright Contributors to the ODPi Egeria project. -->

# Egeria OMAG Server helm chart

## Description

The purpose of this chart is to demonstrate stand-alone OMAG server deployment for Kubernetes.
The deployment is based on Egeria main docker image. By modifying the default container entry point variable we are able to create new runtime environment similar to the platform deployment.

## How it works

The container application is configured using standard deployment and config map resources customized by setting the values in 'app' map in [values.yaml](values.yaml)

``````yaml
app:
jarPath: "/deployments/server"
jarName: "omag-server"
loaderPath: "/deployments/server/lib"
configPath: "/deployments/server/conf"
configName: "cocoMDS1.yml"
livenessProbe: "/actuator/health/livenessState"
readinessProbe: "/actuator/health/readinessState"
``````

`app.jarPath` The path where the boot jar application is located inside the image.

`app.jarName` The name of the boot jar available on the `app.jarPath` location in the image.

`app.loaderPath` The spring boot application `LOADER_PATH`. This is the classpath location for Egeria connector libraries and additional third party libraries to be loaded at runtime.

`app.configPath` The location where configuration files will be located. Note this location is used as volume mount path inside the container.

`app.configName` The name of the configuration file (json or yaml) that will be loaded from `app.configPath` by the OMAG server instance on start-up.

`livenessProbe` and `readinessProbe` Standard kubernetes pod probes representing liveness and readiness states respectively.

For demo purpose, the chart contains example configuration files located in the [files](files) directory. The files placed here will be always copied as config map resources and mounted inside the container at location defined by `app.configPath`. From here, the server is trying to load the file defined by `app.configName` value.

For more details check out the [config.yaml](templates/config.yaml) and [deployment.yaml](templates/deployment.yaml) resources.


## Installation steps

### From helm repository

Add helm repo with name `egeria` (one-time)

```bash
helm repo add egeria https://github.com/odpi/egeria-charts.git
```

Once repo is added, pull latest chart versions

```bash
helm repo update
```

Install app instance with name `mds1` form chart with name `egeria-server`

```bash
helm install mds1 egeria/egeria-server
```

### From local files

Clone the files with git and install app instance with name `mds1` using local chart located at `charts/egeria-server`

```bash
git clone https://github.com/odpi/egeria-charts.git
cd egeria-charts
helm install mds1 charts/egeria-server -f charts/egeria-server/values.yaml
```

### Uninstall the chart

```bash
helm uninstall mds1
```
134 changes: 134 additions & 0 deletions charts/egeria-server/files/cocoMDS1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"class": "OMAGServerConfig",
"versionId": "V2.0",
"localServerName": "cocoMDS1",
"localServerUserId": "OMAGServer",
"maxPageSize": 1000,
"accessServicesConfig": [
{
"class": "AccessServiceConfig",
"accessServiceId": 200,
"accessServiceDevelopmentStatus": "IN_DEVELOPMENT",
"accessServiceAdminClass": "org.odpi.openmetadata.accessservices.assetcatalog.admin.AssetCatalogAdmin",
"accessServiceName": "Asset Catalog",
"accessServiceFullName": "Asset Catalog OMAS",
"accessServiceURLMarker": "asset-catalog",
"accessServiceDescription": "Search and understand your assets",
"accessServiceWiki": "https://egeria-project.org/services/omas/asset-catalog/overview/",
"accessServiceOperationalStatus": "ENABLED",
"accessServiceOptions": {
"SupportedTypesForSearch": [
"RelationalTable",
"TabularColumn",
"TabularFileColumn",
"RelationalColumn",
"GlossaryTerm",
"GlossaryCategory",
"Process",
"DataFile",
"Asset",
"Application",
"SoftwareServerCapability"
]
}
},
{
"class": "AccessServiceConfig",
"accessServiceId": 204,
"accessServiceDevelopmentStatus": "IN_DEVELOPMENT",
"accessServiceAdminClass": "org.odpi.openmetadata.accessservices.assetmanager.admin.AssetManagerAdmin",
"accessServiceName": "Asset Manager",
"accessServiceFullName": "Asset Manager OMAS",
"accessServiceURLMarker": "asset-manager",
"accessServiceDescription": "Manage metadata from a third party asset manager",
"accessServiceWiki": "https://egeria-project.org/services/omas/asset-manager/overview/",
"accessServiceOperationalStatus": "ENABLED"
},
{
"class": "AccessServiceConfig",
"accessServiceId": 210,
"accessServiceDevelopmentStatus": "TECHNICAL_PREVIEW",
"accessServiceAdminClass": "org.odpi.openmetadata.accessservices.datamanager.admin.DataManagerAdmin",
"accessServiceName": "Data Manager",
"accessServiceFullName": "Data Manager OMAS",
"accessServiceURLMarker": "data-manager",
"accessServiceDescription": "Capture changes to the data stores and data set managed by a data manager such as a database server, content manager or file system.",
"accessServiceWiki": "https://egeria-project.org/services/omas/data-manager/overview/",
"accessServiceOperationalStatus": "ENABLED"
}
],
"repositoryServicesConfig": {
"class": "RepositoryServicesConfig",
"auditLogConnections": [
{
"class": "Connection",
"connectorType": {
"class": "ConnectorType",
"connectorProviderClassName": "org.odpi.openmetadata.adapters.repositoryservices.auditlogstore.console.ConsoleAuditLogStoreProvider"
},
"configurationProperties": {
"supportedSeverities": [
"Information",
"Startup",
"Shutdown"
]
}
}
],
"localRepositoryConfig": {
"class": "LocalRepositoryConfig",
"metadataCollectionId": "838005fc-e09f-4688-af89-58254a155cc6",
"localRepositoryLocalConnection": {
"class": "Connection",
"connectorType": {
"class": "ConnectorType",
"connectorProviderClassName": "org.odpi.openmetadata.adapters.repositoryservices.inmemory.repositoryconnector.InMemoryOMRSRepositoryConnectorProvider"
}
},
"localRepositoryRemoteConnection": {
"class": "Connection",
"connectorType": {
"class": "ConnectorType",
"connectorProviderClassName": "org.odpi.openmetadata.adapters.repositoryservices.rest.repositoryconnector.OMRSRESTRepositoryConnectorProvider"
},
"endpoint": {
"class": "Endpoint",
"address": "https://localhost:9443/servers/cocoMDS1"
}
},
"eventsToSaveRule": "ALL",
"eventsToSendRule": "ALL"
},
"enterpriseAccessConfig": {
"class": "EnterpriseAccessConfig",
"enterpriseMetadataCollectionId": "df77a8e6-ef88-48a6-9462-ce5e9697c347",
"enterpriseOMRSTopicConnection": {
"class": "VirtualConnection",
"connectorType": {
"class": "ConnectorType",
"connectorProviderClassName": "org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicProvider"
},
"embeddedConnections": [
{
"class": "EmbeddedConnection",
"embeddedConnection": {
"class": "Connection",
"connectorType": {
"class": "ConnectorType",
"connectorProviderClassName": "org.odpi.openmetadata.adapters.eventbus.topic.inmemory.InMemoryOpenMetadataTopicProvider"
},
"endpoint": {
"class": "Endpoint",
"address": "cocoMDS1.openmetadata.repositoryservices.enterprise.cocoMDS1.OMRSTopic"
},
"configurationProperties": {
"local.server.id": "996892b6-7299-4046-8928-b6687a7818ee"
}
}
}
]
},
"enterpriseOMRSTopicProtocolVersion": "V1"
}
}
}
82 changes: 82 additions & 0 deletions charts/egeria-server/files/cocoMDS1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
class: OMAGServerConfig
localServerName: cocoMDS1
localServerUserId: OMAGServer
maxPageSize: 1000
accessServicesConfig:
- class: AccessServiceConfig
accessServiceAdminClass: org.odpi.openmetadata.accessservices.assetcatalog.admin.AssetCatalogAdmin
accessServiceName: Asset Catalog
accessServiceOperationalStatus: ENABLED
accessServiceOptions:
SupportedTypesForSearch:
- RelationalTable
- TabularColumn
- TabularFileColumn
- RelationalColumn
- GlossaryTerm
- GlossaryCategory
- Process
- DataFile
- Asset
- Application
- SoftwareServerCapability
- class: AccessServiceConfig
accessServiceAdminClass: org.odpi.openmetadata.accessservices.assetmanager.admin.AssetManagerAdmin
accessServiceName: Asset Manager
accessServiceOperationalStatus: ENABLED
- class: AccessServiceConfig
accessServiceAdminClass: org.odpi.openmetadata.accessservices.datamanager.admin.DataManagerAdmin
accessServiceName: Data Manager
accessServiceOperationalStatus: ENABLED
repositoryServicesConfig:
class: RepositoryServicesConfig
auditLogConnections:
- class: Connection
connectorType:
class: ConnectorType
connectorProviderClassName: org.odpi.openmetadata.adapters.repositoryservices.auditlogstore.console.ConsoleAuditLogStoreProvider
configurationProperties:
supportedSeverities:
- Information
- Startup
- Shutdown
localRepositoryConfig:
class: LocalRepositoryConfig
metadataCollectionId: 838005fc-e09f-4688-af89-58254a155cc6
localRepositoryLocalConnection:
class: Connection
connectorType:
class: ConnectorType
connectorProviderClassName: org.odpi.openmetadata.adapters.repositoryservices.inmemory.repositoryconnector.InMemoryOMRSRepositoryConnectorProvider
localRepositoryRemoteConnection:
class: Connection
connectorType:
class: ConnectorType
connectorProviderClassName: org.odpi.openmetadata.adapters.repositoryservices.rest.repositoryconnector.OMRSRESTRepositoryConnectorProvider
endpoint:
class: Endpoint
address: https://localhost:9443/servers/cocoMDS1
eventsToSaveRule: ALL
eventsToSendRule: ALL
enterpriseAccessConfig:
class: EnterpriseAccessConfig
enterpriseMetadataCollectionId: df77a8e6-ef88-48a6-9462-ce5e9697c347
enterpriseOMRSTopicConnection:
class: VirtualConnection
connectorType:
class: ConnectorType
connectorProviderClassName: org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicProvider
embeddedConnections:
- class: EmbeddedConnection
embeddedConnection:
class: Connection
connectorType:
class: ConnectorType
connectorProviderClassName: org.odpi.openmetadata.adapters.eventbus.topic.inmemory.InMemoryOpenMetadataTopicProvider
endpoint:
class: Endpoint
address: cocoMDS1.openmetadata.repositoryservices.enterprise.cocoMDS1.OMRSTopic
configurationProperties:
local.server.id: 996892b6-7299-4046-8928-b6687a7818ee
enterpriseOMRSTopicProtocolVersion: V1
25 changes: 25 additions & 0 deletions charts/egeria-server/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the Egeria project.

1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "egeria-server.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "egeria-server.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "egeria-server.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "egeria-server.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}
Loading

0 comments on commit 40d84c0

Please sign in to comment.