Prerequisites
|
This tutorial was developed and tested with:
|
The following tools are required to run the exercises in this tutorial. Please ensure that they are installed and properly configured before proceeding with any of the tutorial chapters.
| Tool | Reference |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
Note: Some of these tools are also available through the web terminal provided by the operator.
ODF Operator
Install OpenShift Data Foundation Operator by following these steps:
-
Open a browser window and log in to the Red Hat OpenShift Container Platform web console.
-
From the Administrator perspective, click
Operators, and then selectOperatorHub. -
In the Filter by keyword field, type
ODF.
-
Select the Red Hat OpenShift Data Foundation tile and click the
Installbutton.
-
On the Install Operator page, select
stable-4.19from the list of available Update Channel options, and then choose A specific namespace on the cluster. Leave the default value for Installed Namespace asopenshift-storage, and set Update Approval toAutomatic. Also, make sure to enable the console plug-in.
-
Click
Install.
Creating the ODF Cluster
Deploy an OpenShift Data Foundation (ODF) StorageCluster using the OpenShift web console.
-
From the Administrator perspective in the OpenShift console, navigate to
Storage>Data Foundation. -
Go to the Storage System tab.
-
Click
Create StorageSystem.
Select the backing storage type:
-
On the first page of the wizard (Backing storage), select
Use an existing StorageClass. For example,gp3-csi. -
Click
Next.
-
Select the desired capacity and nodes.
-
Click
Next.
-
Leave the default options for Security and network and Review and create. Then click
NextandCreate StorageSystem, respectively.
| Wait until the OpenShift Data Foundation components are fully deployed before proceeding. |
Installing the Quay Operator
Subscribe to and deploy the Red Hat Quay Operator.
-
Open a browser window and log in to the Red Hat OpenShift Container Platform web console.
-
From the Administrator perspective, click
Operators, and then selectOperatorHub. -
In the Filter by keyword field, type
Red Hat Quay.
-
Select the Red Hat Quay tile and click the
Installbutton.
-
On the Install Operator page, select
stable-3.15from the list of available Update Channel options. Then, chooseAll namespaces on the cluster (default)as the installation mode and selectAutomaticfor update approval.
-
Click
Install.
Deploying Quay
-
Create a new project named
quay-workshop. -
From the Administrator perspective, navigate to
Operators, and then selectInstalled Operators. Choose thequay-workshopproject and select the Red Hat Quay Operator. -
Click
Create instanceto create a new Quay registry instance.
-
If desired, change the name, and then click
Create.
Exporting Environment Variables
It is recommended to set the QUAY_HOSTNAME environment variable in the working terminal before running the commands. Alternatively, you can specify the hostname directly within the commands as needed.
|
QUAY_HOSTNAME=$(oc get route registry-quay -n quay-workshop -o jsonpath={.spec.host})
Adding the Quay Certificate as a Trusted CA in OCP (Optional)
This step is recommended if your Quay registry uses a self-signed or internal certificate.
-
Obtain the Quay registry certificate:
echo -n | openssl s_client -showcerts -connect $QUAY_HOSTNAME:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > quay.crt
-
Create a ConfigMap containing the CA:
oc create configmap quay-ca --from-file=$QUAY_HOSTNAME=quay.crt -n openshift-config
# Verify
oc get configmap quay-ca -n openshift-config -o yaml
-
Associate the CA with the cluster:
oc patch image.config.openshift.io/cluster --type=merge -p '{"spec":{"additionalTrustedCA":{"name":"quay-ca"}}}'
-
Verify:
oc get image.config.openshift.io/cluster -o yaml