summaryrefslogtreecommitdiffstats
path: root/utils/infra_setup/vm_dev_setup
diff options
context:
space:
mode:
Diffstat (limited to 'utils/infra_setup/vm_dev_setup')
-rw-r--r--utils/infra_setup/vm_dev_setup/common.sh4
-rwxr-xr-xutils/infra_setup/vm_dev_setup/setup_env.sh12
2 files changed, 7 insertions, 9 deletions
diff --git a/utils/infra_setup/vm_dev_setup/common.sh b/utils/infra_setup/vm_dev_setup/common.sh
index d45345d6..12925326 100644
--- a/utils/infra_setup/vm_dev_setup/common.sh
+++ b/utils/infra_setup/vm_dev_setup/common.sh
@@ -94,9 +94,7 @@ configue_nameserver()
sudo echo "nameserver 8.8.8.8" >> /etc/resolv.conf
sudo echo "nameserver 8.8.4.4" >> /etc/resolv.conf
- sudo ifconfig
- sudo cat /etc/resolv.conf
- ping -c 5 www.google.com
+ ping -c 1 www.google.com
}
install_packages()
diff --git a/utils/infra_setup/vm_dev_setup/setup_env.sh b/utils/infra_setup/vm_dev_setup/setup_env.sh
index 7a69e83c..cef76f8e 100755
--- a/utils/infra_setup/vm_dev_setup/setup_env.sh
+++ b/utils/infra_setup/vm_dev_setup/setup_env.sh
@@ -6,7 +6,7 @@ wait_vm_ok() {
ip=$1
retry=0
- until timeout 10s ssh $ssh_args ec2-user@$ip "exit" >/dev/null 2>&1
+ until timeout 10s ssh $ssh_args ubuntu@$ip "exit" >/dev/null 2>&1
do
echo "retry connect rubbos vm ip $ip $retry"
sleep 1
@@ -36,12 +36,12 @@ bottlenecks_prepare_env()
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:/tmp
- ssh $ssh_args ec2-user@$i "sudo bash $SCRIPT_DIR/vm_prepare_setup.sh" &
+ scp $ssh_args -r $SCRIPT_DIR ubuntu@$i:/tmp
+ ssh $ssh_args ubuntu@$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"
+ # ugly use ssh execute script to fix ubuntu previlege issue
+ ssh $ssh_args ubuntu@$rubbos_control "sudo bash $SCRIPT_DIR/vm_prepare_setup.sh"
# test root access
for i in $rubbos_control $rubbos_benchmark $rubbos_client1 $rubbos_client2 \
@@ -115,8 +115,8 @@ main()
SCRIPT_DIR=`cd ${BASH_SOURCE[0]%/*};pwd`
ssh_args="-o StrictHostKeyChecking=no -o BatchMode=yes"
- source $SCRIPT_DIR/package.conf
source $SCRIPT_DIR/hosts.conf
+ source $SCRIPT_DIR/package.conf
source $SCRIPT_DIR/common.sh
bottlenecks_prepare_env