to prepare a new host: ``` sudo apt-get update sudo apt-get install -y git python-virtualenv python-dev phantomjs libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev libevent-dev gdebi-core ``` check out the code: ``` git clone https://bitbucket.org/yackob03/quay.git cd quay virtualenv --distribute venv source venv/bin/activate pip install -r requirements.txt sudo gdebi --n binary_dependencies/*.deb sudo cp conf/logrotate/* /etc/logrotate.d/ ``` running: ``` sudo mkdir -p /mnt/logs/ && sudo chown $USER /mnt/logs/ && sudo /usr/local/nginx/sbin/nginx -c `pwd`/conf/nginx.conf sudo mkdir -p /mnt/logs/ && sudo chown $USER /mnt/logs/ && STACK=prod gunicorn -c conf/gunicorn_config.py application:application ``` start the log shipper: ``` curl -s https://get.docker.io/ubuntu/ | sudo sh sudo docker pull quay.io/quay/logstash sudo docker run -d -e REDIS_PORT_6379_TCP_ADDR=logs.quay.io -v /mnt/logs:/mnt/logs quay.io/quay/logstash quay.conf ``` start the workers: ``` STACK=prod python -m workers.diffsworker -D STACK=prod python -m workers.webhookworker -D ``` bouncing the servers: ``` sudo kill -HUP `cat /mnt/logs/nginx.pid` kill -HUP `cat /mnt/logs/gunicorn.pid` kill restart daemons ``` running the tests: ``` TEST=true python -m unittest discover ``` running the tests with coverage (requires coverage module): ``` TEST=true coverage run -m unittest discover coverage html ``` generating screenshots: ``` cd screenshots casperjs screenshots.js --d ```