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
Joseph Schorr 7b733a75cc Remove dex from the CLI username whitelist
Dex isn't an internal auth service (one that replaces the database), but an *external* one (one that supplements the internal auth). Therefore, it should not be included in this list.

Fixes https://jira.coreos.com/browse/QUAY-1333
2019-02-15 15:37:15 -05:00
..
conf Add init script to download extra ca certs 2018-08-17 15:42:42 -04:00
config_endpoints Setup reroutes when complete, fix gunicorn check 2018-08-31 15:17:48 -04:00
config_test Add db configuration to modifying config 2018-08-21 15:19:24 -04:00
config_util Adds tests for some config helpers 2018-08-29 16:12:56 -04:00
docs Add all kube templates 2018-08-31 15:39:56 -04:00
init Modify ldap validator to just check user existence 2018-07-11 16:49:13 -04:00
js Remove dex from the CLI username whitelist 2019-02-15 15:37:15 -05:00
static Add config ability to rollback changes on kube 2018-08-29 13:37:52 -04:00
templates Add components for generating sec keys 2018-08-15 17:18:41 -04:00
__init__.py Start moving configapp into separate dir 2018-06-12 14:44:15 -04:00
_init_config.py Change spacing from 4 spaces to 2 spaces 2018-08-16 16:49:10 -04:00
c_app.py Change spacing from 4 spaces to 2 spaces 2018-08-16 16:49:10 -04:00
config_application.py Change spacing from 4 spaces to 2 spaces 2018-08-16 16:49:10 -04:00
config_web.py Change spacing from 4 spaces to 2 spaces 2018-08-16 16:49:10 -04:00
Procfile Fix dockerfile being able to pass in params 2018-06-12 14:45:00 -04:00
README.md Add config app readme 2018-08-29 12:48:17 -04:00
webpack.config.js Add cor progress bar 2018-06-12 14:45:00 -04:00

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 Quay Enterprise).

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.

docker run {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