summaryrefslogtreecommitdiffstats
path: root/rubbos
diff options
context:
space:
mode:
Diffstat (limited to 'rubbos')
-rw-r--r--rubbos/rubbos_scripts/1-1-1/rubbos_conf/mysql.properties2
-rwxr-xr-xrubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_configure.sh22
-rwxr-xr-xrubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_pkg_prepare.sh40
-rwxr-xr-xrubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_rubbos_install.sh13
-rwxr-xr-xrubbos/rubbos_scripts/1-1-1/scripts/run.sh23
-rwxr-xr-xrubbos/rubbos_scripts/1-1-1/set_bottlenecks_rubbos_env.sh3
6 files changed, 91 insertions, 12 deletions
diff --git a/rubbos/rubbos_scripts/1-1-1/rubbos_conf/mysql.properties b/rubbos/rubbos_scripts/1-1-1/rubbos_conf/mysql.properties
index a8ee8fe9..42607c62 100644
--- a/rubbos/rubbos_scripts/1-1-1/rubbos_conf/mysql.properties
+++ b/rubbos/rubbos_scripts/1-1-1/rubbos_conf/mysql.properties
@@ -8,7 +8,7 @@
#
datasource.name mysql
-datasource.url jdbc:mysql://192.168.122.13:3313/rubbos
+datasource.url jdbc:mysql://192.168.122.13:3306/rubbos
datasource.classname com.mysql.jdbc.Driver
datasource.username rubbos
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 5b5362ab..01a718d9 100755
--- a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_configure.sh
+++ b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_configure.sh
@@ -6,8 +6,10 @@ source set_bottlenecks_rubbos_env.sh
echo "CONFIGURING MYSQL on $HOSTNAME"
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 --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
@@ -19,4 +21,22 @@ fi
ln -s $MYSQL_HOME/bin/mysql /usr/local/bin/mysql
+sleep 20
+
+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
+
+tar xzf /tmp/$RUBBOS_DATA_TARBALL
+mysql -uroot rubbos < $RUBBOS_DATA_SQL
+rm $RUBBOS_DATA_SQL
+
echo "DONE CONFIGURING MYSQL on $HOSTNAME"
diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_pkg_prepare.sh b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_pkg_prepare.sh
new file mode 100755
index 00000000..17b5e745
--- /dev/null
+++ b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_pkg_prepare.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+. ../set_bottlenecks_rubbos_env.sh
+
+scp_options="-o StrictHostKeyChecking=no -o BatchMode=yes"
+
+# Packages for MYSQL1 install
+if true; then
+ssh $MYSQL1_HOST "mkdir -p /bottlenecks/rubbos/rubbos_scripts/1-1-1"
+scp $scp_options ../set_bottlenecks_rubbos_env.sh $MYSQL1_HOST:/bottlenecks/rubbos/rubbos_scripts/1-1-1
+
+ssh $MYSQL1_HOST "mkdir -p $SOFTWARE_HOME"
+scp $scp_options $SOFTWARE_HOME/$MYSQL_TARBALL $MYSQL1_HOST:$SOFTWARE_HOME/$MYSQL_TARBALL
+
+ssh $MYSQL1_HOST "
+ apt-get update
+ apt-get install -y \
+ gcc \
+ g++ \
+ libaio1 \
+ libaio-dev \
+ make
+"
+
+fi
+
+# Packages for MYSQL1 rubbos install
+if true; then
+scp $scp_options $SOFTWARE_HOME/$RUBBOS_TARBALL $MYSQL1_HOST:$SOFTWARE_HOME/$RUBBOS_TARBALL
+scp $scp_options $SOFTWARE_HOME/flush_cache $MYSQL1_HOST:$SOFTWARE_HOME/flush_cache
+scp $scp_options $SOFTWARE_HOME/$SYSSTAT_TARBALL $MYSQL1_HOST:$SOFTWARE_HOME/$SYSSTAT_TARBALL
+ssh $MYSQL1_HOST "mkdir -p $OUTPUT_HOME/rubbos_conf"
+scp $scp_options $OUTPUT_HOME/rubbos_conf/cpu_mem.sh $MYSQL1_HOST:$OUTPUT_HOME/rubbos_conf/cpu_mem.sh
+fi
+
+# Packages for MYSQL1 configure
+if true; then
+scp $scp_options $SOFTWARE_HOME/$RUBBOS_DATA_TARBALL $MYSQL1_HOST:/tmp
+fi
+
diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_rubbos_install.sh b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_rubbos_install.sh
index dd2bd46e..42a75676 100755
--- a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_rubbos_install.sh
+++ b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_rubbos_install.sh
@@ -12,15 +12,12 @@ tar xzf $SOFTWARE_HOME/$RUBBOS_TARBALL --directory=$RUBBOS_APP
#tar xzf $SOFTWARE_HOME/rubbos_html.tar.gz --directory=$RUBBOS_HOME/Servlet_HTML/
cp $SOFTWARE_HOME/flush_cache $RUBBOS_HOME/bench/.
-cp $SOFTWARE_HOME/$RUBBOS_DATA_TARBALL $RUBBOS_APP/
-
# install sysstat
-tar xzf $SOFTWARE_HOME/$SYSSTAT_TARBALL --directory=$RUBBOS_APP
-
-cd $SYSSTAT_HOME
-./configure --prefix=$SYSSTAT_HOME
-make
-sudo make install
+#tar xzf $SOFTWARE_HOME/$SYSSTAT_TARBALL --directory=$RUBBOS_APP
+#cd $SYSSTAT_HOME
+#./configure --prefix=$SYSSTAT_HOME
+#make
+#sudo make install
# install a script to collect statistics data
cp $OUTPUT_HOME/rubbos_conf/cpu_mem.sh $RUBBOS_APP/.
diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/run.sh b/rubbos/rubbos_scripts/1-1-1/scripts/run.sh
index 31b51b25..5a1de25a 100755
--- a/rubbos/rubbos_scripts/1-1-1/scripts/run.sh
+++ b/rubbos/rubbos_scripts/1-1-1/scripts/run.sh
@@ -26,26 +26,47 @@ do
done
fi
+if true; then
+for script in MYSQL1_install.sh MYSQL1_rubbos_install.sh \
+ MYSQL1_configure.sh MYSQL1_reset.sh \
+ MYSQL1_ignition.sh MYSQL1_stop.sh \
+ MYSQL1_rubbos_uninstall.sh \
+ MYSQL1_uninstall.sh
+do
+ scp $scp_options $script $MYSQL1_HOST:/tmp
+done
+
# Prepare software packages
echo "*** prepare software packages ***"
-./HTTPD_pkg_prepare.sh
+./MYSQL1_pkg_prepare.sh
./TOMCAT1_pkg_prepare.sh
+./HTTPD_pkg_prepare.sh
+
# Install and Configure and run Apache, Tomcat, CJDBC, and MySQL
echo "*** install scripts & configure & execute ***********************"
+ssh root@$MYSQL1_HOST chmod 770 /tmp/MYSQL1_install.sh
+ssh $MYSQL1_HOST /tmp/MYSQL1_install.sh
+
ssh root@$TOMCAT1_HOST chmod 770 /tmp/TOMCAT1_install.sh
ssh $TOMCAT1_HOST /tmp/TOMCAT1_install.sh
ssh root@$HTTPD_HOST chmod 770 /tmp/HTTPD_install.sh
ssh $HTTPD_HOST /tmp/HTTPD_install.sh
+ssh root@$MYSQL1_HOST chmod 770 /tmp/MYSQL1_rubbos_install.sh
+ssh $MYSQL1_HOST /tmp/MYSQL1_rubbos_install.sh
+
ssh root@$TOMCAT1_HOST chmod 770 /tmp/TOMCAT1_rubbos_install.sh
ssh $TOMCAT1_HOST /tmp/TOMCAT1_rubbos_install.sh
ssh root@$HTTPD_HOST chmod 770 /tmp/HTTPD_rubbos_install.sh
ssh $HTTPD_HOST /tmp/HTTPD_rubbos_install.sh
+ssh root@$MYSQL1_HOST chmod 770 /tmp/MYSQL1_configure.sh
+ssh $MYSQL1_HOST /tmp/MYSQL1_configure.sh
+
ssh root@$TOMCAT1_HOST chmod 770 /tmp/TOMCAT1_configure.sh
ssh $TOMCAT1_HOST /tmp/TOMCAT1_configure.sh
diff --git a/rubbos/rubbos_scripts/1-1-1/set_bottlenecks_rubbos_env.sh b/rubbos/rubbos_scripts/1-1-1/set_bottlenecks_rubbos_env.sh
index 9d25f67b..6ec0dab0 100755
--- a/rubbos/rubbos_scripts/1-1-1/set_bottlenecks_rubbos_env.sh
+++ b/rubbos/rubbos_scripts/1-1-1/set_bottlenecks_rubbos_env.sh
@@ -62,7 +62,8 @@ TOMCAT_TARBALL=apache-tomcat-5.5.17.tar.gz
CJDBC_TARBALL=
MYSQL_TARBALL=mysql-5.5.46-linux2.6-x86_64.tar.gz
RUBBOS_TARBALL=RUBBoS-servlets.tar.gz
-RUBBOS_DATA_TARBALL=rubbos_data.tar.gz
+RUBBOS_DATA_TARBALL=rubbos_data.sql.tar.gz
+RUBBOS_DATA_SQL=rubbos_data.sql
RUBBOS_DATA_TEXTFILES_TARBALL=smallDB-rubbos-modified.tgz
# for MySQL