Moving images for the cpd-cli to the private container registry

If your cluster pulls images from a private container registry or if your cluster is in a restricted network, push images that the supported backup and restore utilities need to the private container registry.

Who needs to complete this task?
A user who has permissions to push images to the private container registry must complete this task.
When do you need to complete this task?
Complete this task if your cluster pulls images from a private container registry.

Skip this task if your cluster pulls images directly from the IBM® Entitled Registry.

Before you begin

Complete the following tasks before you move the images to the private container registry:

  1. Setting up a client workstation to install Cloud Pak for Data
  2. Setting up installation environment variables

About this task

The backup and restore utilities use several images. However, the images that you need depend on the type of storage that you are using and what method you are using to perform the backup and restore.

ubi-minimal image

This image is required for all backup and restore scenarios.

Supported hardware
  • x86_64
  • ppc64le
  • s390x
Obtaining the image
You must manually mirror the ubi-minimal image to your private container registry.
cpdbr-velero-plugin image

This image is required for all backup and restore scenarios.

Supported hardware
  • x86_64
  • ppc64le
  • s390x
Obtaining the image
This image is automatically mirrored when you mirror the Cloud Pak for Data (cpd_platform) images.
cpdbr-oadp image

This image is required only if you are using IBM Storage Fusion Data Protection, NetApp Astra Control Center, or Portworx Enterprise to back up Cloud Pak for Data deployments.

Supported hardware
  • x86_64
  • ppc64le
  • s390x
Obtaining the image
This image is automatically mirrored when you mirror the Cloud Pak for Data (cpd_platform) images.
cpdbr-api image

This image is required only if you are using OpenShift APIs for Data Protection to back up Cloud Pak for Data deployments using REST API calls.

Supported hardware
  • x86_64
  • ppc64le
  • s390x
Obtaining the image
This image is automatically mirrored when you mirror the Cloud Pak for Data (cpd_platform) images.

Procedure

The steps that you must complete depend on whether the workstation can connect to both the internet and the private container registry at the same time:


The workstation can connect to the internet and to the private container registry
  1. Ensure that Docker or Podman is running on the workstation.
  2. Log in to the private container registry:
    Podman
    podman login ${PRIVATE_REGISTRY_LOCATION} \
    -u ${PRIVATE_REGISTRY_PUSH_USER} \
    -p ${PRIVATE_REGISTRY_PUSH_PASSWORD}
    Docker
    docker login ${PRIVATE_REGISTRY_LOCATION} \
    -u ${PRIVATE_REGISTRY_PUSH_USER} \
    -p ${PRIVATE_REGISTRY_PUSH_PASSWORD}
  3. Log in to the Red Hat entitled registry.
    1. Set the REDHAT_USER environment variable to the username of a user who can pull images from registry.redhat.io:
      export REDHAT_USER=<enter-your-username>
    2. Set the REDHAT_PASSWORD environment variable to the password for the specified user:
      export REDHAT_PASSWORD=<enter-your-password>
    3. Log in to registry.redhat.io:
      Podman
      podman login registry.redhat.io \
      -u ${REDHAT_USER} \
      -p ${REDHAT_PASSWORD}
      Docker
      docker login registry.redhat.io \
      -u ${REDHAT_USER} \
      -p ${REDHAT_PASSWORD}
  4. Run the following command to mirror the ubi-minimal image the private container registry.

    The same image is used for all cluster hardware architectures:


    Version 4.8.0 - 4.8.3
    oc image mirror registry.redhat.io/ubi8/ubi-minimal:latest ${PRIVATE_REGISTRY_LOCATION}/ubi8/ubi-minimal:latest --insecure

    Version 4.8.4 and later
    oc image mirror registry.redhat.io/ubi9/ubi-minimal:latest ${PRIVATE_REGISTRY_LOCATION}//ubi9/ubi-minimal:latest --insecure



The workstation cannot connect to the private container registry at the same time
  1. From a workstation that can connect to the internet:
    1. Ensure that Docker or Podman is running on the workstation.
    2. Ensure that the olm-utils-v2 image is available on the client workstation:
      cpd-cli manage restart-container
    3. Log in to the Red Hat entitled registry.
      1. Set the REDHAT_USER environment variable to the username of a user who can pull images from registry.redhat.io:
        export REDHAT_USER=<enter-your-username>
      2. Set the REDHAT_PASSWORD environment variable to the password for the specified user:
        export REDHAT_PASSWORD=<enter-your-password>
      3. Log in to registry.redhat.io:
        Podman
        podman login registry.redhat.io \
        -u ${REDHAT_USER} \
        -p ${REDHAT_PASSWORD}
        Docker
        docker login registry.redhat.io \
        -u ${REDHAT_USER} \
        -p ${REDHAT_PASSWORD}
    4. Run the following command to save the ubi-minimal image to the client workstation:

      The same image is used for all cluster hardware architectures:


      Version 4.8.0 - 4.8.3
      cpd-cli manage save-image \
      --from=registry.redhat.io/ubi8/ubi-minimal:latest

      Version 4.8.4 and later
      cpd-cli manage save-image \
      --from=registry.redhat.io/ubi9/ubi-minimal:latest

  2. Transfer the compressed file to a client workstation that can connect to the cluster.

    Ensure that you place the ubi8_registry.redhat.io_ubi8_ubi-minimal_latest.tar.gz or ubi9_registry.redhat.io_ubi9_ubi-minimal_latest.tar.gz TAR file in the work/offline directory.

  3. From the workstation that can connect to the cluster:
    1. Ensure that Docker or Podman is running on the workstation.
    2. Log in to the private container registry.

      The following command assumes that you are using private container registry that is secured with credentials:

      cpd-cli manage login-private-registry
      ${PRIVATE_REGISTRY_LOCATION} \
      ${PRIVATE_REGISTRY_PUSH_USER} \
      ${PRIVATE_REGISTRY_PUSH_PASSWORD}

      If your private registry is not secured, omit the username and password.

    3. Run the following command to copy the ubi-minimal image to the private container registry:
      Version 4.8.0 - 4.8.3
      cpd-cli manage copy-image \
      --from=registry.redhat.io/ubi8/ubi-minimal:latest \
      --to=${PRIVATE_REGISTRY_LOCATION}/ubi8/ubi-minimal:latest

      Version 4.8.4 and later
      cpd-cli manage copy-image \
      --from=registry.redhat.io/ubi9/ubi-minimal:latest \
      --to=${PRIVATE_REGISTRY_LOCATION}/ubi9/ubi-minimal:latest