No description
This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
Joseph Schorr 98e57b9d2b Merge branch 'master' into tutorial
Conflicts:
	endpoints/index.py
	static/css/quay.css
	static/js/app.js
	static/js/controllers.js
	test/data/test.db
2014-02-06 21:23:27 -05:00
art Add a logo for quay. Make the navbar a little friendlier to smaller devices. 2013-10-13 16:13:50 -04:00
auth Allow a request with invalid basic auth to still be considered anonymous, rather than throwing a 401. 2013-12-19 15:18:14 -05:00
binary_dependencies Fix some ordering in the installation instructions. Use an SSL enabled nginx build. Update the location of the list of mime types. 2014-01-07 17:01:19 -05:00
conf Add a mostly working cloud init script and a bitbucket deploy key. The docker run of logstash isn't working for some reason and still must be done manually. 2014-02-04 19:01:04 -05:00
data Merge branch 'master' into tutorial 2014-02-06 21:23:27 -05:00
endpoints Merge branch 'master' into tutorial 2014-02-06 21:23:27 -05:00
screenshots Update the screenshots. Add a screenshot and some marketing copy for logging. Change the branding on the screenshot tabs to Quay.io. 2014-01-10 12:40:14 -05:00
static Merge branch 'master' into tutorial 2014-02-06 21:23:27 -05:00
storage Actually delete the image data when deleting the tag. 2014-01-09 17:13:26 -05:00
templates Merge branch 'master' into tutorial 2014-02-06 21:23:27 -05:00
test First half of pylint fixes for the unit tests. 2014-02-06 14:40:36 -05:00
tools Add a tool to fix the images that were wrong before c8f0780 fixed tags. 2014-02-06 15:34:19 -05:00
util Send everything in production through the gunicorn logger (allows rotation using USR1). Add a gunicorn logger that emits the logstash format. Move the gunicorn config to the conf subdir. Update the postrotate script to hopefully work. 2014-02-04 15:08:49 -05:00
workers Separate out the dockerfile build stuff to a separate class. Add a dependency on docker-py master. 2014-02-05 11:07:54 -05:00
.gitignore Remove left over config from running on elastic beanstalk. 2013-10-16 17:52:19 -04:00
app.py Make the app config more powerful in terms of injecting fake dependencies. Refactor the tests to use metaclasses and to actually all run. 2013-11-06 23:21:12 -05:00
application.py Merge branch 'master' into tutorial 2014-02-06 21:23:27 -05:00
config.py Merge branch 'master' into tutorial 2014-02-06 21:23:27 -05:00
initdb.py Merge remote-tracking branch 'origin/logcabin' 2014-01-31 19:33:38 -05:00
README.md Send everything in production through the gunicorn logger (allows rotation using USR1). Add a gunicorn logger that emits the logstash format. Move the gunicorn config to the conf subdir. Update the postrotate script to hopefully work. 2014-02-04 15:08:49 -05:00
requirements-nover.txt Separate out the dockerfile build stuff to a separate class. Add a dependency on docker-py master. 2014-02-05 11:07:54 -05:00
requirements.txt Separate out the dockerfile build stuff to a separate class. Add a dependency on docker-py master. 2014-02-05 11:07:54 -05:00
run-local.sh Get the basic tutorial working completely, including reacting to server-side events 2014-02-06 20:58:26 -05:00

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.dockerfilebuild -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 <pids of worker daemons>
restart daemons

running the tests:

STACK=test python -m unittest discover

generating screenshots:

cd screenshots
casperjs screenshots.js --d