Skip to content

Commit bf9aa0e

Browse files
committed
some refinments for helm deployment
Signed-off-by: Thomas Telleis <[email protected]>
1 parent 356628a commit bf9aa0e

File tree

2 files changed

+66
-52
lines changed

2 files changed

+66
-52
lines changed

docs/deploy-and-configure/installation/scenario-k8s-deployment/files/graphdb-values.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
ingress:
55
enabled: false
66

7-
# Commercial license is required for using GraphDB Enterprise Edition features.
8-
# license:
7+
license:
98
# Reference to a secret containing 'graphdb.license' file that will be mounted in the GraphDB pod.
109
# The value is processed as a Helm template.
11-
# existingSecret: ""
10+
existingSecret: "graphdb-license"
1211
# File name of the GraphDB license file in the existing license secret.
1312
# The default is graphdb.license, but it can be changed to map to a different secret key.
14-
# licenseFilename: graphdb.license
13+
licenseFilename: graphdb.license
1514

1615
resources:
1716
limits:

docs/deploy-and-configure/installation/scenario-k8s-deployment/index.md

Lines changed: 63 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,39 @@ The code examples in this section assumes that you have POSIX-compliant shell (l
1919
- If deploying on K3D, download a static binary from https://github.com/k3d-io/k3d/releases (or use the script at https://k3d.io/ to do the same).
2020

2121

22-
2322
## Architecture
2423
![CMEM Helm Chart Architecture](images/cmem-helm-architecture.svg)
2524

2625

26+
## General notice
27+
28+
Though in this document value files for the three charts are listed we suggest to always have a look at the default value.yaml file from archive or repository. The examples shown here are very basic and should not represent a production environment. Also the CHANGELOG.md and README.md files in the archives or repositories can give some insights.
29+
30+
We assume a namespaces are already created. You can either deploy all three components into one namespace or into separate ones.
31+
32+
```console
33+
kubectl create namespace graphdb
34+
kubectl create namespace keycloak
35+
kubectl create namespace cmem
36+
```
2737

2838
## Installation GraphDB
2939

3040
To install GraphDB, we will use the Ontotext Helm chart.
41+
You can get the source code from [github](https://github.com/Ontotext-AD/graphdb-helm/tree/main).
42+
Also always have a look at GraphDBs [documentation page](https://graphdb.ontotext.com/documentation/).
3143

32-
### 1. Add the Ontotext Helm repository
44+
Be aware, that with Version 11 of GraphDB you are required to deploy a license file, even in the Free edition.
45+
You can [aquire one by filling a form.](https://www.ontotext.com/products/graphdb/). See also documentation [here](https://graphdb.ontotext.com/documentation/11.1/licensing.html).
3346

34-
First, add the Ontotext repository to Helm:
47+
### 1. Obtain the chart
48+
49+
You can download their chart from [github](https://github.com/Ontotext-AD/graphdb-helm/releases) or add their repository
50+
to your environment with Helm:
3551

3652
```console
3753
helm repo add ontotext https://maven.ontotext.com/repository/helm-public/
3854
helm repo update
39-
4055
```
4156

4257
### 2. Create a `graphdb-values.yaml` file
@@ -46,7 +61,7 @@ For a basic setup, you can start with an empty file and add configurations as ne
4661
For production, you should configure persistence, resource limits, and any specific GraphDB settings.
4762
Download a [basic example value file](files/graphdb-values.yaml) (`graphdb-values.yaml`).
4863

49-
Here is an example that disables ingress and sets resources, persistence and security:
64+
Here is a minimal example that disables ingress and sets resources, persistence and security:
5065

5166
```yaml
5267
ingress:
@@ -60,6 +75,14 @@ resources:
6075
memory: 4Gi
6176
cpu: 500m
6277

78+
license:
79+
# Reference to a secret containing 'graphdb.license' file that will be mounted in the GraphDB pod.
80+
# The value is processed as a Helm template.
81+
existingSecret: "graphdb-license"
82+
# File name of the GraphDB license file in the existing license secret.
83+
# The default is graphdb.license, but it can be changed to map to a different secret key.
84+
licenseFilename: graphdb.license
85+
6386
security:
6487
enabled: true
6588
provisioningUsername: provisioner
@@ -78,11 +101,13 @@ persistence:
78101
79102
### 3. Install the GraphDB chart
80103
81-
Now, install the GraphDB chart using Helm:
104+
First create the license mentioned above, then install the GraphDB chart using Helm:
82105
83106
```console
107+
kubectl --namespace graphdb create secret generic graphdb-license --from-file graphdb.license
108+
84109
helm upgrade -i graphdb ontotext/graphdb \
85-
--namespace graphdb --create-namespace \
110+
--namespace graphdb \
86111
-f graphdb-values.yaml
87112
```
88113

@@ -95,13 +120,13 @@ To access the GraphDB UI without exposing it via an Ingress, you can use `kubect
95120
First, get the name of the GraphDB service:
96121

97122
```console
98-
kubectl get svc -n graphdb
123+
kubectl get svc --namespace graphdb
99124
```
100125

101126
Assuming the service is named `graphdb`, forward a local port to the service port (7200):
102127

103128
```console
104-
kubectl port-forward svc/graphdb 7200:7200 -n graphdb
129+
kubectl port-forward svc/graphdb 7200:7200 --namespace graphdb
105130
```
106131

107132
Now you can access the GraphDB workbench in your browser at [http://localhost:7200](http://localhost:7200).
@@ -111,7 +136,7 @@ Now you can access the GraphDB workbench in your browser at [http://localhost:72
111136

112137
This guide provides instructions on how to install Keycloak using the provided Helm chart.
113138

114-
### 1. Obtain the Chart
139+
### 1. Obtain the chart
115140

116141
```console
117142
helm repo add --force-update eccenca https://helm.eccenca.com
@@ -135,18 +160,11 @@ cd keycloak-helm
135160

136161
Assuming you have the chart in a local directory named `keycloak-chart`.
137162

138-
### 2. Create a namespace
139-
140-
We will use the `keycloak` namespace.
141-
142-
```console
143-
kubectl create namespace keycloak
144-
```
145-
146163
### 3. Create a `keycloak-values.yaml` file
147164

148165
Create a file named `keycloak-values.yaml` to configure your Keycloak deployment. At a minimum, you should configure the initial admin credentials and the ingress settings.
149166
You can also [download the minimum file here:](files/keycloak-values.yaml) (`keycloak-values.yaml`).
167+
150168
```yaml
151169
---
152170
postgres:
@@ -184,16 +202,19 @@ Use `helm` to deploy the chart into the `keycloak` namespace.
184202
With local extracted helm chart:
185203
```console
186204
helm upgrade -i keycloak ./keycloak-helm \
187-
--namespace keycloak --create-namespace\
205+
--namespace keycloak \
188206
-f keycloak-values.yaml
189207
```
190208

191209
Or from helm repository:
192210

193211
```console
194212
helm upgrade -i keycloak eccenca/keycloak-helm \
195-
--namespace keycloak --create-namespace\
213+
--namespace keycloak \
196214
-f keycloak-values.yaml
215+
216+
# if you use sqldump provisioning you have to restart keycloak:
217+
kubectl --namespace keycloak delete pods/keycloak-0
197218
```
198219

199220
This command will install the Keycloak chart in the `gemkeycloak` namespace using your custom configuration.
@@ -213,7 +234,7 @@ echo "https://<your-keycloak-hostname>/auth"
213234
This guide provides instructions on how to install the chart using `kubectl` and `helm`.
214235
You need to have a keycloak instance and a supported graph database installed.
215236

216-
### 1. Download the chart or use our helm repository or clone the repository
237+
### 1. Obtain the chart
217238

218239
```console
219240
wget https://releases.eccenca.com/cmem-helm/latest.tgz
@@ -232,16 +253,7 @@ git clone https://gitlab.eccenca.com/cmem/cmem-helm.git
232253
cd cmem-helm
233254
```
234255

235-
### 2. Create a namespace
236-
237-
It is recommended to install CMEM in its own namespace.
238-
239-
```console
240-
kubectl create namespace <your-namespace>
241-
```
242-
Replace `<your-namespace>` with the desired namespace (e.g., `cmem`).
243-
244-
### 3. Create Docker registry credentials
256+
### 2. Create Docker registry credentials
245257

246258
To pull the CMEM images, you need to provide credentials to your Docker registry.
247259

@@ -250,11 +262,11 @@ kubectl create secret docker-registry eccenca-docker-registry-credentials \
250262
--docker-server=https://docker-registry.eccenca.com \
251263
--docker-username=<your-docker-username> \
252264
--docker-password=<your-docker-password> \
253-
-n <your-namespace>
265+
--namespace <your-namespace>
254266
```
255267
Replace the placeholders with the provided registry details and credentials.
256268

257-
### 3b. (optional) Create cmem license secret
269+
### 2b. (optional) Create cmem license secret
258270

259271
By default, Corporate Memory is subject to the eccenca free Personal, Evaluation and Development License Agreement (PEDAL), a license intended for non-commercial usage.
260272

@@ -263,23 +275,26 @@ If you have a dedicated license file, create a secret with a `license.asc` data
263275
```console
264276
kubectl create secret generic cmem-license \
265277
--from-file license.asc
266-
-n <your-namespace>
278+
--namespace <your-namespace>
267279
```
268280

269281
Then, add the secret name to your `values.yaml` file for the key `global.license`.
270282

271283
For more background on license, see also: https://documentation.eccenca.com/latest/deploy-and-configure/configuration/dataplatform/application-full/
272284

273-
### 4. Configure your deployment
285+
### 3. Configure your deployment
274286

275-
Copy the `values.sample.yaml` to a new file, for example `my-values.yaml`.
287+
Create a file named `cmem-values.yaml` to configure your Corporate Memory deployment.
288+
At a minimum, you should configure the
289+
- `hostname`, under which the deployment is reachable later
290+
- `cmemClientSecret`, if you use the postgres provisioning dump the default is fine
291+
- `keycloakBaseUrl` and `keycloakIssuerUrl`, where keycloak and the realm can be found
292+
- `explore.store.graphdb`-values as database connection
293+
- `ingress`-values like host and tls.secretName, if you use certmanager.
276294

277-
```console
278-
cp values.sample.yaml my-values.yaml
279-
```
295+
You can also [download the minimum file here:](files/cmem-values.yaml) (`cmem-values.yaml`).
280296

281-
Edit `my-values.yaml` and adjust the configuration to your needs.
282-
At a minimum, you will need to configure the hostname, and connection details for your Ingress or Route, Keycloak and GraphDB.
297+
Edit `cmem-values.yaml` and adjust the configuration to your needs.
283298

284299
```yaml
285300
ingress:
@@ -308,14 +323,14 @@ global:
308323
cmemClientId: cmem-service-account
309324
cmemClientSecret: c8c12828-000c-467b-9b6d-2d6b5e16df4a
310325
hostname: "<your-hostname>"
311-
keycloakBaseUrl: https://<your-keycloak-hostname>/auth/'
312-
keycloakIssuerUrl: https://<your-keycloak-hostname>/auth/realms/cmem'
326+
keycloakBaseUrl: https://<your-keycloak-hostname>/auth/
327+
keycloakIssuerUrl: https://<your-keycloak-hostname>/auth/realms/cmem
313328
314329
# If you specified customCACerts, an initContainer is added to DI and EXPLORE to append your custom CA to the system-wide TrustStore.
315330
# Here you can optionally specify resource requests and limits for that initContainer.
316331
customCACerts: {}
317332
318-
# (optional if 3b was created)
333+
# (optional if 2b was created)
319334
# license: cmem-license
320335
321336
explore:
@@ -360,12 +375,12 @@ _See [helm install](https://helm.sh/docs/helm/helm_install/) for command documen
360375
After the installation is complete, you can check the status of the pods:
361376

362377
```console
363-
kubectl get pods -n <your-namespace>
378+
kubectl get pods --namespace <your-namespace>
364379
```
365380

366-
You can also check the rollout status of the statefulsets:
381+
You can also check the rollout status of the StatefulSets:
367382

368383
```console
369-
kubectl rollout status statefulset/explore -n <your-namespace>
370-
kubectl rollout status statefulset/dataintegration -n <your-namespace>
384+
kubectl rollout status statefulset/explore --namespace <your-namespace>
385+
kubectl rollout status statefulset/dataintegration --namespace <your-namespace>
371386
```

0 commit comments

Comments
 (0)