README: document getting started process

The old instructions were rather dense and I believe out of date.
Replace it with this set of instructions.

Move the local-setup script to contrib/osx in anticipation for a
contrib/linux and contrib/k8s setup.
This commit is contained in:
Brandon Philips 2015-06-16 17:55:43 -04:00
parent 82287926ab
commit 69c2f5185b
2 changed files with 23 additions and 93 deletions

108
README.md
View file

@ -1,101 +1,27 @@
to build and upload quay to quay:
# Quay.io - container image registry
Quay.io is a container image registry with managements APIs, a Docker registry API, a container build system.
The application is implemented as a set of API endpoints written in python and an Angular.js frontend.
## Setup Development Environment
If you are doing local development on your workstation against the code base follow these instructions.
### OS X
```
curl -s https://get.docker.io/ubuntu/ | sudo sh
sudo apt-get update && sudo apt-get install -y git
git clone https://github.com/coreos-inc/quay.git
git clone git@github.com:coreos-inc/quay.git
cd quay
rm Dockerfile
ln -s Dockerfile.web Dockerfile
sudo docker build -t quay.io/quay/quay .
sudo docker push quay.io/quay/quay
./contrib/osx/local-setup.sh
```
to prepare a new host:
Deploy cloud-init script from quayconfig/cloudconfig/webserver.yaml
or
## Running Development Environment
Now run the server; it will use sqlite as the SQL server.
```
curl -s https://get.docker.io/ubuntu/ | sudo sh
sudo apt-get update && sudo apt-get install -y git
git clone https://github.com/DevTable/gantryd.git
cd gantryd
cat requirements.system | xargs sudo apt-get install -y
virtualenv --distribute venv
venv/bin/pip install -r requirements.txt
sudo docker login -u 'quay+deploy' -e notused staging.quay.io
./local-run.sh
```
start the quay processes:
```
cd ~
git clone https://github.com/coreos-inc/quay.git
sudo docker pull staging.quay.io/quay/quay
cd ~/gantryd
sudo venv/bin/python gantry.py ../quayconfig/production/gantry.json update quay
```
to build and upload the builder to quay
```
curl -s https://get.docker.io/ubuntu/ | sudo sh
sudo apt-get update && sudo apt-get install -y git
git clone git clone https://github.com/coreos-inc/quay.git
cd quay
rm Dockerfile
ln -s Dockerfile.buildworker Dockerfile
sudo docker build -t quay.io/quay/builder .
sudo docker push quay.io/quay/builder
```
to run the builder from a fresh 14.04 server:
Deploy cloud-init script from quayconfig/cloudconfig/builder.yaml
or
```
sudo apt-get update && sudo apt-get install -y git lxc linux-image-extra-`uname -r`
curl -s https://get.docker.io/ubuntu/ | sudo sh
git clone https://github.com/DevTable/gantryd.git
cd gantryd
cat requirements.system | xargs sudo apt-get install -y
virtualenv --distribute venv
venv/bin/pip install -r requirements.txt
sudo docker login -u 'quay+deploy' -e notused quay.io
```
start the worker
```
cd ~
git clone https://github.com/coreos-inc/quay.git
sudo docker pull quay.io/quay/builder
cd ~/gantryd
sudo venv/bin/python gantry.py ../quayconfig/production/gantry.json update builder
```
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
```
Now quay will be running on: http://127.0.0.1:5000
The username is `devtable` and the password is `password`.

View file

@ -1,10 +1,14 @@
#!/bin/bash
set -e
# Put us at the root of the quay repo no matter what
pushd $(dirname "${0}") > /dev/null
basedir=$(pwd -L)
cd "${basedir}"/../../
# Install Docker and C libraries on which Python libraries are dependent
brew update
brew install boot2docker docker libevent libmagic postgresql
brew upgrade
brew install boot2docker docker libevent libmagic postgresql gpgme
# Some OSX installs don't have /usr/include, which is required for finding SASL headers for our LDAP library
if [ ! -e /usr/include ]; then