e71c6ec25e81fa1b07c664cae787ff775d5f4fa7
[bottlenecks.git] / rubbos / rubbos_scripts / 1-1-1 / scripts / run.sh
1 cd /bottlenecks/rubbos/rubbos_scripts/1-1-1
2 source set_bottlenecks_rubbos_env.sh
3 cd /bottlenecks/rubbos/rubbos_scripts/1-1-1/scripts
4 # Transfer all sub scripts to target hosts
5 echo "*** scp scripts *************************************************"
6
7 scp_options="-o StrictHostKeyChecking=no -o BatchMode=yes"
8
9 scp $scp_options CONTROL_rubbos_exec.sh  $CONTROL_HOST:/tmp
10
11 if true; then
12 for script in BENCHMARK_rubbos_install.sh BENCHMARK_install.sh \
13               BENCHMARK_configure.sh BENCHMARK_uninstall.sh \
14               BENCHMARK_rubbos_uninstall.sh
15 do
16     scp $scp_options $script $BENCHMARK_HOST:/tmp
17 done
18 fi
19
20 if true; then
21 for i in {1..4}
22 do
23     for script in CLIENT${i}_rubbos_install.sh CLIENT${i}_install.sh \
24                   CLIENT${i}_configure.sh CLIENT${i}_uninstall.sh \
25                   CLIENT${i}_rubbos_uninstall.sh
26     do
27         CLIENT_HOST=`printenv CLIENT${i}_HOST`
28         scp $scp_options $script $CLIENT_HOST:/tmp
29     done
30 done
31 fi
32
33 if true; then
34 for script in HTTPD_install.sh HTTPD_rubbos_install.sh \
35               HTTPD_configure.sh HTTPD_ignition.sh \
36               HTTPD_stop.sh HTTPD_rubbos_uninstall.sh \
37               HTTPD_uninstall.sh
38 do
39     scp $scp_options $script $HTTPD_HOST:/tmp
40 done
41 fi
42
43 if true; then
44 for script in TOMCAT1_install.sh TOMCAT1_rubbos_install.sh \
45               TOMCAT1_configure.sh TOMCAT1_rubbosSL_configure.sh \
46               TOMCAT1_ignition.sh TOMCAT1_stop.sh \
47               TOMCAT1_rubbos_uninstall.sh TOMCAT1_uninstall.sh
48 do
49     scp $scp_options $script $TOMCAT1_HOST:/tmp
50 done
51 fi
52
53 if true; then
54 for script in MYSQL1_install.sh MYSQL1_rubbos_install.sh \
55               MYSQL1_configure.sh MYSQL1_reset.sh \
56               MYSQL1_ignition.sh MYSQL1_stop.sh \
57               MYSQL1_rubbos_uninstall.sh \
58               MYSQL1_uninstall.sh
59 do
60     scp $scp_options $script $MYSQL1_HOST:/tmp
61 done
62 fi
63
64 # Prepare software packages
65 echo "*** prepare software packages ***"
66 ./MYSQL1_pkg_prepare.sh
67 ./TOMCAT1_pkg_prepare.sh
68 ./HTTPD_pkg_prepare.sh
69 ./BENCHMARK_pkg_prepare.sh
70 for i in {1..4}
71 do
72     ./CLIENT${i}_pkg_prepare.sh
73 done
74
75 # Install and Configure and run Apache, Tomcat, CJDBC, and MySQL
76 echo "*** install scripts & configure & execute ***********************"
77
78 ssh root@$MYSQL1_HOST chmod 770 /tmp/MYSQL1_install.sh
79 ssh $MYSQL1_HOST /tmp/MYSQL1_install.sh
80
81 ssh root@$TOMCAT1_HOST chmod 770 /tmp/TOMCAT1_install.sh
82 ssh $TOMCAT1_HOST /tmp/TOMCAT1_install.sh
83
84 ssh root@$HTTPD_HOST chmod 770 /tmp/HTTPD_install.sh
85 ssh $HTTPD_HOST /tmp/HTTPD_install.sh
86
87 ssh root@$MYSQL1_HOST chmod 770 /tmp/MYSQL1_rubbos_install.sh
88 ssh $MYSQL1_HOST /tmp/MYSQL1_rubbos_install.sh
89
90 ssh root@$TOMCAT1_HOST chmod 770 /tmp/TOMCAT1_rubbos_install.sh
91 ssh $TOMCAT1_HOST /tmp/TOMCAT1_rubbos_install.sh
92
93 ssh root@$HTTPD_HOST chmod 770 /tmp/HTTPD_rubbos_install.sh
94 ssh $HTTPD_HOST /tmp/HTTPD_rubbos_install.sh
95
96 ssh root@$BENCHMARK_HOST chmod 770 /tmp/BENCHMARK_rubbos_install.sh
97 ssh $BENCHMARK_HOST /tmp/BENCHMARK_rubbos_install.sh
98
99 for i in {1..4}
100 do
101     CLIENT_HOST=`printenv CLIENT${i}_HOST`
102     ssh root@$CLIENT_HOST chmod 770 /tmp/CLIENT${i}_rubbos_install.sh
103     ssh $CLIENT_HOST /tmp/CLIENT${i}_rubbos_install.sh
104 done
105
106 ssh root@$BENCHMARK_HOST chmod 770 /tmp/BENCHMARK_install.sh
107 ssh $BENCHMARK_HOST /tmp/BENCHMARK_install.sh
108
109 for i in {1..4}
110 do
111     CLIENT_HOST=`printenv CLIENT${i}_HOST`
112     ssh root@$CLIENT_HOST chmod 770 /tmp/CLIENT${i}_install.sh
113     ssh $CLIENT_HOST /tmp/CLIENT${i}_install.sh
114 done
115
116 ssh root@$MYSQL1_HOST chmod 770 /tmp/MYSQL1_configure.sh
117 ssh $MYSQL1_HOST /tmp/MYSQL1_configure.sh
118
119 ssh root@$TOMCAT1_HOST chmod 770 /tmp/TOMCAT1_configure.sh
120 ssh $TOMCAT1_HOST /tmp/TOMCAT1_configure.sh
121
122 ssh root@$HTTPD_HOST chmod 770 /tmp/HTTPD_configure.sh
123 ssh $HTTPD_HOST /tmp/HTTPD_configure.sh
124
125 ssh root@$BENCHMARK_HOST chmod 770 /tmp/BENCHMARK_configure.sh
126 ssh $BENCHMARK_HOST /tmp/BENCHMARK_configure.sh
127
128 for i in {1..4}
129 do
130     CLIENT_HOST=`printenv CLIENT${i}_HOST`
131     ssh root@$CLIENT_HOST chmod 770 /tmp/CLIENT${i}_configure.sh
132     ssh $CLIENT_HOST /tmp/CLIENT${i}_configure.sh
133 done
134
135 ssh root@$TOMCAT1_HOST chmod 770 /tmp/TOMCAT1_rubbosSL_configure.sh
136 ssh $TOMCAT1_HOST /tmp/TOMCAT1_rubbosSL_configure.sh
137
138 ssh $CONTROL_HOST /tmp/CONTROL_rubbos_exec.sh
139