Making the olm-utils image available in the private container registry (Upgrading from Version 4.0 to Version 4.6)

If you need to run cpd-cli manage commands against a cluster in a restricted network, you must make the cpd-cli and the olm-utils image available inside the cluster network. You can mirror the image to the private container registry and pull the image to workstations that can connect to the cluster.

If you want to make the olm-utils image available to a single workstation inside the cluster network, follow Making the olm-utils image available on a single workstation (Upgrading from Version 4.0 to Version 4.6) instead.

Upgrade phase
You are not here. Setting up a client workstation
You are not here. Collecting required information
You are here icon. Preparing your cluster
You are not here. Upgrading the Cloud Pak for Data platform and services
Who needs to complete this task?
The user who plans to complete the upgrade must complete this task on their workstation.
When do you need to complete this task?
You must complete this task before you move the client workstation inside the cluster network.

Before you begin

Best practice: You can run the commands in this task exactly as written if you set up environment variables. For instructions, see Setting up installation environment variables.

Ensure that you source the environment variables before you run the commands in this task.

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.

    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, see cpd-cli manage login-private-registry for additional options.

  3. Run the following command to copy the olm-utils image from the IBM® Entitled Registry to the private container registry:
    x86-64 clusters
    cpd-cli manage copy-image \
    --from=icr.io/cpopen/cpd/olm-utils:latest \
    --to=${PRIVATE_REGISTRY_LOCATION}/cpd/olm-utils:latest
    s390x clusters
    cpd-cli manage copy-image \
    --from=icr.io/cpopen/cpd/olm-utils:latest.s390x \
    --to=${PRIVATE_REGISTRY_LOCATION}/cpd/olm-utils:latest.s390x


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. Run the following command to save the olm-utils image to the client workstation:
      x86-64 clusters
      cpd-cli manage save-image \
      --from=icr.io/cpopen/cpd/olm-utils:latest

      This command saves the image as a compressed TAR file named icr.io_cpopen_cpd_olm-utils_latest.tar.gz in the cpd-cli-workspace/olm-utils-workspace/work/offline directory.

      s390x clusters
      cpd-cli manage save-image \
      --from=icr.io/cpopen/cpd/olm-utils:latest.s390x

      This command saves the image as a compressed TAR file named icr.io_cpopen_cpd_olm-utils_latest.s390x.tar.gz in the cpd-cli-workspace/olm-utils-workspace/work/offline directory.

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

    Ensure that you place the TAR file in the cpd-cli-workspace/olm-utils-workspace/work/offline directory:

    x86-64 clusters
    icr.io_cpopen_cpd_olm-utils_latest.tar.gz
    s390x clusters
    icr.io_cpopen_cpd_olm-utils_latest.s390x.tar.gz
  3. From the workstation that can connect to the cluster:
    1. Ensure that Docker or Podman is running on the workstation.
    2. Run the following command to load the olm-utils image on the client workstation:
      x86-64 clusters
      cpd-cli manage load-image \
      --source-image=icr.io/cpopen/cpd/olm-utils:latest

      The command returns the following message when the image is loaded:

      Loaded image: icr.io/cpopen/cpd/olm-utils:latest
      s390x clusters
      cpd-cli manage load-image \
      --source-image=icr.io/cpopen/cpd/olm-utils:latest.s390x

      The command returns the following message when the image is loaded:

      Loaded image: icr.io/cpopen/cpd/olm-utils:latest.s390x
    3. 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, see cpd-cli manage login-private-registry for additional options.

    4. Run the following command to copy the olm-utils image to the private container registry:
      x86-64 clusters
      cpd-cli manage copy-image \
      --from=icr.io/cpopen/cpd/olm-utils:latest \
      --to=${PRIVATE_REGISTRY_LOCATION}/cpd/olm-utils:latest
      s390x clusters
      cpd-cli manage copy-image \
      --from=icr.io/cpopen/cpd/olm-utils:latest.s390x \
      --to=${PRIVATE_REGISTRY_LOCATION}/cpd/olm-utils:latest.s390x

What to do next

After you push the olm-utils image to the private container registry, users who want to run the cpd-cli manage against the cluster must complete Pulling the olm-utils image from the private container registry (Upgrading from Version 4.0 to Version 4.6).