2 ##############################################################################
3 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
13 cd /bottlenecks/rubbos/rubbos_scripts/1-1-1
14 source set_bottlenecks_rubbos_env.sh
15 cd /bottlenecks/rubbos/rubbos_scripts/1-1-1/scripts
16 # Transfer all sub scripts to target hosts
17 echo "*** scp scripts *************************************************"
19 scp_options="-o StrictHostKeyChecking=no -o BatchMode=yes"
21 scp $scp_options CONTROL_rubbos_exec.sh $CONTROL_HOST:/tmp
24 for script in BENCHMARK_rubbos_install.sh BENCHMARK_install.sh \
25 BENCHMARK_configure.sh BENCHMARK_uninstall.sh \
26 BENCHMARK_rubbos_uninstall.sh
28 scp $scp_options $script $BENCHMARK_HOST:/tmp
35 for script in CLIENT${i}_rubbos_install.sh CLIENT${i}_install.sh \
36 CLIENT${i}_configure.sh CLIENT${i}_uninstall.sh \
37 CLIENT${i}_rubbos_uninstall.sh
39 CLIENT_HOST=`printenv CLIENT${i}_HOST`
40 scp $scp_options $script $CLIENT_HOST:/tmp
46 for script in HTTPD_install.sh HTTPD_rubbos_install.sh \
47 HTTPD_configure.sh HTTPD_ignition.sh \
48 HTTPD_stop.sh HTTPD_rubbos_uninstall.sh \
51 scp $scp_options $script $HTTPD_HOST:/tmp
56 for script in TOMCAT1_install.sh TOMCAT1_rubbos_install.sh \
57 TOMCAT1_configure.sh TOMCAT1_rubbosSL_configure.sh \
58 TOMCAT1_ignition.sh TOMCAT1_stop.sh \
59 TOMCAT1_rubbos_uninstall.sh TOMCAT1_uninstall.sh
61 scp $scp_options $script $TOMCAT1_HOST:/tmp
66 for script in MYSQL1_install.sh MYSQL1_rubbos_install.sh \
67 MYSQL1_configure.sh MYSQL1_reset.sh \
68 MYSQL1_ignition.sh MYSQL1_stop.sh \
69 MYSQL1_rubbos_uninstall.sh \
72 scp $scp_options $script $MYSQL1_HOST:/tmp
76 # Prepare software packages
77 echo "*** prepare software packages ***"
78 ./MYSQL1_pkg_prepare.sh
79 ./TOMCAT1_pkg_prepare.sh
80 ./HTTPD_pkg_prepare.sh
81 ./BENCHMARK_pkg_prepare.sh
84 ./CLIENT${i}_pkg_prepare.sh
87 # Install and Configure and run Apache, Tomcat, CJDBC, and MySQL
88 echo "*** install scripts & configure & execute ***********************"
90 ssh root@$MYSQL1_HOST chmod 770 /tmp/MYSQL1_install.sh
91 ssh $MYSQL1_HOST /tmp/MYSQL1_install.sh
93 ssh root@$TOMCAT1_HOST chmod 770 /tmp/TOMCAT1_install.sh
94 ssh $TOMCAT1_HOST /tmp/TOMCAT1_install.sh
96 ssh root@$HTTPD_HOST chmod 770 /tmp/HTTPD_install.sh
97 ssh $HTTPD_HOST /tmp/HTTPD_install.sh
99 ssh root@$MYSQL1_HOST chmod 770 /tmp/MYSQL1_rubbos_install.sh
100 ssh $MYSQL1_HOST /tmp/MYSQL1_rubbos_install.sh
102 ssh root@$TOMCAT1_HOST chmod 770 /tmp/TOMCAT1_rubbos_install.sh
103 ssh $TOMCAT1_HOST /tmp/TOMCAT1_rubbos_install.sh
105 ssh root@$HTTPD_HOST chmod 770 /tmp/HTTPD_rubbos_install.sh
106 ssh $HTTPD_HOST /tmp/HTTPD_rubbos_install.sh
108 ssh root@$BENCHMARK_HOST chmod 770 /tmp/BENCHMARK_rubbos_install.sh
109 ssh $BENCHMARK_HOST /tmp/BENCHMARK_rubbos_install.sh
113 CLIENT_HOST=`printenv CLIENT${i}_HOST`
114 ssh root@$CLIENT_HOST chmod 770 /tmp/CLIENT${i}_rubbos_install.sh
115 ssh $CLIENT_HOST /tmp/CLIENT${i}_rubbos_install.sh
118 ssh root@$BENCHMARK_HOST chmod 770 /tmp/BENCHMARK_install.sh
119 ssh $BENCHMARK_HOST /tmp/BENCHMARK_install.sh
123 CLIENT_HOST=`printenv CLIENT${i}_HOST`
124 ssh root@$CLIENT_HOST chmod 770 /tmp/CLIENT${i}_install.sh
125 ssh $CLIENT_HOST /tmp/CLIENT${i}_install.sh
128 ssh root@$MYSQL1_HOST chmod 770 /tmp/MYSQL1_configure.sh
129 ssh $MYSQL1_HOST /tmp/MYSQL1_configure.sh &
132 ssh root@$TOMCAT1_HOST chmod 770 /tmp/TOMCAT1_configure.sh
133 ssh $TOMCAT1_HOST /tmp/TOMCAT1_configure.sh
135 ssh root@$HTTPD_HOST chmod 770 /tmp/HTTPD_configure.sh
136 ssh $HTTPD_HOST /tmp/HTTPD_configure.sh
138 ssh root@$BENCHMARK_HOST chmod 770 /tmp/BENCHMARK_configure.sh
139 ssh $BENCHMARK_HOST /tmp/BENCHMARK_configure.sh
143 CLIENT_HOST=`printenv CLIENT${i}_HOST`
144 ssh root@$CLIENT_HOST chmod 770 /tmp/CLIENT${i}_configure.sh
145 ssh $CLIENT_HOST /tmp/CLIENT${i}_configure.sh
148 ssh root@$TOMCAT1_HOST chmod 770 /tmp/TOMCAT1_rubbosSL_configure.sh
149 ssh $TOMCAT1_HOST /tmp/TOMCAT1_rubbosSL_configure.sh
151 ssh $CONTROL_HOST /tmp/CONTROL_rubbos_exec.sh