-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathdeploy.sh
41 lines (35 loc) · 1.47 KB
/
deploy.sh
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/env bash
if [ ! $# == 1 ]; then
echo "Invalid parameter (must be \"deploy\", \"redeploy\" or \"uninstall\")"
exit
fi
if [ "$1" = "deploy" ]; then
kubectl create -f deploy/namespace.yaml
kubectl create -f deploy/service-account.yaml
kubectl create -f deploy/cluster-role-binding.yaml
kubectl create -f deploy/gpu-mounter-workers.yaml
kubectl create -f deploy/gpu-mounter-master.yaml
kubectl create -f deploy/gpu-mounter-svc.yaml
elif [ "$1" = "redeploy" ]; then
kubectl delete -f deploy/namespace.yaml
kubectl delete -f deploy/service-account.yaml
kubectl delete -f deploy/cluster-role-binding.yaml
kubectl delete -f deploy/gpu-mounter-workers.yaml
kubectl delete -f deploy/gpu-mounter-master.yaml
kubectl delete -f deploy/gpu-mounter-svc.yaml
kubectl create -f deploy/namespace.yaml
kubectl create -f deploy/service-account.yaml
kubectl create -f deploy/cluster-role-binding.yaml
kubectl create -f deploy/gpu-mounter-workers.yaml
kubectl create -f deploy/gpu-mounter-master.yaml
kubectl create -f deploy/gpu-mounter-svc.yaml
elif [ "$1" = "uninstall" ]; then
kubectl delete -f deploy/namespace.yaml
kubectl delete -f deploy/service-account.yaml
kubectl delete -f deploy/cluster-role-binding.yaml
kubectl delete -f deploy/gpu-mounter-workers.yaml
kubectl delete -f deploy/gpu-mounter-master.yaml
kubectl delete -f deploy/gpu-mounter-svc.yaml
else
echo "Invalid parameter: $1 (must be \"deploy\", \"redeploy\" or \"uninstall\")"
fi