Preparing to run cpd-cli manage commands in a restricted network

If your registry is in a restricted network, you must ensure that the latest version of the olm-utils-v2 image is on the client workstation from which you will mirror images.

Installation phase
You are not here. Setting up a client workstation
You are not here. Setting up a cluster
You are not here. Collecting required information
You are here icon. Preparing to run installs from a private container registry
You are not here. Preparing the cluster for Cloud Pak for Data
You are not here. Preparing to install an instance of Cloud Pak for Data
You are not here. Installing an instance of Cloud Pak for Data
Who needs to complete this task?

Registry administrator The user who will mirror the Cloud Pak for Data software images to the private container registry must complete this task.

When do you need to complete this task?

This task is required only if you are running the cpd-cli manage commands against a cluster in a restricted network.

One-time setup Complete this task on the workstation from which you will mirror images to the private container registry.

After you mirror the Cloud Pak for Data software images to the private container registry, users can pull the olm-utils-v2 image from the private container registry.

Procedure

The steps that you complete depend on whether you plan to use the same workstation in the cluster network:


You plan to use the same workstation inside the cluster network
  1. When the workstation is connected to the internet, run the following command to update the olm-utils-v2 image on the workstation:
    cpd-cli manage restart-container

    Wait for the cpd-cli to return the following messages:

    [SUCCESS] ... Successfully pulled the container image icr.io/cpopen/cpd/olm-utils-v2:latest
    [SUCCESS] ... Successfully started the container olm-utils-play
    [SUCCESS] ... Container olm-utils-play has been re-created


You plan to use a different workstation inside the cluster network
Before you begin

You must have the cpd-cli installed on a workstation in the cluster network

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

      This command saves the image as a compressed TAR file named icr.io_cpopen_cpd_olm-utils-v2_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-v2:latest.s390x

      This command saves the image as a compressed TAR file named icr.io_cpopen_cpd_olm-utils-v2_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 work/offline directory:

    x86-64 clusters
    icr.io_cpopen_cpd_olm-utils-v2_latest.tar.gz
    s390x clusters
    icr.io_cpopen_cpd_olm-utils-v2_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-v2 image on the client workstation:
      x86-64 clusters
      cpd-cli manage load-image \
      --source-image=icr.io/cpopen/cpd/olm-utils-v2: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-v2:latest.s390x

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

      Loaded image: icr.io/cpopen/cpd/olm-utils:latest.s390x
    3. Set the OLM_UTILS_IMAGE environment variable to ensure that the cpd-cli uses the version of the image on the client workstation:
      x86-64 clusters
      export OLM_UTILS_IMAGE=icr.io/cpopen/cpd/olm-utils-v2:latest
      s390x clusters
      export OLM_UTILS_IMAGE=icr.io/cpopen/cpd/olm-utils-v2:latest.s390x

What to do next

Now that you've made the olm-utils-v2 image available on the client workstation, you're ready to complete Mirroring IBM Cloud Pak for Data images to a private container registry.