-
Notifications
You must be signed in to change notification settings - Fork 0
/
upgrade_pangeo
executable file
·26 lines (21 loc) · 1.16 KB
/
upgrade_pangeo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
set -e
# replace secrets
TOKEN=`cat .proxytoken`
sed -i '' -e "s/^ secretToken.*/ secretToken: \"$TOKEN\"/" secret-config.yaml
ID=`cat .clientid`
sed -i '' -e "s/^ clientId.*/ clientId: \"$ID\"/" secret-config.yaml
SECRET=`cat .clientsecret`
sed -i '' -e "s/^ clientSecret.*/ clientSecret: \"$SECRET\"/" secret-config.yaml
# update repo
helm repo add jupyterhub https://jupyterhub.github.io/helm-chart
helm repo update
# upgrade pangeo
echo "Upgrading pangeo."
#helm upgrade --force --recreate-pods --timeout=600 pangeo jupyterhub/jupyterhub --version=v0.7-d540c9f -f jupyter-config.yaml -f secret-config.yaml
#helm upgrade --force --recreate-pods --timeout=600 pangeo jupyterhub/jupyterhub --version=v0.7 -f jupyter-config.yaml -f secret-config.yaml
helm upgrade --force --recreate-pods --timeout=600 pangeo jupyterhub/jupyterhub --version=v0.8-676f4f3 -f jupyter-config.yaml -f secret-config.yaml
# unreplace secrets
sed -i '' -e "s/^ secretToken.*/ secretToken: SECRET/" secret-config.yaml
sed -i '' -e "s/^ clientId.*/ clientId: ID/" secret-config.yaml
sed -i '' -e "s/^ clientSecret.*/ clientSecret: SECRET/" secret-config.yaml