summaryrefslogtreecommitdiffstats
path: root/tests/k8s-cloudify-clearwater.sh
diff options
context:
space:
mode:
authorBryan Sullivan <bryan.sullivan@att.com>2018-02-08 18:08:32 -0800
committerBryan Sullivan <bryan.sullivan@att.com>2018-02-09 10:53:09 -0800
commit50a5371ecd17f03089df1d2142b5479e86cd6479 (patch)
tree3c8ea4e0ce0c6cf2ecd06c1058860abfaac78f99 /tests/k8s-cloudify-clearwater.sh
parent2cbdcfde1374b934ee19af4335ae22b13684b294 (diff)
Wait for homestead-prov to be deleted before redeploying
JIRA: MODELS-2 Correct retrieval of node_port from cloudify Change-Id: Idf510667988050d586c72a4d8642aeb2803bef55 Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
Diffstat (limited to 'tests/k8s-cloudify-clearwater.sh')
-rw-r--r--tests/k8s-cloudify-clearwater.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/k8s-cloudify-clearwater.sh b/tests/k8s-cloudify-clearwater.sh
index 9696b0b..133691f 100644
--- a/tests/k8s-cloudify-clearwater.sh
+++ b/tests/k8s-cloudify-clearwater.sh
@@ -137,6 +137,15 @@ kubectl cp $hpod:/usr/share/clearwater/bin/clearwater-socket-factory-sig-wrapper
kubectl cp $hpod:/usr/share/clearwater/bin/clearwater-socket-factory-mgmt-wrapper ~/tmp/clearwater-socket-factory-mgmt-wrapper -c homestead
kubectl delete deployment --namespace default homestead-prov
kubectl delete service --namespace default homestead-prov
+
+hppod=$(kubectl get pods --namespace default | awk '/homestead-prov/ {print $1}')
+while [[ "$hppod" != "" ]] ; do
+ echo "waiting 10 seconds for homestead-prov to be deleted..."
+ sleep 10
+ hppod=$(kubectl get pods --namespace default | awk '/homestead-prov/ {print $1}')
+done
+
+echo "Redeploying homestead-prov..."
cd clearwater-docker/kubernetes
kubectl apply -f homestead-prov-depl.yaml
kubectl apply -f homestead-prov-svc.yaml
@@ -147,6 +156,7 @@ while [[ "$hppod" == "null" ]] ; do
sleep 10
hppod=$(kubectl get pods --namespace default | awk '/homestead-prov/ {print $1}')
done
+
status=$(kubectl get pods -o json --namespace default $hppod | jq -r '.status.phase')
while [[ "$status" != "Running" ]]; do
echo; echo "$hppod is $status ... waiting 10 seconds"