Add hosts config 79/5579/4
authorQiLiang <liangqi1@huawei.com>
Tue, 5 Jan 2016 12:42:21 +0000 (12:42 +0000)
committerQiLiang <liangqi1@huawei.com>
Wed, 6 Jan 2016 11:06:19 +0000 (11:06 +0000)
JIRA: BOTTLENECK-24

Change-Id: I90c46abb0e77f3b93a4e61ae34b0f32d35cf30cd
Signed-off-by: QiLiang <liangqi1@huawei.com>
rubbos/rubbos_scripts/1-1-1/scripts/CONTROL_rubbos_exec.sh
utils/infra_setup/heat_template/HOT_create_instance.sh
utils/infra_setup/vm_dev_setup/common.sh
utils/infra_setup/vm_dev_setup/setup_env.sh
utils/infra_setup/vm_dev_setup/vm_prepare_setup.sh

index 41f90c8..0bb298e 100755 (executable)
@@ -86,6 +86,8 @@ do
       done
     done
     cd ..
+    find -type f
+    find -type f | grep stat_client | xargs grep throughput
     mv 20* $TMP_RESULTS_DIR_BASE/$RUBBOS_RESULTS_DIR_NAME/
   "
 
index 753dd4d..4de29b3 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-set -ex
+set -x
 
 GERRIT_REFSPEC_DEBUG=$1
 
@@ -232,5 +232,5 @@ main()
 }
 
 main
-set +ex
+set +x
 
index 027081f..d45345d 100644 (file)
@@ -1,8 +1,10 @@
 #!/bin/bash
 
-set -ex
+set -x
 
 generate_ssh_key() {
+    uname -a
+    whoami
     if [ ! -d ~/.ssh ]; then
         mkdir ~/.ssh
     fi
@@ -110,5 +112,21 @@ install_packages()
     done
 }
 
-set +ex
+hosts_config()
+{
+    echo "Bottlnecks: hosts config"
+    sudo echo "
+$rubbos_benchmark rubbos-benchmark
+$rubbos_client1 rubbos-client1
+$rubbos_client2 rubbos-client2
+$rubbos_client3 rubbos-client3
+$rubbos_client4 rubbos-client4
+$rubbos_control rubbos-control
+$rubbos_httpd rubbos-httpd
+$rubbos_mysql1 rubbos-mysql1
+$rubbos_tomcat1 rubbos-tomcat1
+" >> /etc/hosts
+}
+
+set +x
 
index d09bc77..bd0ffb5 100755 (executable)
@@ -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
index 8fb995b..3010bed 100644 (file)
@@ -8,6 +8,7 @@ main()
     source $SCRIPT_DIR/hosts.conf
     source $SCRIPT_DIR/common.sh
 
+    hosts_config
     generate_ssh_key
     configue_nameserver $nameserver_ip
     #install_packages $PreInstall_Packages