No description
ebf4120326
Fixes #1914 |
||
---|---|---|
auth | ||
avatars | ||
buildman | ||
buildstatus | ||
buildtrigger | ||
conf | ||
data | ||
digest | ||
emails | ||
endpoints | ||
events | ||
features | ||
grunt | ||
health | ||
image | ||
static | ||
storage | ||
templates | ||
test | ||
tools | ||
util | ||
workers | ||
.dockerignore | ||
.gitignore | ||
alembic.ini | ||
app.py | ||
application.py | ||
boot.py | ||
build.sh | ||
CHANGELOG.md | ||
config.py | ||
dev.df | ||
Dockerfile | ||
external_libraries.py | ||
initdb.py | ||
local-docker.sh | ||
local-run.sh | ||
local-test.sh | ||
MAINTAINERS | ||
pylintrc | ||
README.md | ||
registry.py | ||
release.py | ||
requirements-dev.txt | ||
requirements-nover.txt | ||
requirements.txt | ||
ROADMAP.md | ||
secscan.py | ||
verbs.py | ||
web.py |
quay
Note: The master
branch may be in an unstable or even broken state during development.
Please use releases instead of the master
branch in order to get stable binaries.
Quay is project to build, store, and distribute container images.
High-level features include:
- Docker Registry Protocol v1, v2
- Docker Manifest Schema v2.1
- AppC Image Discovery via on-demand transcoding
- Image Squashing via on-demand transcoding
- Authentication provided by LDAP, Keystone, Dex, Google, GitHub
- ACLs, team management, and auditability logs
- Geo-replicated storage provided by local filesystems, S3, GCS, Swift, Ceph
- Continuous Integration integrated with GitHub, Bitbucket, GitLab, and git
- Security Vulnerability Analysis via Clair
- Swagger-compliant HTTP API
Getting Started
macOS
macOS developers will need:
# Download the code
git clone git@github.com:coreos-inc/quay.git && cd quay
# Install the system dependencies
brew install libevent libmagic postgresql gpgme pyenv pyenv-virtualenv docker docker-machine
# create a default virtualmachine for docker
docker-machine create -d virtualbox default
# setup brew dependencies
# note you may want to add these to your bashrc or zshrc file
eval "$(pyenv virtualenv-init -)"
eval "$(pyenv init -)"
eval $(/usr/local/bin/docker-machine env default)
# Some installs don't have /usr/include, required for finding SASL header files
# http://apple.stackexchange.com/questions/196224/unix-ln-s-command-not-permitted-in-osx-el-capitan-beta3
# note this command might fail because of new OSx write protections here above is a link that explains
# how to fix that
if [ ! -e /usr/include ]; then sudo ln -s `xcrun --show-sdk-path`/usr/include /usr/include; fi
# Install the Python dependencies
pyenv install 2.7.11
pyenv virtualenv 2.7.11 quay
pyenv activate quay
# Some packages may fail to build with clang (which now defaults to C11).
CFLAGS='-std=c99' pip install -r requirements.txt
pip install -r requirements-dev.txt
# Setup a local config
git clone git@github.com:coreos-inc/quay-config.git ../quay-config
ln -s ../../quay-config/local conf/stack
Useful docs
docker docker-machine pyenv pyenv-virtualenv
Linux
TODO
Running and Testing
Test Data
A SQLite database full of test data is committed to this git repository at test/data/test.db
.
This database is generated by executing python initdb.py
.
The username and password of the admin test account is devtable
and password
, respectively.
Local Scripts
local-run
runs the web server for testinglocal-test
runs the unit test suite
Development inside Docker
To build and run a development container, pass one argument to local-docker.sh:
buildman
: run the buildmanagerdev
: run web server on port 5000initdb
: clear and initialize the test databasenotifications
: run the notification workertest
: run the unit test suite
Adding a Python Dependency
# Create a new virtualenv and activate it
pyenv virtualenv 2.7.11 quay-deps
pyenv activate quay-deps
# Install unversioned dependencies with your changes
pip install -r requirements-nover.txt
# Run the unit test suite
./local-test.sh
# Freeze the versions of all of the dependencies
pip freeze > requirements.txt
Running the Build System
TODO
# Run an instance of redis
docker run -d -p 6379:6379 quay.io/quay/redis
Documentation
Architecture at a Glance
TODO
Terminology
Organizations
- AppC: a standards body responsible for a Runtime and Image Format superseded by the Open Container Initiative
- Open Container Initiative: a standards body responsible for a Runtime specification and an Image Format
- Docker: a company that builds a platform that has its own Image Formats, Build System, Container Runtime, and Container Orchestration
Concepts
- Image: an archive containing all of the contents necessary to execute a container
- Image Format: a specification for the structure of an Image
- Image Layer: an Image that may depend on being applied to other Images to generate a final Image
- Image Squashing: the process of compressing an Image into a single Layer
- Manifest: a text file containing metadata for a particular Image
- Tag: a human-friendly named, mutable pointer to a particular set of Images
- Build System: a program used to generate Images
- Registry: a program that speaks one or more standard protocols to store and receive Images
- Repository: a collection of related Tags organized by a Registry
- Push: the act of uploading an Image to a Registry
- Pull: the act of downloading an Image from a Registry
- Container: an Image and its execution environment
- Container Runtime: a program that can transform an Image into a Container by executing it
- Container Orchestration: a program or set of programs that provides a framework for deploying Containers
Software
- Quay.io: CoreOS's hosted Registry
- Quay: CoreOS's enterprise-grade Registry product
- quayctl: an open source program that implements alternative methods for pulling Images from Quay
- Clair: an open source static analysis tool used to detect vulnerability in Images
- Quay Security Scanning: the integration between Clair and Quay
- Kubernetes: an open source program implementing Container Orchestration
- Docker Hub: Docker's hosted Registry
- Docker Trusted Registry: Docker's enterprise-grade Registry product
- Notary: an open source implementation of the TUF protocol used in Docker Content Trust
- Docker Content Trust: the integration between Notary and Docker Trusted Registry
- Docker Engine: a program used to interact with all aspects of the Docker platform
- Swarm: a program implementing Container Orchestration for the Docker platform