Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove DataHub from Helm and improve refresh script #496

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions chart/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ dependencies:
- name: airflow
repository: https://airflow.apache.org/
version: 1.14.0
- name: datahub
repository: https://helm.datahubproject.io
version: 0.4.19
- name: mlflow
repository: https://charts.bitnami.com/bitnami
version: 1.4.16
digest: sha256:6ce3b5cc3d2fdd19e247e70adf8b7938a34f095cda2aaa3b99f395ff24298f0c
generated: "2024-08-02T11:23:31.972755-06:00"
digest: sha256:0ec882cefcbc92ee4533948bd6002e8e95f9d80d36c1143a53f5e568baf58599
generated: "2024-11-07T16:11:17.37458-07:00"
6 changes: 0 additions & 6 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ dependencies:
condition: airflow.enabled
tags:
- digitalTwin
- name: datahub
version: 0.4.19
repository: https://helm.datahubproject.io
condition: datahub.enabled
tags:
- digitalTwin
- name: mlflow
version: 1.4.16
repository: https://charts.bitnami.com/bitnami
Expand Down
54 changes: 49 additions & 5 deletions chart/helm-refresh.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
#!/bin/bash

dependencies='false'
help='false'
pvc='false'
timeout="5m0s"

while getopts dpht: flag
do
case "${flag}" in
d) dependencies='true';;
p) pvc='true';;
t) timeout=${OPTARG};;
h) help='true';;
esac
done

if $help; then
printf "This script uninstalls a helm release (named \"dl1\" by default), "
printf "deletes all persistent volume claims if passed the p option, "
printf "deletes any old deeplynx helm pacakges, "
printf "updates helm dependencies if passed the d option, creates a new "
printf "helm package, and then installs the package."
printf "\n\n"
printf "Options:"
printf "\n"
printf " -h Show this help\n"
printf " -d Update helm dependencies\n"
printf " -t Provide install timeout in the form XmYs where X is the number of minutes\n"
printf " and Y is the number of seconds. Default 5m0s.\n"
printf " -p Delete persistent volume claims\n"

exit 0
fi

error_occurred=false

printf "Refreshing helm release...\n\n"
Expand All @@ -9,24 +42,35 @@ helm uninstall dl1

printf "\n"

# delete persistnce volume claims
kubectl delete pvc --all
if [ $? -ne 0 ]; then error_occurred=true; fi
# optionally delete persistent volume claims
if $pvc; then
kubectl delete pvc --all
if [ $? -ne 0 ]; then error_occurred=true; fi

printf "\n"
printf "\n"
fi

# delete any old deeplynx helm packages
find . -name '*.tgz' -delete -maxdepth 1
if [ $? -ne 0 ]; then error_occurred=true; fi

# optionally update helm dependencies
if $dependencies; then
printf "Updating helm dependencies...\n\n"

helm dependency update
if [ $? -ne 0 ]; then error_occurred=true; fi
fi

# create a new helm package
helm package .
if [ $? -ne 0 ]; then error_occurred=true; fi

printf "\n"
printf "Starting install with timeout $timeout\n\n"

# install the new package
helm install dl1 deeplynx-0.1.0.tgz
helm install dl1 deeplynx-0.1.0.tgz --timeout ${timeout}
if [ $? -ne 0 ]; then error_occurred=true; fi

if $error_occurred; then
Expand Down
2 changes: 0 additions & 2 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ airflow:
# whether to load example DAGs
load_examples: true

datahub:
enabled: false

mlflow:
enabled: false
Expand Down