
* Add simple Vagrantfile to provision an Ubuntu 14.04 VM with the bootstrap.sh script * Update README with instructions for use Change-Id: I94cd69742aeffab4c01a27510c25f381151bfefe
25 lines
983 B
Bash
25 lines
983 B
Bash
#!/usr/bin/env bash
|
|
|
|
debconf-set-selections <<< 'mysql-server mysql-server/root_password password ROOTPASSWORD'
|
|
debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password ROOTPASSWORD'
|
|
|
|
sudo apt-get update
|
|
sudo apt-get install -y python-dev ipython mysql-server mysql-client libmysqlclient-dev git vim rabbitmq-server python-pip librabbitmq1
|
|
|
|
pip install virtualenv
|
|
|
|
if [ ! -f /var/log/dbinstalled ];
|
|
then
|
|
echo "CREATE USER 'winchester'@'localhost' IDENTIFIED BY 'testpasswd'" | mysql -uroot -pROOTPASSWORD
|
|
echo "CREATE DATABASE winchester" | mysql -uroot -pROOTPASSWORD
|
|
echo "GRANT ALL ON winchester.* TO 'winchester'@'localhost'" | mysql -uroot -pROOTPASSWORD
|
|
echo "flush privileges" | mysql -uroot -pROOTPASSWORD
|
|
touch /var/log/dbinstalled
|
|
if [ -f /vagrant/data/initial.sql ];
|
|
then
|
|
mysql -uroot -pROOTPASSWORD internal < /vagrant/data/initial.sql
|
|
fi
|
|
fi
|
|
|
|
git clone https://github.com/stackforge/stacktach-sandbox.git
|