install.sh
1.7 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
42
43
#!/bin/bash
export PATH=/root/local/bin:$PATH
kubectl -n mmm-suplus-preonline get pods | grep -q allied-creation-gateway
if [ "$?" == "1" ];then
kubectl create -f /tmp/preonline/allied-creation-gateway/allied-creation-gateway.yaml --record
kubectl -n mmm-suplus-preonline get svc | grep -q allied-creation-gateway
if [ "$?" == "0" ];then
echo "allied-creation-gateway service install success!"
else
echo "allied-creation-gateway service install fail!"
fi
kubectl -n mmm-suplus-preonline get pods | grep -q allied-creation-gateway
if [ "$?" == "0" ];then
echo "allied-creation-gateway deployment install success!"
else
echo "allied-creation-gateway deployment install fail!"
fi
else
kubectl delete -f /tmp/preonline/allied-creation-gateway/allied-creation-gateway.yaml
kubectl -n mmm-suplus-preonline get svc | grep -q allied-creation-gateway
while [ "$?" == "0" ]
do
kubectl -n mmm-suplus-preonline get svc | grep -q allied-creation-gateway
done
kubectl -n mmm-suplus-preonline get pods | grep -q allied-creation-gateway
while [ "$?" == "0" ]
do
kubectl -n mmm-suplus-preonline get pods | grep -q allied-creation-gateway
done
kubectl create -f /tmp/preonline/allied-creation-gateway/allied-creation-gateway.yaml --record
kubectl -n mmm-suplus-preonline get svc | grep -q allied-creation-gateway
if [ "$?" == "0" ];then
echo "allied-creation-gateway service update success!"
else
echo "allied-creation-gateway service update fail!"
fi
kubectl -n mmm-suplus-preonline get pods | grep -q allied-creation-gateway
if [ "$?" == "0" ];then
echo "allied-creation-gateway deployment update success!"
else
echo "allied-creation-gateway deployment update fail!"
fi
fi