-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchris_deploy.bash
More file actions
41 lines (39 loc) · 1.33 KB
/
chris_deploy.bash
File metadata and controls
41 lines (39 loc) · 1.33 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/bash
input=''
if oc whoami &> /dev/null; then
echo "User logged in"
else
echo "User not logged in. Aborting"
exit
fi
echo "Enter a deployment name:"
read release_name
if [ "$input" = '' ]; then
release_name="chris1"
else
release_name="chris-$input"
fi
pfcon_deploy="$release_name-pfcon"
helm repo add fnndsc https://fnndsc.github.io/charts
helm repo update
echo "Deploy ChRIS with OTEL instrumentation? (y/n): "
read instrument
if [ "$instrument" = "y" ]; then
echo "Deploying ChRIS with annotation"
helm upgrade --install --values chris_annotated.yaml $release_name fnndsc/chris
oc annotate deployment -l app.kubernetes.io/name=pfcon instrumentation.opentelemetry.io/inject-python='true'
oc annotate pod -l app.kubernetes.io/name=pfcon instrumentation.opentelemetry.io/inject-python='true'
oc rollout restart deployment/$pfcon_deploy
elif [ "$instrument" = "n" ]; then
echo "Deploying ChRIS without annotation"
helm upgrade --install --values chris_base.yaml $release_name fnndsc/chris
else
echo "Invalid response. Aborting"
exit
fi
# #---------------------Testing Block--------------------------------
# # for testing confirmation
# oc get pods
# # for testing - instant deletion
# helm uninstall $release_name
# #-------------------------------------------------------------------------