3 if [ -z "$WORKSPACE" ]; then
4 export WORKSPACE=`git rev-parse --show-toplevel`
7 source $WORKSPACE/test/ete/scripts/install_openstack_cli.sh
9 $WORKSPACE/test/ete/scripts/teardown-onap.sh
11 STACK="ete-$(uuidgen | cut -c-8)"
12 echo "New Stack Name: ${STACK}"
15 SENTINEL='Docker versions and branches'
16 YAML_FILE=${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml
17 ENV_FILE=${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env
18 cp ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.env ${WORKSPACE}/test/ete/labs/windriver/onap-openstack-demo.env
19 envsubst < ${WORKSPACE}/test/ete/labs/windriver/onap-openstack-template.env | sed -n "1,/${SENTINEL}/p" > ${ENV_FILE}
20 pushd ${ONAP_WORKDIR}/demo
21 echo " # Rest of the file was AUTO-GENERATED from"
22 echo " #" $(git config --get remote.origin.url) heat/ONAP/onap_openstack.env $(git rev-parse HEAD) | tee -a ${ENV_FILE}
24 sed "1,/${SENTINEL}/d" ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.env >> ${ENV_FILE}
27 #diff ${WORKSPACE}/test/ete/labs/windriver/onap-openstack-template.env ${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env
29 openstack stack create -t ${YAML_FILE} -e ${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env $STACK
31 while [ "CREATE_IN_PROGRESS" == "$(openstack stack show -c stack_status -f value $STACK)" ]; do
35 STATUS=$(openstack stack show -c stack_status -f value $STACK)
37 if [ "CREATE_COMPLETE" != "$STATUS" ]; then
42 # wait until Robot VM initializes
43 ROBOT_IP=$($WORKSPACE/test/ete/scripts/get-floating-ip.sh onap-robot)
44 echo "ROBOT_IP=${ROBOT_IP}"
46 if [ "" == "${ROBOT_IP}" ]; then
50 ssh-keygen -R ${ROBOT_IP}
52 SSH_KEY=~/.ssh/onap_key
54 until ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "docker ps | grep -q openecompete_container"