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
- Setting up a client workstation
- 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
- 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
- From a workstation that can connect to the internet:
- Ensure that Docker or Podman is running on the workstation.
- 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 thecpd-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 thecpd-cli-workspace/olm-utils-workspace/work/offline
directory.
- 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
- From the workstation that can connect to the cluster:
- Ensure that Docker or Podman is running on the workstation.
- 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
- Set the
OLM_UTILS_IMAGE
environment variable to ensure that thecpd-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.