2015-11-02 19:16:04 +00:00
|
|
|
# Quay - container image registry
|
2014-05-27 19:19:23 +00:00
|
|
|
|
2015-11-02 19:16:04 +00:00
|
|
|
`master` branch build status: ![Docker Repository on Quay](https://quay.io/repository/quay/quay/status?token=7bffbc13-8bb0-4fb4-8a70-684a0cf485d3 "Docker Repository on Quay")
|
2015-08-21 20:40:41 +00:00
|
|
|
|
2015-11-02 19:16:04 +00:00
|
|
|
Quay is a container image registry with managements APIs, a Docker registry API, a container build system.
|
2015-06-16 21:55:43 +00:00
|
|
|
The application is implemented as a set of API endpoints written in python and an Angular.js frontend.
|
2014-05-27 19:19:23 +00:00
|
|
|
|
2015-06-16 21:55:43 +00:00
|
|
|
## Setup Development Environment
|
2013-10-11 04:57:27 +00:00
|
|
|
|
2015-06-16 21:55:43 +00:00
|
|
|
If you are doing local development on your workstation against the code base follow these instructions.
|
2013-10-02 20:42:12 +00:00
|
|
|
|
2015-08-18 17:47:16 +00:00
|
|
|
### Docker
|
|
|
|
|
|
|
|
Quay and its parts can run inside of docker containers.
|
|
|
|
This method requires no installation of any python packages on your host machine.
|
|
|
|
The `local-docker.sh` script is provided to prepare and run parts of quay.
|
|
|
|
First, start redis:
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
docker run -d -p 6379:6379 redis
|
|
|
|
```
|
|
|
|
|
|
|
|
And clone the configuration repo:
|
|
|
|
|
|
|
|
```
|
|
|
|
git clone git@github.com:coreos-inc/quay-config.git ../quay-config
|
|
|
|
ln -s ../../quay-config/local conf/stack
|
|
|
|
```
|
|
|
|
|
|
|
|
To build and run a docker container, pass one argument to local-docker.sh:
|
|
|
|
|
|
|
|
- `dev`: run quay on port 5000
|
|
|
|
- `buildman`: run the buildmanager
|
|
|
|
- `notifications`: run the notification worker
|
|
|
|
- `test`: run the unit tests
|
2015-10-06 05:29:15 +00:00
|
|
|
- `initdb`: clear and initialize the test database
|
2015-08-18 17:47:16 +00:00
|
|
|
|
|
|
|
For example:
|
|
|
|
|
|
|
|
```
|
|
|
|
./local-docker.sh dev
|
|
|
|
````
|
|
|
|
|
|
|
|
will start quay in a docker container.
|
|
|
|
Now quay will be running on: http://127.0.0.1:5000
|
|
|
|
The username is `devtable` and the password is `password`.
|
|
|
|
|
2015-06-16 21:55:43 +00:00
|
|
|
### OS X
|
2014-05-27 19:19:23 +00:00
|
|
|
|
|
|
|
```
|
2015-06-16 21:55:43 +00:00
|
|
|
git clone git@github.com:coreos-inc/quay.git
|
2014-05-27 19:19:23 +00:00
|
|
|
cd quay
|
2015-06-16 21:55:43 +00:00
|
|
|
./contrib/osx/local-setup.sh
|
2014-02-01 00:21:05 +00:00
|
|
|
```
|
|
|
|
|
2015-06-16 21:55:43 +00:00
|
|
|
Now run the server; it will use sqlite as the SQL server.
|
2014-02-26 18:45:49 +00:00
|
|
|
|
|
|
|
```
|
2015-06-16 21:55:43 +00:00
|
|
|
./local-run.sh
|
2014-02-26 18:45:49 +00:00
|
|
|
```
|
|
|
|
|
2015-06-16 21:55:43 +00:00
|
|
|
Now quay will be running on: http://127.0.0.1:5000
|
|
|
|
The username is `devtable` and the password is `password`.
|
2016-04-05 18:18:01 +00:00
|
|
|
|
|
|
|
Some packages may fail to build with clang (which now defaults to C11).
|
|
|
|
They can be installed with C99 with:
|
|
|
|
|
|
|
|
```
|
|
|
|
CFLAGS='-std=c99' pip install --no-cache --no-binary :all: gevent
|
|
|
|
CFLAGS='-std=c99' pip install --no-cache --no-binary :all: cffi
|
|
|
|
CFLAGS='-std=c99' pip install --no-cache --no-binary :all: cryptography
|
|
|
|
```
|
|
|
|
|
2016-04-06 17:52:42 +00:00
|
|
|
## Update Requirements
|
|
|
|
|
|
|
|
1. Create a new virtualenv
|
|
|
|
2. Activate new virtualenv
|
|
|
|
3. Install unversioned dependencies
|
|
|
|
4. Run tests
|
|
|
|
5. Freeze requirements
|
|
|
|
6. Deactivate virtualenv
|
|
|
|
7. Remove virtualenv
|
|
|
|
|
|
|
|
Example (commands may differ dependending on virtualenv tools):
|
|
|
|
|
|
|
|
```
|
|
|
|
pyenv virtualenv 2.7.11 quay-deps
|
|
|
|
pyenv activate quay-deps
|
|
|
|
pip install -r requirements-nover.txt
|
|
|
|
./local-test.sh
|
|
|
|
pip freeze > requirements.txt
|
|
|
|
pyenv deactivate quay-deps
|
|
|
|
pyenv uninstall quay-deps
|
|
|
|
```
|