Configuring Image Registry to use Fusion Data Foundation

OpenShift Container Platform provides a built in Container Image Registry which runs as a standard workload on the cluster. A registry is typically used as a publication target for images built on the cluster as well as a source of images for workloads running on the cluster.

About this task

Warning: This process does not migrate data from an existing image registry to the new image registry. If you already have container images in your existing registry, back up your registry before you complete this process, and re-register your images when this process is complete.

Before you begin

Be sure that you have the following:
  • You have administrative access to OpenShift Web Console.
  • Fusion Data Foundation Operator is installed and running in the openshift-storage namespace. In OpenShift Web Console, go to Operators > Installed Operators to view installed operators.
  • Image Registry Operator is installed and running in the openshift-image-registry namespace. In OpenShift Web Console, go to Administration > Cluster Settings > Cluster Operators to view cluster operators.
  • A storage class with provisioner openshift-storage.cephfs.csi.ceph.com available. In OpenShift Web Console, go to Storage > StorageClasses to view available storage classes.

Procedure

Use the OpenShift Web Console to perform these steps.

  1. Create a Persistent Volume Claim for the Image Registry to use.
    1. Go to Storage > Persistent Volume Claims.
    2. Set Project to openshift-image-registry.
    3. Click Create Persistent Volume Claims and fill out the form.
      • From the list of available storage classes retrieved above, specify the Storage Class with the provisioner openshift-storage.cephfs.csi.ceph.com.
      • Specify the Persistent Volume Claim Name, for example, ocs4registry.
      • Specify an Access Mode of Shared Access (RWX).
      • Specify a Size of at least 100 GB.
      • Click Create.
      Wait until the status of the new Persistent Volume Claim is listed as Bound.
  2. Configure the cluster’s Image Registry to use the new Persistent Volume Claim.
    1. Go to Administration > Custom Resource Definitions.
    2. Click the Config custom resource definition associated with the imageregistry.operator.openshift.io group.
    3. From the Instances tab, beside the cluster instance, go to Action Menu > Edit Config.
    4. Add the new Persistent Volume Claim as persistent storage for the Image Registry.
      1. If necessary, add the following under spec, replacing the existing storage section:
          storage:
            pvc:
              claim: <new-pvc-name>
        For example:
          storage:
            pvc:
              claim: ocs4registry
      2. Click Save.
  3. Verify that the new configuration is being used.
    1. Go to Workloads > Pods.
    2. Set Project to openshift-image-registry.
    3. Verify that the new image-registry-* pod appears with a status of Running and that the previous image-registry-* pod terminates.
    4. Click the new image-registry-* pod to view pod details.
    5. From Volumes verify that the registry-storage volume has a Type that matches your new Persistent Volume Claim. For example, ocs4registry.