|
|
#!/bin/bash
|
|
|
export PATH=/root/local/bin:$PATH
|
|
|
kubectl -n mmm-suplus-dev get pods | grep -q mmmopp
|
|
|
kubectl -n mmm-suplus-dev get pods | grep -q mmmopenapi
|
|
|
if [ "$?" == "1" ];then
|
|
|
kubectl create -f /tmp/dev/mmm-go-opp/opp.yaml --record
|
|
|
kubectl -n mmm-suplus-dev get svc | grep -q mmmopp
|
|
|
kubectl -n mmm-suplus-dev get svc | grep -q mmmopenapi
|
|
|
if [ "$?" == "0" ];then
|
|
|
echo "mmmopp service install success!"
|
|
|
echo "mmmopenapi service install success!"
|
|
|
else
|
|
|
echo "mmmopp service install fail!"
|
|
|
echo "mmmopenapi service install fail!"
|
|
|
fi
|
|
|
kubectl -n mmm-suplus-dev get pods | grep -q mmmopp
|
|
|
kubectl -n mmm-suplus-dev get pods | grep -q mmmopenapi
|
|
|
if [ "$?" == "0" ];then
|
|
|
echo "mmmopp deployment install success!"
|
|
|
echo "mmmopenapi deployment install success!"
|
|
|
else
|
|
|
echo "mmmopp deployment install fail!"
|
|
|
echo "mmmopenapi deployment install fail!"
|
|
|
fi
|
|
|
else
|
|
|
kubectl delete -f /tmp/dev/mmm-go-opp/opp.yaml
|
|
|
kubectl -n mmm-suplus-dev get svc | grep -q mmmopp
|
|
|
kubectl -n mmm-suplus-dev get svc | grep -q mmmopenapi
|
|
|
while [ "$?" == "0" ]
|
|
|
do
|
|
|
kubectl -n mmm-suplus-dev get svc | grep -q mmmopp
|
|
|
kubectl -n mmm-suplus-dev get svc | grep -q mmmopenapi
|
|
|
done
|
|
|
kubectl -n mmm-suplus-dev get pods | grep -q mmmopp
|
|
|
kubectl -n mmm-suplus-dev get pods | grep -q mmmopenapi
|
|
|
while [ "$?" == "0" ]
|
|
|
do
|
|
|
kubectl -n mmm-suplus-dev get pods | grep -q mmmopp
|
|
|
kubectl -n mmm-suplus-dev get pods | grep -q mmmopenapi
|
|
|
done
|
|
|
kubectl create -f /tmp/dev/mmm-go-opp/opp.yaml --record
|
|
|
kubectl -n mmm-suplus-dev get svc | grep -q mmmopp
|
|
|
kubectl -n mmm-suplus-dev get svc | grep -q mmmopenapi
|
|
|
if [ "$?" == "0" ];then
|
|
|
echo "mmmopp service update success!"
|
|
|
echo "mmmopenapi service update success!"
|
|
|
else
|
|
|
echo "opp service update fail!"
|
|
|
fi
|
...
|
...
|
|