Chapter 4. Configuring Red Hat Quay
Chapter 4. Configuring Red Hat Quay Before running the Red Hat Quay service as a container, you need to use that same Quay container to create the configuration file ( config.yaml ) needed to deploy Red Hat Quay. To do that, you pass a config argument and a password (replace my-secret-password here) to the Quay container. Later, you use that password to log into the configuration tool as the user quayconfig . Here's an example of how to do that: Start quay in setup mode : On the first quay node, run the following: Open browser : When the quay configuration tool starts up, open a browser to the URL and port 8080 of the system you are running the configuration tool on (for example http://myquay.example.com:8080 ). You are prompted for a username and password. Log in as quayconfig : When prompted, enter the quayconfig username and password (the one from the podman run command line). Fill in the required fields : When you start the config tool without mounting an existing configuration bundle, you will be booted into an initial setup session. In a setup session, default values will be filled automatically. The following steps will walk through how to fill out the remaining required fields. Identify the database : For the initial setup, you must include the following information about the type and location of the database to be used by Red Hat Quay: Database Type : Choose MySQL or PostgreSQL. MySQL will be used in the basic example; PostgreSQL is used with the high availability Red Hat Quay on OpenShift examples. Database Server : Identify the IP address or hostname of the database, along with the port number if it is different from 3306. Username : Identify a user with full access to the database. Password : Enter the password you assigned to the selected user. Database Name : Enter the database name you assigned when you started the database server. SSL Certificate : For production environments, you should provide an SSL certificate to connect to the database. The following figure shows an example of the screen for identifying the database used by Red Hat Quay: Identify the Redis hostname, Server Configuration and add other desired settings : Other setting you can add to complete the setup are as follows. More settings for high availability Red Hat Quay deployment that for the basic deployment: For the basic, test configuration, identifying the Redis Hostname should be all you need to do. However, you can add other features, such as Clair Scanning and Repository Mirroring, as described at the end of this procedure. For the high availability and OpenShift configurations, more settings are needed (as noted below) to allow for shared storage, secure communications between systems, and other features. Here are the settings you need to consider: Custom SSL Certificates : Upload custom or self-signed SSL certificates for use by Red Hat Quay. See Using SSL to protect connections to Red Hat Quay for details. Recommended for high availability. Important Using SSL certificates is recommended for both basic and high availability deployments. If you decide to not use SSL, you must configure your container clients to use your new Red Hat Quay setup as an insecure registry as described in Test an Insecure Registry . Basic Configuration : Upload a company logo to rebrand your Red Hat Quay registry. Server Configuration : Hostname or IP address to reach the Red Hat Quay service, along with TLS indication (recommended for production installations). The Server Hostname is required for all Red Hat Quay deployments. TLS termination can be done in two different ways: On the instance itself, with all TLS traffic governed by the nginx server in the Quay container (recommended). On the load balancer. This is not recommended. Access to Red Hat Quay could be lost if the TLS setup is not done correctly on the load balancer. Data Consistency Settings : Select to relax logging consistency guarantees to improve performance and availability. Time Machine : Allow older image tags to remain in the repository for set periods of time and allow users to select their own tag expiration times. redis : Identify the hostname or IP address (and optional password) to connect to the redis service used by Red Hat Quay. Repository Mirroring : Choose the checkbox to Enable Repository Mirroring. With this enabled, you can create repositories in your Red Hat Quay cluster that mirror selected repositories from remote registries. Before you can enable repository mirroring, start the repository mirroring worker as described later in this procedure. Registry Storage : Identify the location of storage. A variety of cloud and local storage options are available. Remote storage is required for high availability. Identify the Ceph storage location if you are following the example for Red Hat Quay high availability storage. On OpenShift, the example uses Amazon S3 storage. Action Log Storage Configuration : Action logs are stored in the Red Hat Quay database by default. If you have a large amount of action logs, you can have those logs directed to Elasticsearch for later search and analysis. To do this, change the value of Action Logs Storage to Elasticsearch and configure related settings as described in Configure action log storage . Action Log Rotation and Archiving : Select to enable log rotation, which moves logs older than 30 days into storage, then indicate storage area. Security Scanner : Enable security scanning by selecting a security scanner endpoint and authentication key. To setup Clair to do image scanning, refer to Clair Setup and Configuring Clair . Recommended for high availability. Application Registry : Enable an additional application registry that includes things like Kubernetes manifests or Helm charts (see the App Registry specification ). rkt Conversion : Allow rkt fetch to be used to fetch images from Red Hat Quay registry. Public and private GPG2 keys are needed. This field is deprecated. E-mail : Enable e-mail to use for notifications and user password resets. Internal Authentication : Change default authentication for the registry from Local Database to LDAP, Keystone (OpenStack), JWT Custom Authentication, or External Application Token. External Authorization (OAuth) : Enable to allow GitHub or GitHub Enterprise to authenticate to the registry. Google Authentication : Enable to allow Google to authenticate to the registry. Access Settings : Basic username/password authentication is enabled by default. Other authentication types that can be enabled include: external application tokens (user-generated tokens used with docker or rkt commands), anonymous access (enable for public access to anyone who can get to the registry), user creation (let users create their own accounts), encrypted client password (require command-line user access to include encrypted passwords), and prefix username autocompletion (disable to require exact username matches on autocompletion). Registry Protocol Settings : Leave the Restrict V1 Push Support checkbox enabled to restrict access to Docker V1 protocol pushes. Although Red Hat recommends against enabling Docker V1 push protocol, if you do allow it, you must explicitly whitelist the namespaces for which it is enabled. Dockerfile Build Support : Enable to allow users to submit Dockerfiles to be built and pushed to Red Hat Quay. This is not recommended for multitenant environments. Validate the changes : Select Validate Configuration Changes . If validation is successful, you will be presented with the following Download Configuration modal: Download configuration : Select the Download Configuration button and save the tarball ( quay-config.tar.gz ) to a local directory to use later to start Red Hat Quay. At this point, you can shutdown the Red Hat Quay configuration tool and close your browser. , copy the tarball file to the system on which you want to install your first Red Hat Quay node. For a basic install, you might just be running Red Hat Quay on the same system.
sudo podman run --rm -it --name quay_config -p 8080:8080 registry.redhat.io/quay/quay-rhel8:v3.10.9 config my-secret-password