Mirror the Red Hat operator images to
your enterprise registry.
Procedure
- Log in to quay.io and run the following command to login to the Docker registry with your
Red Hat enterprise credentials:
podman login registry.redhat.io -u <Red Hat enterprise registry username> -p <Red Hat enterprise registry password>
Set the following environment variables:
export LOCAL_ISF_REGISTRY="<Your enterprise registry host>:<port>"
export LOCAL_ISF_REPOSITORY="<Your image path>"
export TARGET_PATH="$LOCAL_ISF_REGISTRY/$LOCAL_ISF_REPOSITORY"
export OCP_VERSION="<your selected OCP version>
echo "$TARGET_PATH"
Note:
- If you face any issues during mirroring Red Hat operator 4.15 images, then use either Ubuntu 22 or higher or RHEL 9 or higher server versions to
mirror. For more information, see the Red Hat
issue https://access.redhat.com/solutions/7062641.
- The Red Hat OpenShift® Container Platform version
variable value must be same as the version you used during the OpenShift mirroring. For example, if you mirror
Red Hat OpenShift Container Platform 4.15.2 images, then set the
OCP_VERSION value as 4.15.
- Port is a non-mandatory value when you set the
LOCAL_ISF_REGISTRY
variable. You
can ignore this if your enterprise registry is accessible and has a secure connection.
Sample value for without
port:
export LOCAL_ISF_REGISTRY="registryhost.com"
See the
following sample values:
export LOCAL_ISF_REGISTRY="registryhost.com:443"
export LOCAL_ISF_REPOSITORY="fusion-mirror"
LOCAL_ISF_REGISTRY
is your entitlement registry.
LOCAL_ISF_REPOSITORY
is the image path in which you want to mirror the images.
You can choose your own repository paths. For example, hci-2.8.0/isf or hci-2.8.0 or hci-
2.8.1/isf or
hci-
2.8.1.
- Run the command to login to the Docker registry with your enterprise registry
credentials.
podman login $LOCAL_ISF_REGISTRY -u <your enterprise registry username> -p <your enterprise registry password>
- Create an image set configuration file for Red Hat packages that are required for IBM Storage Fusion installation.
For
example:
cat << EOF > imageset-config-redhatoperator.yaml
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
mirror:
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v$OCP_VERSION
packages:
- name: "kubernetes-nmstate-operator"
- name: "redhat-oadp-operator"
- name: "amq-streams"
- name: "kubevirt-hyperconverged"
EOF
Note:
- The redhat-oadp-operator and amq-streams packages are
required to install the Red Hat OADP operator and
AMQ Streams operator. It is a prerequisite to deploy the IBM Backup & Restore service. If you plan to use the IBM Backup & Restore service, retain it in the commands, or else
you can skip it.
- The amq-streams package is required to install the Data Cataloging service. If you plan to use the IBM Data Cataloging service, retain it in the commands, or else
you can skip it.
- The
kubevirt-hyperconverged
is required to install the OpenShift virtualization operator. It is a
prerequisite to deploy IBM Cloud® Satellite. If you plan to
use isf-ics
, retain it in the commands, or else you can skip it.
- Run the following
oc
command to mirror the images from the specified
image set configuration to a specified registry.
oc mirror --config imageset-config-redhatoperator.yaml docker://$TARGET_PATH --dest-skip-tls --ignore-history
This can take 5-10 minutes to complete.
Example output:
Rendering catalog image "<TARGET_PATH>/redhat/redhat-operator-index:v4.15" with file-based catalog
Writing image mapping to oc-mirror-workspace/results-1693810862/mapping.txt
Writing CatalogSource manifests to oc-mirror-workspace/results-1693810862
Writing ICSP manifests to oc-mirror-workspace/results-1693810862
- After you mirror the content to your registry, go to the generated
oc-mirror-workspace/ directory. Go to the results-1xxxx directory, and verify that the
YAML files are present for the
ImageContentSourcePolicy
and
CatalogSource
resources.
- Apply the generated
ImageContentSourcePolicy
to the cluster.
cd ./oc-mirror-workspace/results-<generated_id>
oc apply -f imageContentSourcePolicy.yaml
You can run this step only once when the cluster is up for a freshly installed rack.
- Apply the generated
CatalogSource
to the cluster.
oc apply -f catalogSource-cs-redhat-operator-index.yaml