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.
quay/config_app
Jimmy Zelinskie 9c0dd3b722 initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
..
conf initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
config_endpoints initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
config_test initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
config_util initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
docs initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
init initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
js initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
static initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
templates initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
Procfile initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
README.md initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
__init__.py initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
_init_config.py initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
c_app.py initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
config_application.py initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
config_web.py initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00
webpack.config.js initial import for Open Source 🎉 2019-11-12 11:09:47 -05:00

README.md

Quay config tool

The Quay config tool is a project to ease the setup, modification, and deployment of Red Hat Quay (sometimes referred to as Red Hat Quay).

The project was built by Sam Chow in the summer of 2018.

Project Features

  • Isolated setup tool for creating the config
  • Ability to download config as a tarball
  • Ability to load your config from a tarball and modify it
  • When running on Kubernetes, allows you to deploy your changes to the current cluster and cycles all pods
  • When running on Kubernetes, allows you to modify the existing configuration

Project Layout

  • conf/ - nginx/gunicorn configuration

  • config_endpoints/ - backend flask endpoints for serving web and all other API endpoints

  • config_util/ - utils used by api endpoints for accessing k8s, etc.

  • config_util/config - config providers used to manipulate the local config directory before being tarred, uploaded, etc.

  • docs/ - some updated documentation on how to run the app in both a docker container and on kubernetes

  • init/ - initial scripts/services started by the docker image

  • js/ - all frontend javascript

  • js/components - mix of the old components ported over, and new components written for the config tool. (config-setup-app is the entrypoint of the frontend)

  • js/core-config-setup - The main component responsible for modification of the config. Holds most of the components that modify the configuration

  • js/setup - The modal component that covers the setup of the DB and SuperUser

Running the config tool

Currently, the config tool is still being built alongside the regular Quay container, and is started with the config argument to the image. A password is required to be specified, which will then need to be entered with the username quayconfig in the browser.

docker run {quay-image} config {password}

The password can also be specified via the CONFIG_APP_PASSWORD environment variable:

docker run -e CONFIG_APP_PASSWORD={password} {quay-image} config

Local development

If you wish to work on it locally, there's a script in the base dir of quay:

./local-config-app.sh

Webpack is setup for hot reloading so the JS will be rebuilt if you're working on it.

Local development on kubernetes

Assuming you're running on minikube, you can build the docker image with the minikube docker daemon:

eval $(minikube docker-env)
docker built -t config-app . # run in quay dir, not quay/config_app

You'll now have to create the namespace, config secret (and optionally the quay-enterprise app and nodeport)

(Optional, use if you're testing the deployment feature on kube)

And the following for the config-tool

Apply all of these onto the cluster

kubectl apply -f <name-of-file>

You can get minikube to route you to the services:

minikube service quay-enterprise-config-tool -n quay-enterprise

It should open up on your default browser.

(Note: The config tool is only available through SSL and self-signs certs on startup, so you'll have to use https://<route> and pass through the warning on your browser to access it.)

When you make changes to the app, you'll have to rebuild the image and cycle the deployment:

kubectl scale deploy --replicas=0 quay-enterprise-config-tool -n quay-enterprise
kubectl scale deploy --replicas=1 quay-enterprise-config-tool -n quay-enterprise