Chapter 3. Deploying the Red Hat Quay registry
To deploy the Red Hat Quay registry after installing the Operator, you must create an instance based on the QuayRegistry custom resource (CR), which can be done using the OpenShift Container Platform web console or the oc cli (command-line interface). For the registry to deploy successfully, you must have, or configure, an object storage provider.
The following sections provide you with the information necessary to configure managed or unmanaged object storage, and then deploy the Red Hat Quay registry.
The following procedures show you how to create a basic Red Hat Quay registry in all namespaces of the OpenShift Container Platform deployment. Depending on your needs, advanced configuration might be necessary. For example, you might need to configure SSL/TLS for your deployment or disable certain components. Advanced configuration practices are covered in later chapters of this guide.
3.1. Deploying the Red Hat Quay registry by using the OpenShift Container Platform web console Copy linkLink copied to clipboard!
Use the OpenShift Container Platform web console to create and deploy a basic Red Hat Quay registry instance.
Prerequisites
- You have installed the Red Hat Quay Operator.
- You have have administrative privileges to the cluster.
Procedure
-
On the OpenShift Container Platform web console, click Operators
Installed Operators Red Hat Quay. - On the Red Hat Quay dashboard, click Create instance.
On the Create QuayRegistry page, review the default settings of the
QuayRegistrycustom resource (CR). Here, you decide whether to to use managed or unmanaged object storage.If you are using the Multicloud Object Gateway or Red Hat OpenShift Data Foundation as your object storage, keep the following settings:
- kind: objectstorage managed: true- kind: objectstorage managed: trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow If you are using a different storage provider, such as Google Cloud Platform, AWS S3, or Nutanix, set the
objectstoragecomponent as follows:- kind: objectstorage managed: false- kind: objectstorage managed: falseCopy to Clipboard Copied! Toggle word wrap Toggle overflow
- Click Create. You are redirected to the Quay Registry tab on the Operator page.
Click the name of the Red Hat Quay registry that you created, then click Events to view the status of creation. If you used managed storage and leveraged the Multicloud Object Gateway, the registry completes creation. If you are using Red Hat OpenShift Data Foundation or an unmanaged storage backend provider, complete the following steps:
- Click the Details page of the Red Hat Quay registry.
- Click the name of the Config Bundle Secret resource, for example, <example_registry_name_config-bundle-secret-12345>.
Click Actions
Edit Secret, and pass in the following information from your backend storage provider: Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteDepending on your storage provider, different information is required. For more information, see see Storage object configuration fields.
- Click Save, and then re-navigate to the Events page of the registry to ensure successful deployment.
3.2. Deploying the Red Hat Quay registry by using the CLI Copy linkLink copied to clipboard!
Use the oc command-line interface (CLI) to create and deploy a basic Red Hat Quay registry instance.
The following config.yaml file includes automation configuration options. Collectively, these options streamline using the CLI with your registry, helping reduce dependency on the UI. Adding these fields to your config.yaml file is optional if you plan to use the UI, but recommended if you plan to use the CLI.
For more information, see Automation configuration options.
Prerequisites
- You have logged into OpenShift Container Platform using the CLI.
Procedure
Create a namespace, for example,
quay-enterprise, by entering the following command:oc new-project quay-enterprise
$ oc new-project quay-enterpriseCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
QuayRegistrycustom resource (CR).If the
objectstoragecomponent is set tomanaged: true, complete the following steps:Create the
QuayRegistryCR by entering the following command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
If the
objectstoragecomponent is set tomanaged: false, complete the following steps:Create the
config.yamlfile for Red Hat Quay by entering the following command. You must include the information required for your backend storage provider. During this step, you can enable additional Red Hat Quay features. The following example is for a minimal configuration that includes the configuration options for automating early setup tasks:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- Set this field to
trueif you plan to create the first user by using API. - 2
- Include this field and the username that you plan to leverage as a Red Hat Quay administrator.
- 3
- When set to
False, allows general browser-based access to the API. - 4
- When set to
False, relegates the creation of new users to only superusers.
Create a secret for the configuration by entering the following command:
oc create secret generic <quay_config_bundle_name> \ --from-file=config.yaml=</path/to/config.yaml> \ -n quay-enterprise \ --dry-run=client -o yaml | oc apply -f -
$ oc create secret generic <quay_config_bundle_name> \ --from-file=config.yaml=</path/to/config.yaml> \ -n quay-enterprise \ --dry-run=client -o yaml | oc apply -f -Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
QuayRegistryCR by entering the following command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- Must be set to false when providing your own storage backend.
Verification
Check the status of your registry by entering the following command:
oc describe quayregistry <registry_name> -n quay-enterprise
$ oc describe quayregistry <registry_name> -n quay-enterpriseCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
... Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal ComponentsCreationSuccess 23s (x2458 over 42h) quayregistry-controller All objects created/updated successfully
... Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal ComponentsCreationSuccess 23s (x2458 over 42h) quayregistry-controller All objects created/updated successfullyCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Alternatively, you can check pod statuses for your registry deployment by entering the following command:
Enter the following command to view the deployed components:
oc get pods -n quay-enterprise
$ oc get pods -n quay-enterpriseCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Additional resources
- For more information about how to track the progress of your Red Hat Quay deployment, see Monitoring and debugging the deployment process.