审查视图

deploy/k8s/prd/install.sh 1.3 KB
tangxvhui authored
1 2
#!/bin/bash
export PATH=/root/local/bin:$PATH
Administrator authored
3
kubectl -n mmm-suplus-prd  get pods | grep -q mmm-partnermg
tangxvhui authored
4
if [ "$?" == "1" ];then
Administrator authored
5 6
	kubectl create -f /tmp/prd/partnermg/partner.yaml --record
	kubectl -n mmm-suplus-prd  get svc | grep -q mmm-partnermg
tangxvhui authored
7 8 9 10 11
	if [ "$?" == "0" ];then
		echo "partner service install success!"
	else
		echo "partner service install fail!"
	fi
Administrator authored
12
	kubectl -n mmm-suplus-prd  get pods | grep -q mmm-partnermg
tangxvhui authored
13 14 15 16 17 18
	if [ "$?" == "0" ];then
		echo "partner deployment install success!"
	else
		echo "partner deployment install fail!"
	fi
else
Administrator authored
19 20
	kubectl delete -f /tmp/prd/partnermg/partner.yaml
	kubectl -n mmm-suplus-prd  get svc | grep -q mmm-partnermg
tangxvhui authored
21 22
	while [ "$?" == "0" ]
	do
Administrator authored
23
	kubectl -n mmm-suplus-prd  get svc | grep -q mmm-partnermg
tangxvhui authored
24
	done
Administrator authored
25
	kubectl -n mmm-suplus-prd  get pods | grep -q mmm-partnermg
tangxvhui authored
26 27
	while [ "$?" == "0" ]
	do
Administrator authored
28
	kubectl -n mmm-suplus-prd  get pods | grep -q mmm-partnermg
tangxvhui authored
29
	done
Administrator authored
30 31
	kubectl create -f /tmp/prd/partnermg/partner.yaml --record
	kubectl -n mmm-suplus-prd  get svc | grep -q mmm-partnermg
tangxvhui authored
32 33 34 35 36
	if [ "$?" == "0" ];then
		echo "partner service update success!"
	else
		echo "partner service update fail!"
	fi
Administrator authored
37
	kubectl -n mmm-suplus-prd  get pods | grep -q mmm-partnermg
tangxvhui authored
38 39 40 41 42 43
	if [ "$?" == "0" ];then
		echo "partner deployment update success!"
	else
		echo "partner deployment update fail!"
	fi
fi