diff options
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/infra_setup/heat_template/HOT_create_instance.sh | 32 | ||||
-rwxr-xr-x | utils/infra_setup/vm_dev_setup/setup_env.sh | 2 |
2 files changed, 31 insertions, 3 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 } diff --git a/utils/infra_setup/vm_dev_setup/setup_env.sh b/utils/infra_setup/vm_dev_setup/setup_env.sh index bd0ffb56..f1572e05 100755 --- a/utils/infra_setup/vm_dev_setup/setup_env.sh +++ b/utils/infra_setup/vm_dev_setup/setup_env.sh @@ -104,8 +104,6 @@ bottlenecks_rubbos_install_exe() cd $RUBBOS_RUN_DIR sudo ./run.sh - cd $RUBBOS_EXE_DIR - sudo ./CONTROL_rubbos_exec.sh } main() |