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:
parent
82287926ab
commit
69c2f5185b
2 changed files with 23 additions and 93 deletions
108
README.md
108
README.md
|
@ -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
|
git clone git@github.com:coreos-inc/quay.git
|
||||||
sudo apt-get update && sudo apt-get install -y git
|
|
||||||
git clone https://github.com/coreos-inc/quay.git
|
|
||||||
cd quay
|
cd quay
|
||||||
rm Dockerfile
|
./contrib/osx/local-setup.sh
|
||||||
ln -s Dockerfile.web Dockerfile
|
|
||||||
sudo docker build -t quay.io/quay/quay .
|
|
||||||
sudo docker push quay.io/quay/quay
|
|
||||||
```
|
```
|
||||||
|
|
||||||
to prepare a new host:
|
## Running Development Environment
|
||||||
|
|
||||||
Deploy cloud-init script from quayconfig/cloudconfig/webserver.yaml
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
|
Now run the server; it will use sqlite as the SQL server.
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -s https://get.docker.io/ubuntu/ | sudo sh
|
./local-run.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
|
|
||||||
```
|
```
|
||||||
|
|
||||||
start the quay processes:
|
Now quay will be running on: http://127.0.0.1:5000
|
||||||
|
The username is `devtable` and the password is `password`.
|
||||||
```
|
|
||||||
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
|
|
||||||
```
|
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
#!/bin/bash
|
#!/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
|
# Install Docker and C libraries on which Python libraries are dependent
|
||||||
brew update
|
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
|
# Some OSX installs don't have /usr/include, which is required for finding SASL headers for our LDAP library
|
||||||
if [ ! -e /usr/include ]; then
|
if [ ! -e /usr/include ]; then
|
Reference in a new issue