From 1137344e1cbed5e919b75d2337f2dbeb154d076f Mon Sep 17 00:00:00 2001 From: trent bartlem Date: Tue, 4 Nov 2014 00:23:45 +1000 Subject: [PATCH 1/3] changed requirements.txt for xmpp --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 9a87a129..d597a9c1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ # Python Stuff # - see bootstrap.sh mysql-python +xmpppy dnspython passlib @@ -12,4 +13,4 @@ django-bootstrap-form django-celery # Needed Apps -bcrypt \ No newline at end of file +bcrypt From 2d1bdedf111a0bf070e7f3e64f98fb10a33d50c6 Mon Sep 17 00:00:00 2001 From: trent bartlem Date: Wed, 5 Nov 2014 20:49:40 +1000 Subject: [PATCH 2/3] remove duplicate requirement --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d597a9c1..fbfb5011 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ # Python Stuff # - see bootstrap.sh mysql-python -xmpppy dnspython passlib From 284c040bf3f75ab6094420a7e8794a51f1167c7f Mon Sep 17 00:00:00 2001 From: trent bartlem Date: Wed, 5 Nov 2014 21:18:42 +1000 Subject: [PATCH 3/3] Added MySQL config to the bootstrap. --- bootstrap.sh | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) mode change 100644 => 100755 bootstrap.sh diff --git a/bootstrap.sh b/bootstrap.sh old mode 100644 new mode 100755 index c0058e56..6e3fb54b --- a/bootstrap.sh +++ b/bootstrap.sh @@ -22,16 +22,38 @@ sudo pip install --allow-external python-openfire python-openfire==0.2.3-beta sudo pip install https://github.com/eve-val/evelink/zipball/master sudo pip install --allow-external libffi-dev libffi-dev -#TODO collect user input and use that to populate the passwords +export MYSQL_ROOT_PASS=poitot + +sudo debconf-set-selections <<< "mysql-server mysql-server/root_password password $MYSQL_ROOT_PASS" +sudo debconf-set-selections <<< "mysql-server mysql-server/root_password_again password $MYSQL_ROOT_PASS" sudo apt-get -y install mysql-server-5.5 + +#check it's up +sudo mysqladmin status -p$MYSQL_ROOT_PASS + +echo 'Creating databases and allianceauth user' +sudo mysqladmin -p$MYSQL_ROOT_PASS create alliance_auth +sudo mysqladmin -p$MYSQL_ROOT_PASS create alliance_forum +sudo mysqladmin -p$MYSQL_ROOT_PASS create alliance_mumble + +sudo mysql -u root -p$MYSQL_ROOT_PASS -e "CREATE USER 'allianceauth'@'localhost' IDENTIFIED BY 'allianceauth'" +sudo mysql -u root -p$MYSQL_ROOT_PASS -e "GRANT ALL PRIVILEGES ON * . * TO 'allianceauth'@'localhost'"; + +sudo mysqladmin -p$MYSQL_ROOT_PASS flush-privileges + sudo apt-get -y install rabbitmq-server -#sudo apt-get -y install python-xmpp sudo pip install -r requirements.txt chmod +x *.sh echo '--------' -echo 'This would be a good point to adjust mysql passwords, as well as all the stuff ' -echo 'in ./alliance_auth/settings.py otherwise startup.sh will not work.' -echo '--------' \ No newline at end of file +echo 'Almost there!' +echo 'Next steps:\n' +echo '1. Adjust mysql root password if you feel so inclined.' +echo '2. Adjust all the stuff in ./alliance_auth/settings.py.' +echo '3. Comment out bootstrap_permissions() inside groupmanagement/__init__.py' +echo '4. Run sudo python manage.py syncdb to set up the database tables' +echo '5. Uncomment that line that you commented out in step 3.' +echo "6. run cd /vagrant/; ./startup.sh to start, and ./shutdown.sh to stop." +echo '--------'