diff options
author | 2017-11-09 12:08:24 -0800 | |
---|---|---|
committer | 2017-11-09 12:19:21 -0800 | |
commit | 778b41b9d03f3207a0b17ed98a0d86b16a1e5ba0 (patch) | |
tree | 0a1e95a7dbf7ec0aed96f3cbc7481d08980457ac /test/ete/scripts/deploy-onap.sh | |
parent | 515751060997a09519b2d41e856d6ff488429aab (diff) |
Modify deploy to wait until Robot initializes
Issue-ID: INT-278
Change-Id: I8292525db6d2ac74080d46924eb5382ba4b7f427
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'test/ete/scripts/deploy-onap.sh')
-rwxr-xr-x | test/ete/scripts/deploy-onap.sh | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/test/ete/scripts/deploy-onap.sh b/test/ete/scripts/deploy-onap.sh index 5ed30a13f..5c46785fc 100755 --- a/test/ete/scripts/deploy-onap.sh +++ b/test/ete/scripts/deploy-onap.sh @@ -35,9 +35,29 @@ envsubst < ${WORKSPACE}/test/ete/labs/windriver/onap-openstack-template.env > ${ openstack stack create -t ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml -e ${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env $STACK while [ "CREATE_IN_PROGRESS" == "$(openstack stack show -c stack_status -f value $STACK)" ]; do - sleep 10 + sleep 15 done STATUS=$(openstack stack show -c stack_status -f value $STACK) echo $STATUS -[ "CREATE_COMPLETE" == "$STATUS" ] +if [ "CREATE_COMPLETE" != "$STATUS" ]; then + exit 1 +fi + + +# wait until Robot VM initializes +ROBOT_IP=$(./get-floating-ip.sh onap-robot) +echo "ROBOT_IP=${ROBOT_IP}" + +if [ "" == "${ROBOT_IP}" ]; then + exit 1 +fi + +ssh-keygen -R ${ROBOT_IP} + +SSH_KEY=~/.ssh/onap_key + +until ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "docker ps | grep -q openecompete_container" +do + sleep 1m +done |