added production notes

pull/1/head
Ed Summers 2011-10-06 23:13:31 -04:00
parent 1a12a18196
commit 939b76b355
1 changed files with 36 additions and 5 deletions

View File

@ -32,9 +32,42 @@ to install python-setuptools in step 1:
1. `django-admin.py runserver 0.0.0.0:8000` (you can change the port number from the default value of 8000)
1. point your browser at http://localhost:8000/
OS X
-------
You should have XCode installed
Production Deployment
---------------------
1. create an ubuntu natty ec2 instance using ami-1aad5273
1. `sudo aptitude update`
1. `sudo aptitude upgrade`
1. `sudo aptitude install git apache libapache2-mod-wsgi mysql-client libmysqlclient-dev python-virtualenv python-dev`
1. `sudo mkdir /opt/regluit`
1. `sudo chown ubuntu:ubuntu /opt/regluit`
1. `cd /opt`
1. `git config --global user.name "Ed Summers"`
1. `git config --global user.email "ehs@pobox.com"`
1. `ssh-keygen`
1. add `~/.ssh/id_rsa.pub` as a deploy key on github
1. `git clone git@github.com:Gluejar/regluit.git`
1. `cd /opt/regluit`
1. `cp settings/dev.py settings/prod.py`
1. create an Amazon RDS instance
1. `mysql -u root -h gluejardb.cboagmr25pjs.us-east-1.rds.amazonaws.com -p`
1. `CREATE DATABASE unglueit_dev CHARSET utf8;`
1. `GRANT ALL ON unglueit_dev.* TO unglueit_dev@ip-10-244-250-168.ec2.internal IDENTIFIED BY 'unglueit_d3v' REQUIRE SSL`
1. update settings/prod.py with database credentials
1. `virtualenv --no-site-packages ENV`
1. `source ENV/bin/activate`
1. `pip install -r requirements.pip`
1. `echo "/opt/" > ENV/lib/python2.7/site-packages/regluit.pth`
1. `django-admin.py syncdb --migrate --settings regluit.settings.prod`
1. `sudo ln -s /opt/regluit/deploy/regluit.conf /etc/apache2/sites-available/regluit`
1. `sudo a2ensite regluit`
1. `sudo /etc/init.d/apache2 restart`
OS X Develper Notes
-------------------
To run regluit on OS X you should have XCode installed
Install virtualenvwrapper according
to the process at http://blog.praveengollakota.com/47430655:
@ -66,5 +99,3 @@ http://selenium.googlecode.com/files/selenium-server-standalone-2.5.0.jar
Start the selenium server:
'java -jar selenium-server-standalone-2.5.0.jar'
Be sure to rerun `pip install -r requirements.pip`.