|
@@ -148,6 +148,7 @@ class Installer:
|
|
##############################
|
|
##############################
|
|
# MySQL
|
|
# MySQL
|
|
##############################
|
|
##############################
|
|
|
|
+ echo "Setting up MySQL database"
|
|
sudo sh -c "echo mysql-server mysql-server/root_password_again select secret | debconf-set-selections"
|
|
sudo sh -c "echo mysql-server mysql-server/root_password_again select secret | debconf-set-selections"
|
|
sudo sh -c "echo mysql-server mysql-server/root_password select secret | debconf-set-selections"
|
|
sudo sh -c "echo mysql-server mysql-server/root_password select secret | debconf-set-selections"
|
|
|
|
|
|
@@ -175,6 +176,7 @@ class Installer:
|
|
##############################
|
|
##############################
|
|
# Postgres
|
|
# Postgres
|
|
##############################
|
|
##############################
|
|
|
|
+ echo "Setting up Postgres database"
|
|
sudo -u postgres psql template1 < create-postgres-database.sql
|
|
sudo -u postgres psql template1 < create-postgres-database.sql
|
|
sudo -u benchmarkdbuser psql hello_world < create-postgres.sql
|
|
sudo -u benchmarkdbuser psql hello_world < create-postgres.sql
|
|
rm create-postgres-database.sql create-postgres.sql
|
|
rm create-postgres-database.sql create-postgres.sql
|
|
@@ -192,6 +194,7 @@ class Installer:
|
|
##############################
|
|
##############################
|
|
# MongoDB
|
|
# MongoDB
|
|
##############################
|
|
##############################
|
|
|
|
+ echo "Setting up MongoDB database"
|
|
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
|
|
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
|
|
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
|
|
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
|
|
sudo apt-get -y update
|
|
sudo apt-get -y update
|
|
@@ -213,6 +216,7 @@ class Installer:
|
|
##############################
|
|
##############################
|
|
# Apache Cassandra
|
|
# Apache Cassandra
|
|
##############################
|
|
##############################
|
|
|
|
+ echo "Setting up Apache Cassandra database"
|
|
sudo apt-get install -qqy openjdk-7-jdk
|
|
sudo apt-get install -qqy openjdk-7-jdk
|
|
export CASS_V=2.0.7
|
|
export CASS_V=2.0.7
|
|
wget -nv http://archive.apache.org/dist/cassandra/$CASS_V/apache-cassandra-$CASS_V-bin.tar.gz
|
|
wget -nv http://archive.apache.org/dist/cassandra/$CASS_V/apache-cassandra-$CASS_V-bin.tar.gz
|
|
@@ -227,16 +231,19 @@ class Installer:
|
|
|
|
|
|
mv cassandra/cassandra.yaml apache-cassandra-$CASS_V/conf
|
|
mv cassandra/cassandra.yaml apache-cassandra-$CASS_V/conf
|
|
mv cassandra/log4j-server.properties apache-cassandra-$CASS_V/conf
|
|
mv cassandra/log4j-server.properties apache-cassandra-$CASS_V/conf
|
|
- nohup apache-cassandra-$CASS_V/bin/cassandra > cassandra.log
|
|
|
|
|
|
+ nohup apache-cassandra-$CASS_V/bin/cassandra -p c.pid > cassandra.log
|
|
|
|
|
|
- sleep 20
|
|
|
|
- cat cassandra/create-keyspace.cql | apache-cassandra-$CASS_V/bin/cqlsh {database_host}
|
|
|
|
- python cassandra/db-data-gen.py | apache-cassandra-$CASS_V/bin/cqlsh {database_host}
|
|
|
|
|
|
+ until nc -z {database_host} 9160 ; do echo Waiting for Cassandra; sleep 1; done
|
|
|
|
+ cat cassandra/cleanup-keyspace.cql | apache-cassandra-$CASS_V/bin/cqlsh {database_host}
|
|
|
|
+ python cassandra/db-data-gen.py > cassandra/tfb-data.cql
|
|
|
|
+ apache-cassandra-$CASS_V/bin/cqlsh -f cassandra/create-keyspace.cql {database_host}
|
|
|
|
+ apache-cassandra-$CASS_V/bin/cqlsh -f cassandra/tfb-data.cql {database_host}
|
|
rm -rf apache-cassandra-*-bin.tar.gz cassandra
|
|
rm -rf apache-cassandra-*-bin.tar.gz cassandra
|
|
|
|
|
|
##############################
|
|
##############################
|
|
# Redis
|
|
# Redis
|
|
##############################
|
|
##############################
|
|
|
|
+ echo "Setting up Redis database"
|
|
sudo service redis-server stop
|
|
sudo service redis-server stop
|
|
# NOTE: This will cause errors on Ubuntu 12.04, as apt installs
|
|
# NOTE: This will cause errors on Ubuntu 12.04, as apt installs
|
|
# an older version of redis
|
|
# an older version of redis
|