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