summaryrefslogtreecommitdiffstats
path: root/utils/infra_setup/heat_template
diff options
context:
space:
mode:
Diffstat (limited to 'utils/infra_setup/heat_template')
-rwxr-xr-xutils/infra_setup/heat_template/HOT_create_instance.sh32
1 files changed, 31 insertions, 1 deletions
diff --git a/utils/infra_setup/heat_template/HOT_create_instance.sh b/utils/infra_setup/heat_template/HOT_create_instance.sh
index 4de29b3a..8266229b 100755
--- a/utils/infra_setup/heat_template/HOT_create_instance.sh
+++ b/utils/infra_setup/heat_template/HOT_create_instance.sh
@@ -119,6 +119,34 @@ bottlenecks_create_instance()
-P "image=$IMAGE_NAME;key_name=$KEY_NAME;public_net=$PUBLIC_NET_NAME;flavor=$FLAVOR_NAME"
}
+bottlenecks_rubbos_wait_finish()
+{
+ echo "Start checking rubbos running status..."
+ retry=0
+ while true
+ do
+ ssh $ssh_args ec2-user@$control_ip "
+ FILE=/tmp/rubbos_finished
+ if [ -f \$FILE ]; then
+ exit 0
+ else
+ exit 1
+ fi
+ "
+ if [ $? = 0 ]; then
+ echo "Rubbos test case successfully finished :)"
+ return 0
+ fi
+ echo "Rubbos running $retry ..."
+ sleep 30
+ let retry+=1
+ if [[ $retry -ge $1 ]]; then
+ echo "Rubbos test case timeout :("
+ return 1
+ fi
+ done
+}
+
bottlenecks_rubbos_run()
{
echo "Run Rubbos"
@@ -141,7 +169,9 @@ bottlenecks_rubbos_run()
$BOTTLENECKS_REPO_DIR/utils/infra_setup/vm_dev_setup \
ec2-user@$control_ip:/tmp
ssh $ssh_args \
- ec2-user@$control_ip "bash /tmp/vm_dev_setup/setup_env.sh"
+ ec2-user@$control_ip "bash /tmp/vm_dev_setup/setup_env.sh" &
+
+ bottlenecks_rubbos_wait_finish 240
rm -rf $BOTTLENECKS_REPO_DIR/utils/infra_setup/vm_dev_setup/hosts.conf
}