Skip to content

Commit

Permalink
Switches to bitnami ZK chart with ZK 3.5 (fixes #21)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdmars committed Nov 17, 2020
1 parent b6756f8 commit 17ceac6
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 38 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ These charts install the Stardog Knowledge Graph platform on Kubernetes.

Stardog documentation: https://www.stardog.com/docs

Highlights
----------

As of version 2.0.0 of the Stardog Helm charts, ZooKeeper 3.5.7 is now deployed
with the [Bitnami](https://github.com/bitnami/charts/tree/master/bitnami/zookeeper)
ZooKeeper chart. Stardog 7.4.2 includes preview support for ZooKeeper 3.5.x so you
must be running that version of Stardog or later. Please see the Stardog chart
[README](https://github.com/stardog-union/helm-charts/blob/master/charts/stardog/README.md)
for instructions on how to upgrade from version 1.x of the charts to version 2.

Prerequisites
-------------

Expand Down
8 changes: 4 additions & 4 deletions charts/stardog/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: zookeeper
repository: http://storage.googleapis.com/kubernetes-charts-incubator
version: 2.1.3
digest: sha256:03cb94c88488971715a622d10d7861daa5f64f12404a484fd9c925d2e5fb9944
generated: "2020-04-24T15:50:19.337283-05:00"
repository: https://charts.bitnami.com/bitnami
version: 5.5.1
digest: sha256:50505e713c532691af6a8907b008b9e6a4dd5c5c6f3889ae72b82424f841ebcc
generated: "2020-11-12T15:01:34.784401-06:00"
4 changes: 2 additions & 2 deletions charts/stardog/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ maintainers:
url: https://www.stardog.com
dependencies:
- name: zookeeper
version: 2.1.3
repository: http://storage.googleapis.com/kubernetes-charts-incubator
version: 5.5.1
repository: https://charts.bitnami.com/bitnami
condition: zookeeper.enabled
20 changes: 20 additions & 0 deletions charts/stardog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,26 @@ to run the steps on the Stardog home directories in the PVCs.
See the [Stardog documentation](https://www.stardog.com/docs/#_upgrading_the_cluster)
for instructuions on how to upgrade Stardog Cluster.

### Upgrading from 1.x to 2.x

Version 2.x of the charts deploys ZooKeeper 3.5 instead of 3.4. Before upgrading the
charts make sure you have upgraded to Stardog 7.4.2 or later, which includes preview
support for ZooKeeper 3.5.

After upgrading Stardog you can upgrade the charts by taking down your full deployment
of Stardog and ZooKeeper pods (but do not delete the PVCs with Stardog home data) by
following this process:
- Stop all traffic and updates to your cluster or wait for them to end. You can ensure there
are no transactions running on a database with `stardog-admin db status <db name>`.
- Backup Stardog home and copy the backup out of the k8s environment. The
[Stardog documentation](https://www.stardog.com/docs/#_backing_up_and_restoring) includes
an overview of the various options for backing up Stardog. Only S3 backups will copy
data outside of the pods. If you use another backup method you will need to manually
copy the data off the volume or snapshot the volumes to ensure the data is stored in
a separate location.
- Shutdown all Stardog and ZooKeeper pods (e.g. using `helm delete`).
- Install the new 2.x charts with the same version of Stardog you were running previously.

Limitations
-----------

Expand Down
2 changes: 1 addition & 1 deletion charts/stardog/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ metadata:
data:
{{- (.Files.Glob "files/stardog.properties").AsConfig | nindent 2 }}
pack.enabled={{ .Values.cluster.enabled }}
pack.zookeeper.address={{ if .Values.zookeeper.enabled }} {{- template "zkservers" . }} {{ else }} {{ .Values.zookeeper.addresses }} {{ end }}
pack.zookeeper.address={{ if .Values.zookeeper.enabled }}{{- template "zkservers" . }}{{ else }}{{ .Values.zookeeper.addresses }}{{ end }}
pack.node.join.retry.count=15
pack.node.join.retry.delay=1m
2 changes: 1 addition & 1 deletion charts/stardog/templates/post-install-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ spec:
items:
- key: password
path: adminpw
mode: 400
mode: 444
51 changes: 21 additions & 30 deletions charts/stardog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ readinessProbe:


# Settings to use for the ZooKeeper chart that Stardog depends on.
# Stardog requires ZooKeeper 3.4.x.
# The full set of options can be found on the bitname ZK chart:
# https://github.com/bitnami/charts/tree/master/bitnami/zookeeper
zookeeper:
enabled: true
replicaCount: 3
Expand All @@ -108,33 +109,23 @@ zookeeper:
memory: 2Gi
cpu: 1
image:
repository: stardog/k8szk
tag: 3.4.14
repository: bitnami/zookeeper
tag: 3.5.7
pullPolicy: IfNotPresent
env:
ZK_LOG_LEVEL: INFO
ZK_DATA_DIR: /data
ZK_DATA_LOG_DIR: /data/datalog
ZK_LOG_DIR: /data/log
command:
- /bin/bash
- -xec
- zkGenConfig.sh && exec zkServer.sh start-foreground
livenessProbe:
exec:
command:
- zkOk.sh
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
readinessProbe:
exec:
command:
- zkOk.sh
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
logLevel: INFO
# livenessProbe:
# enabled: true
# initialDelaySeconds: 30
# periodSeconds: 10
# timeoutSeconds: 5
# failureThreshold: 6
# successThreshold: 1
# probeCommandTimeout: 2
# readinessProbe:
# enabled: true
# initialDelaySeconds: 5
# periodSeconds: 10
# timeoutSeconds: 5
# failureThreshold: 6
# successThreshold: 1
# probeCommandTimeout: 2
4 changes: 4 additions & 0 deletions tests/smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ function helm_install_stardog_cluster_with_zookeeper() {

if [ ${rc} -ne 0 ]; then
echo "Helm install for Stardog Cluster failed, exiting"
echo "Listing pods"
kubectl -n ${NAMESPACE} get pods
echo "Listing services"
kubectl -n ${NAMESPACE} get svc
exit ${rc}
fi

Expand Down

0 comments on commit 17ceac6

Please sign in to comment.