summaryrefslogtreecommitdiffstats
path: root/rubbos/rubbos_scripts/1-1-1
diff options
context:
space:
mode:
authorQiLiang <liangqi1@huawei.com>2016-01-09 09:31:41 +0000
committerJun Li <matthew.lijun@huawei.com>2016-01-10 05:45:18 +0000
commitacbeb20b51c12f5ea486640e0e2a4e2cb81712c3 (patch)
treee80c5283c5da48c37dcc347ad65b5506947f9e96 /rubbos/rubbos_scripts/1-1-1
parentd30740bb6c80729281453878eda29abc32549161 (diff)
Support run rubbos test mult times
Update Mysql configuration to support run test mult times JIRA: BOTTLENECK-24 Change-Id: I29f2b17be03b095e1af569a53bbbecf4f78ab005 Signed-off-by: QiLiang <liangqi1@huawei.com> (cherry picked from commit 7be8a9f58376fb3ef0b2f5ecde03edca0e80035a)
Diffstat (limited to 'rubbos/rubbos_scripts/1-1-1')
-rwxr-xr-xrubbos/rubbos_scripts/1-1-1/scripts/CONTROL_rubbos_exec.sh18
-rwxr-xr-xrubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_configure.sh24
-rwxr-xr-xrubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_ignition.sh10
-rwxr-xr-xrubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_reset.sh32
-rwxr-xr-xrubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_stop.sh3
-rwxr-xr-xrubbos/rubbos_scripts/1-1-1/scripts/reset_all.sh4
-rwxr-xr-xrubbos/rubbos_scripts/1-1-1/scripts/start_all.sh4
7 files changed, 53 insertions, 42 deletions
diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/CONTROL_rubbos_exec.sh b/rubbos/rubbos_scripts/1-1-1/scripts/CONTROL_rubbos_exec.sh
index 32163d48..1c785b32 100755
--- a/rubbos/rubbos_scripts/1-1-1/scripts/CONTROL_rubbos_exec.sh
+++ b/rubbos/rubbos_scripts/1-1-1/scripts/CONTROL_rubbos_exec.sh
@@ -18,8 +18,10 @@ ssh $BENCHMARK_HOST "
"
#TODO use for loop to genrate rubbos.properties file 200 ~ 1700
-for i in {2..2}
+for i in {2..17..5}
do
+ echo "Start Browsing Only with rubbos.properties_$((100*i)) $(date)"
+
ssh $BENCHMARK_HOST "
source /bottlenecks/rubbos/rubbos_scripts/1-1-1/set_bottlenecks_rubbos_env.sh
rm -f $RUBBOS_HOME/Client/rubbos.properties
@@ -38,8 +40,8 @@ do
scp $OUTPUT_HOME/rubbos_conf/rubbos.properties $BENCHMARK_HOST:$RUBBOS_HOME/Client/rubbos.properties
rm -rf $OUTPUT_HOME/rubbos_conf/rubbos.properties
- #echo "Resetting all data"
- #$OUTPUT_HOME/scripts/reset_all.sh
+ echo "Resetting all data"
+ $OUTPUT_HOME/scripts/reset_all.sh
# Browsing Only
echo "Start Browsing Only with rubbos.properties_$((100*i))"
@@ -91,13 +93,11 @@ do
mv 20* $TMP_RESULTS_DIR_BASE/$RUBBOS_RESULTS_DIR_NAME/
"
- #$OUTPUT_HOME/scripts/stop_all.sh
- #$OUTPUT_HOME/scripts/kill_all.sh
- #sleep 15
- echo "End Browsing Only with rubbos.properties_$((100*i))"
-
- # Read/Write
+ $OUTPUT_HOME/scripts/stop_all.sh
+ $OUTPUT_HOME/scripts/kill_all.sh
+ sleep 15
+ echo "End Browsing Only with rubbos.properties_$((100*i)) $(date)"
done
echo "Processing the results..."
diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_configure.sh b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_configure.sh
index 7b3707da..3b8759d3 100755
--- a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_configure.sh
+++ b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_configure.sh
@@ -9,8 +9,6 @@ cd $MYSQL_HOME
chown -R mysql:mysql ./
cp support-files/my-medium.cnf /etc/my.cnf
#bin/mysqld_safe --user=$BOTTLENECKS_USER &
-bin/mysqld_safe&
-sleep 10
#bin/mysqladmin -u root password 'new-password'
cp support-files/mysql.server /etc/init.d/mysql.server
/etc/init.d/mysql.server status
@@ -21,27 +19,5 @@ fi
ln -s $MYSQL_HOME/bin/mysql /usr/local/bin/mysql
-sleep 20
-echo "BEGIN MYSQL GIVE PRIVILEGES"
-cat << EOF | mysql -uroot
-
-CREATE DATABASE rubbos;
-
-GRANT ALL PRIVILEGES ON rubbos.* TO 'rubbos'@'%' \
- IDENTIFIED BY 'rubbos';
- flush privileges;
-GRANT ALL PRIVILEGES ON rubbos.* TO 'rubbos'@'localhost' \
- IDENTIFIED BY 'rubbos';
- flush privileges;
-EOF
-echo "END MYSQL GIVE PRIVILEGES"
-
-echo "BEGIN IMPORT SQL DATA"
-echo "software_home=$SOFTWARE_HOME"
-tar xzf $SOFTWARE_HOME/$RUBBOS_DATA_TARBALL --directory /tmp
-mysql -uroot rubbos < /tmp/$RUBBOS_DATA_SQL
-echo "END IMPORT SQL DATA"
-rm /tmp/$RUBBOS_DATA_SQL
-
echo "DONE CONFIGURING MYSQL on $HOSTNAME"
diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_ignition.sh b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_ignition.sh
index a673537f..5f230cb9 100755
--- a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_ignition.sh
+++ b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_ignition.sh
@@ -3,8 +3,12 @@
cd /bottlenecks/rubbos/rubbos_scripts/1-1-1
source set_bottlenecks_rubbos_env.sh
-echo "STARTING MYSQL on $HOSTNAME"
+echo "STARTING MYSQL on $HOSTNAME $(date)"
-# TODO start mysqld here, currently mysql is started by MYSQL1_configure.sh
+cd $MYSQL_HOME
+bin/mysqld_safe&
+sleep 10
+/etc/init.d/mysql.server status
-echo "MYSQL IS RUNNING on $HOSTNAME"
+
+echo "MYSQL IS RUNNING on $HOSTNAME $(date)"
diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_reset.sh b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_reset.sh
index 551c9d7f..aac9cc01 100755
--- a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_reset.sh
+++ b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_reset.sh
@@ -5,7 +5,37 @@ source set_bottlenecks_rubbos_env.sh
echo "RESETING MYSQL on $HOSTNAME"
# copy rubbos data files
-tar xzf $RUBBOS_TOP/$RUBBOS_DATA_TARBALL --directory=$MYSQL_HOME/data/rubbos
+#tar xzf $RUBBOS_TOP/$RUBBOS_DATA_TARBALL --directory=$MYSQL_HOME/data/rubbos
+cd $MYSQL_HOME
+bin/mysqld_safe&
+sleep 10
+/etc/init.d/mysql.server status
+
+echo "BEGIN RUBBOS DATABASE GIVE PRIVILEGES"
+cat << EOF | mysql -uroot
+
+DROP DATABASE IF EXISTS rubbos;
+
+CREATE DATABASE rubbos;
+
+GRANT ALL PRIVILEGES ON rubbos.* TO 'rubbos'@'%' \
+ IDENTIFIED BY 'rubbos';
+ flush privileges;
+GRANT ALL PRIVILEGES ON rubbos.* TO 'rubbos'@'localhost' \
+ IDENTIFIED BY 'rubbos';
+ flush privileges;
+EOF
+echo "END RUBBOS DATABASE GIVE PRIVILEGES"
+
+echo "BEGIN IMPORT SQL DATA $(date)"
+echo "software_home=$SOFTWARE_HOME"
+tar xzf $SOFTWARE_HOME/$RUBBOS_DATA_TARBALL --directory /tmp
+mysql -uroot rubbos < /tmp/$RUBBOS_DATA_SQL
+echo "END IMPORT SQL DATA $(date)"
+rm /tmp/$RUBBOS_DATA_SQL
+
+bin/mysqladmin shutdown
echo "DONE RESETING MYSQL on $HOSTNAME"
sleep 5
+
diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_stop.sh b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_stop.sh
index 8511481a..9f89f8db 100755
--- a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_stop.sh
+++ b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_stop.sh
@@ -6,6 +6,7 @@ source set_bottlenecks_rubbos_env.sh
echo "STOPPING MYSQL on $HOSTNAME"
cd $MYSQL_HOME
-bin/mysqladmin --socket=$MYSQL_SOCKET --user=root --password=$ROOT_PASSWORD shutdown
+#bin/mysqladmin --socket=$MYSQL_SOCKET --user=root --password=$ROOT_PASSWORD shutdown
+bin/mysqladmin shutdown
echo "MYSQL IS STOPPED on $HOSTNAME"
diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/reset_all.sh b/rubbos/rubbos_scripts/1-1-1/scripts/reset_all.sh
index f26761fe..86e96af7 100755
--- a/rubbos/rubbos_scripts/1-1-1/scripts/reset_all.sh
+++ b/rubbos/rubbos_scripts/1-1-1/scripts/reset_all.sh
@@ -3,6 +3,6 @@
cd /bottlenecks/rubbos/rubbos_scripts/1-1-1
source set_bottlenecks_rubbos_env.sh
-#ssh $MYSQL1_HOST /tmp/MYSQL1_reset.sh &
-#sleep 120
+ssh $MYSQL1_HOST /tmp/MYSQL1_reset.sh &
+sleep 120
diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/start_all.sh b/rubbos/rubbos_scripts/1-1-1/scripts/start_all.sh
index ba7e8a27..0fecae6c 100755
--- a/rubbos/rubbos_scripts/1-1-1/scripts/start_all.sh
+++ b/rubbos/rubbos_scripts/1-1-1/scripts/start_all.sh
@@ -3,8 +3,8 @@
cd /bottlenecks/rubbos/rubbos_scripts/1-1-1
source set_bottlenecks_rubbos_env.sh
-ssh $MYSQL1_HOST /tmp/MYSQL1_ignition.sh
-sleep 10
+ssh $MYSQL1_HOST /tmp/MYSQL1_ignition.sh &
+sleep 20
ssh $TOMCAT1_HOST /tmp/TOMCAT1_ignition.sh
sleep 10