summaryrefslogtreecommitdiffstats
path: root/utils/infra_setup/vm_dev_setup/setup_env.sh
diff options
context:
space:
mode:
authorQiLiang <liangqi1@huawei.com>2016-01-04 10:46:37 +0000
committerQiLiang <liangqi1@huawei.com>2016-01-05 11:07:27 +0000
commit9d958be25bb348ab08f320b04b8a0e47cce11945 (patch)
tree522298b46e27f4241423320f1c64019e65bc0b19 /utils/infra_setup/vm_dev_setup/setup_env.sh
parent4307f8d1d2653ea5ba2029bd7720c1ea6a8cdb76 (diff)
Update stack creation status check
- add more debug info - authorized_keys modify for root access - extend timeout time for ssh login JIRA: BOTTLENECK-33 Change-Id: Ib2679cad7c7a9a73442d05795ac89f9a47d56176 Signed-off-by: QiLiang <liangqi1@huawei.com>
Diffstat (limited to 'utils/infra_setup/vm_dev_setup/setup_env.sh')
-rwxr-xr-xutils/infra_setup/vm_dev_setup/setup_env.sh21
1 files changed, 14 insertions, 7 deletions
diff --git a/utils/infra_setup/vm_dev_setup/setup_env.sh b/utils/infra_setup/vm_dev_setup/setup_env.sh
index 8ba76600..d09bc774 100755
--- a/utils/infra_setup/vm_dev_setup/setup_env.sh
+++ b/utils/infra_setup/vm_dev_setup/setup_env.sh
@@ -6,14 +6,14 @@ wait_vm_ok() {
ip=$1
retry=0
- until timeout 1s ssh $ssh_args ec2-user@$ip "exit" >/dev/null 2>&1
+ until timeout 10s ssh $ssh_args ec2-user@$ip "exit" >/dev/null 2>&1
do
echo "retry connect rubbos vm ip $ip $retry"
sleep 1
let retry+=1
if [[ $retry -ge $2 ]];then
echo "rubbos control start timeout !!!"
- exit 1
+ #exit 1
fi
done
}
@@ -29,19 +29,26 @@ bottlenecks_prepare_env()
for i in $rubbos_benchmark $rubbos_client1 $rubbos_client2 \
$rubbos_client3 $rubbos_client4 $rubbos_httpd $rubbos_mysql1 $rubbos_tomcat1
do
- wait_vm_ok $i 120
+ wait_vm_ok $i 360
done
- # asynchronous configue other VMs
+ # configue other VMs
for i in $rubbos_benchmark $rubbos_client1 $rubbos_client2 \
$rubbos_client3 $rubbos_client4 $rubbos_httpd $rubbos_mysql1 $rubbos_tomcat1
do
scp $ssh_args -r $SCRIPT_DIR ec2-user@$i:$SCRIPT_DIR
- ssh $ssh_args ec2-user@$i "sudo bash $SCRIPT_DIR/vm_prepare_setup.sh" &
+ ssh $ssh_args ec2-user@$i "sudo bash $SCRIPT_DIR/vm_prepare_setup.sh"
done
# ugly use ssh execute script to fix ec2-user previlege issue
ssh $ssh_args ec2-user@$rubbos_control "sudo bash $SCRIPT_DIR/vm_prepare_setup.sh"
+
+ # test root access
+ for i in $rubbos_control $rubbos_benchmark $rubbos_client1 $rubbos_client2 \
+ $rubbos_client3 $rubbos_client4 $rubbos_httpd $rubbos_mysql1 $rubbos_tomcat1
+ do
+ ssh $ssh_args root@$i "uname -a"
+ done
}
bottlenecks_download_repo()
@@ -84,10 +91,10 @@ bottlenecks_download_packages()
echo "Bottlenecks: download rubbos dependent packages from artifacts"
curl --connect-timeout 10 -o /tmp/app_tools.tar.gz $RUBBOS_APP_TOOLS_URL 2>/dev/null
- sudo tar zxvf /tmp/app_tools.tar.gz -C $RUBBOS_DIR
+ sudo tar zxf /tmp/app_tools.tar.gz -C $RUBBOS_DIR
rm -rf /tmp/app_tools.tar.gz
curl --connect-timeout 10 -o /tmp/rubbosMulini6.tar.gz $RUBBOS_MULINI6_URL 2>/dev/null
- sudo tar zxvf /tmp/rubbosMulini6.tar.gz -C $RUBBOS_MULINI6_DIR
+ sudo tar zxf /tmp/rubbosMulini6.tar.gz -C $RUBBOS_MULINI6_DIR
rm -rf /tmp/rubbosMulini6.tar.gz
}