diff options
author | Jun Li <matthew.lijun@huawei.com> | 2016-01-06 11:10:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-01-06 11:10:39 +0000 |
commit | 2ef88b4eb1e78f562fed72df00c9b757c45f99f0 (patch) | |
tree | ea7153c6a21d1068ea3bb707e5ede3c9037b8b58 /utils/infra_setup/vm_dev_setup/setup_env.sh | |
parent | 1d4a008e2b484c7ee3a4d9220a8267781dbb2783 (diff) | |
parent | 52b57789e3a3bee43398d3786d656c56007c113a (diff) |
Merge "Add hosts config"
Diffstat (limited to 'utils/infra_setup/vm_dev_setup/setup_env.sh')
-rwxr-xr-x | utils/infra_setup/vm_dev_setup/setup_env.sh | 15 |
1 files changed, 8 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 d09bc774..bd0ffb56 100755 --- a/utils/infra_setup/vm_dev_setup/setup_env.sh +++ b/utils/infra_setup/vm_dev_setup/setup_env.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -ex +set -x wait_vm_ok() { ip=$1 @@ -36,8 +36,8 @@ 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:$SCRIPT_DIR - ssh $ssh_args ec2-user@$i "sudo bash $SCRIPT_DIR/vm_prepare_setup.sh" + scp $ssh_args -r $SCRIPT_DIR ec2-user@$i:/tmp + 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 @@ -55,7 +55,7 @@ bottlenecks_download_repo() { echo "Bottlenecks: download bottlenecks repo" - if [ -d $BOTTELENECKS_REPO_DIR/.git ]; then + if [ -d $BOTTLENECKS_REPO_DIR/.git ]; then cd $BOTTLENECKS_REPO_DIR sudo git pull origin master if [ x"$GERRIT_REFSPEC_DEBUG" != x ]; then @@ -74,7 +74,7 @@ bottlenecks_download_repo() bottlenecks_config_hosts_ip() { - sed -i -e "s/REPLACE_CONTROL_HOST/$rubbos_control/g" \ + sudo sed -i -e "s/REPLACE_CONTROL_HOST/$rubbos_control/g" \ -e "s/REPLACE_HTTPD_HOST/$rubbos_httpd/g" \ -e "s/REPLACE_MYSQL1_HOST/$rubbos_mysql1/g" \ -e "s/REPLACE_TOMCAT1_HOST/$rubbos_tomcat1/g" \ @@ -83,7 +83,7 @@ bottlenecks_config_hosts_ip() -e "s/REPLACE_CLIENT3_HOST/$rubbos_client3/g" \ -e "s/REPLACE_CLIENT4_HOST/$rubbos_client4/g" \ -e "s/REPLACE_BENCHMARK_HOST/$rubbos_benchmark/g" \ - $BOTTELENECKS_REPO_DIR/rubbos/rubbos_scripts/1-1-1/set_bottlenecks_rubbos_env.sh + $BOTTLENECKS_REPO_DIR/rubbos/rubbos_scripts/1-1-1/set_bottlenecks_rubbos_env.sh } bottlenecks_download_packages() @@ -119,9 +119,10 @@ main() bottlenecks_prepare_env bottlenecks_download_repo + bottlenecks_config_hosts_ip bottlenecks_download_packages bottlenecks_rubbos_install_exe } main -set +ex +set +x |