Moving images for cpd-cli plug-ins to a private container
registry
Upgrade to IBM Software Hub Version 5.1 before IBM Cloud Pak for Data Version 4.8 reaches end of support. For more information, see Upgrading from IBM Cloud Pak for Data Version 4.8 to IBM Software Hub Version 5.1.
Several of the cpd-cli plug-ins use images. If your cluster
pulls images from a private container registry or if your cluster is in a restricted network, you
can push the images to the private container registry so that users can run the cpd-cli commands against the cluster.
- 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 is in a restricted network or if your security policies
require all images to be pulled from a private container registry.
You can skip this task if your workstations can connect to the public internet and to the cluster at the same time.
Which cpd-cli plug-ins require images?
cpd-cli plug-in:| Plug-in | Purpose | Required images |
|---|---|---|
config |
Use this plug-in to create a local user configuration and profile to enable you to run
cpd-cli commands against an instance of Cloud Pak for Data. |
This plug-in doesn't require any images. |
cpdbr |
Use this plug-in to back up and restore Cloud Pak for Data volumes. |
This plug-in requires the following images:
|
cpdbr-oadp |
Use this plug-in to back up and restore Cloud Pak for Data deployments, including volumes. |
This plug-in uses several images. The images that you need depend on the following factors:
|
cpdctl |
Use this plug-in to automate activities performed on different types of workspace and assets across multiple Cloud Pak for Data clusters. |
This plug-in doesn't require any images. |
cpdtool |
Use this plug-in to export and import data, including metadata. |
This plug-in requires the following images:
|
health |
Query the health of your Red Hat OpenShift cluster and the Cloud Pak for Data platform. |
This plug-in requires the following images:
|
manage |
Use this plug-in to install and upgrade Cloud Pak for Data |
This plug-in requires the following images:
|
platform-diag |
Use this plug-in to gather diagnostic information about a Cloud Pak for Data deployment. |
This plug-in doesn't require any images. |
platform-mgmt |
Use this plug-in to manage service instances and users associated with a Cloud Pak for Data deployment. |
This plug-in doesn't require any images. |
Before you begin
Complete the following tasks before you move the images to the private container registry:
Mirroring the ubi-minimal image to the private
container registry
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
- Ensure that Docker or Podman is running on the workstation.
- 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}
- Log in to the Red Hat
entitled registry.
- Set the
REDHAT_USERenvironment variable to the username of a user who can pull images fromregistry.redhat.io:export REDHAT_USER=<enter-your-username> - Set the
REDHAT_PASSWORDenvironment variable to the password for the specified user:export REDHAT_PASSWORD=<enter-your-password> - 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}
- Set the
- Run the following command to mirror the
ubi-minimalimage 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
- From a workstation that can connect to the internet:
- Ensure that Docker or Podman is running on the workstation.
- Ensure that the
olm-utils-v2image is available on the client workstation:cpd-cli manage restart-container - Log in to the Red Hat
entitled registry.
- Set the
REDHAT_USERenvironment variable to the username of a user who can pull images fromregistry.redhat.io:export REDHAT_USER=<enter-your-username> - Set the
REDHAT_PASSWORDenvironment variable to the password for the specified user:export REDHAT_PASSWORD=<enter-your-password> - 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}
- Set the
- Run the following command to save the
ubi-minimalimage 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
- 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.gzorubi9_registry.redhat.io_ubi9_ubi-minimal_latest.tar.gzTAR file in thework/offlinedirectory. - From the workstation that can connect to the cluster:
- Ensure that Docker or Podman is running on the workstation.
- 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.
- Run the following command to copy the
ubi-minimalimage 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
Mirroring the images required for the storage-performance command to the private container registry
cpd-cli
health
storage-performance command, you must mirror the following images
to your private container registry:k8s-storage-perfxsysbench
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
- Ensure that Docker or Podman is running on the workstation.
- Ensure that the
olm-utils-v2image is available on the client workstation:cpd-cli manage restart-container - 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.
- Log in to the IBM Entitled Registry entitled
registry:
cpd-cli manage login-entitled-registry \ ${IBM_ENTITLEMENT_KEY} - Run the following commands to mirror the required images to the private container registry:
- Mirror the
k8s-storage-perfimage:cpd-cli manage copy-image \ --from=icr.io/cpopen/cpd/k8s-storage-perf:v1.0.0 \ --to=${PRIVATE_REGISTRY_LOCATION}/cpopen/cpd/k8s-storage-perf:v1.0.0 - Mirror the
xsysbenchimage:cpd-cli manage copy-image \ --from=quay.io/ibm-cp4d-public/xsysbench:1.1-amd64 \ --to=${PRIVATE_REGISTRY_LOCATION}/ibm-cp4d-public/xsysbench:1.1-amd64
- Mirror the
The workstation cannot connect to the private container registry at the same time
- From a workstation that can connect to the internet:
- Ensure that Docker or Podman is running on the workstation.
- Ensure that the
olm-utils-v2image is available on the client workstation:cpd-cli manage restart-container - Run the following command to save the required images to the client workstation:
- Save the
k8s-storage-perfimage:cpd-cli manage save-image \ --from=icr.io/cpopen/cpd/k8s-storage-perf:v1.0.0 - Save the
xsysbenchimage:cpd-cli manage copy-image \ --from=quay.io/ibm-cp4d-public/xsysbench:1.1-amd64 \ --to=${PRIVATE_REGISTRY_LOCATION}/ibm-cp4d-public/xsysbench:1.1-amd64
- Save the
- Transfer the compressed files to a client workstation that can connect to the cluster.
Ensure that you place the TAR files in the
work/offlinedirectory:icr.io_cpopen_cpd_k8s-storage-perf_v1.0.0.tar.gzquay.io_ibm-cp4d-public_xsysbench_1.1-amd64.tar.gz
- From the workstation that can connect to the cluster:
- Ensure that Docker or Podman is running on the workstation.
- 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.
- Run the following commands to copy the required images to the private container registry:
- Copy the
k8s-storage-perfimage:cpd-cli manage copy-image \ --from=icr.io/cpopen/cpd/k8s-storage-perf:v1.0.0 \ --to=${PRIVATE_REGISTRY_LOCATION}/cpopen/cpd/k8s-storage-perf:v1.0.0 - Copy the
xsysbenchimage:cpd-cli manage copy-image \ --from=quay.io/ibm-cp4d-public/xsysbench:1.1-amd64 \ --to=${PRIVATE_REGISTRY_LOCATION}/ibm-cp4d-public/xsysbench:1.1-amd64
- Copy the
Mirroring the images required for the storage-validation command to the private container registry
If you plan to use the cpd-cli
health
storage-validation command, you must mirror the following images
to your private container registry:
centosk8s-storage-teststorage-gccstorage-util
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
- Ensure that Docker or Podman is running on the workstation.
- Ensure that the
olm-utils-v2image is available on the client workstation:cpd-cli manage restart-container - 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.
- Log in to the IBM Entitled Registry entitled
registry:
cpd-cli manage login-entitled-registry \ ${IBM_ENTITLEMENT_KEY} - Run the following command to mirror the required image the private container registry:
- Mirror the
centosimage:cpd-cli manage copy-image \ --from=quay.io/centos/amd64:latest \ --to=${PRIVATE_REGISTRY_LOCATION}/centos/amd64:latest - Mirror the
k8s-storage-testimage:cpd-cli manage copy-image \ --from=icr.io/cpopen/cpd/k8s-storage-test:v1.0.0 \ --to=${PRIVATE_REGISTRY_LOCATION}/cpopen/cpd/k8s-storage-test:v1.0.0 - Mirror the
storage-gccimage:cpd-cli manage copy-image \ --from=quay.io/ibm-cp4d-public/storage-gcc:1.0-amd64 \ --to=${PRIVATE_REGISTRY_LOCATION}/ibm-cp4d-public/storage-gcc:1.0-amd64 - Mirror the
storage-utilimage:cpd-cli manage copy-image \ --from=quay.io/ibm-cp4d-public/storage-util:1.0-amd64 \ --to=${PRIVATE_REGISTRY_LOCATION}/ibm-cp4d-public/storage-util:1.0-amd64
- Mirror the
The workstation cannot connect to the private container registry at the same time
- From a workstation that can connect to the internet:
- Ensure that Docker or Podman is running on the workstation.
- Ensure that the
olm-utils-v2image is available on the client workstation:cpd-cli manage restart-container - Run the following commands to save the required images to the client workstation:
- Save the
centosimage:cpd-cli manage save-image \ --from=quay.io/centos/amd64:latest - Save the
k8s-storage-testimage:cpd-cli manage save-image \ --from=icr.io/cpopen/cpd/k8s-storage-test:v1.0.0 - Save the
storage-gccimage:cpd-cli manage save-image \ --from=quay.io/ibm-cp4d-public/storage-gcc:1.0-amd64 - Save the
storage-utilimage:cpd-cli manage save-image \ --from=quay.io/ibm-cp4d-public/storage-util:1.0-amd64
- Save the
- Transfer the compressed files to a client workstation that can connect to the cluster.
Ensure that you place the TAR files in the
work/offlinedirectory:icr.io_cpopen_cpd_k8s-storage-test_v1.0.0.tar.gzquay.io_centos_amd64_latest.tar.gzquay.io_ibm-cp4d-public_storage-gcc_1.0-amd64.tar.gzquay.io_ibm-cp4d-public_storage-util_1.0-amd64.tar.gz
- From the workstation that can connect to the cluster:
- Ensure that Docker or Podman is running on the workstation.
- 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.
- Run the following command to copy the required images to the private container registry:
- Copy the
centosimage:cpd-cli manage copy-image \ --from=quay.io/centos/amd64:latest \ --to=${PRIVATE_REGISTRY_LOCATION}/centos/amd64:latest - Copy the
k8s-storage-testimage:cpd-cli manage copy-image \ --from=icr.io/cpopen/cpd/k8s-storage-test:v1.0.0 \ --to=${PRIVATE_REGISTRY_LOCATION}/cpopen/cpd/k8s-storage-test:v1.0.0 - Copy the
storage-gccimage:cpd-cli manage copy-image \ --from=quay.io/ibm-cp4d-public/storage-gcc:1.0-amd64 \ --to=${PRIVATE_REGISTRY_LOCATION}/ibm-cp4d-public/storage-gcc:1.0-amd64 - Copy the
storage-utilimage:cpd-cli manage copy-image \ --from=quay.io/ibm-cp4d-public/storage-util:1.0-amd64 \ --to=${PRIVATE_REGISTRY_LOCATION}/ibm-cp4d-public/storage-util:1.0-amd64
- Copy the
What to do next
After the images are mirrored or pushed to the private container registry, users must ensure that
the cpd-cli plug-ins use the images from the private container
registry.
| Plug-in | How to use the images in the private container registry |
|---|---|
config |
Not applicable. This plug-in doesn't require any images. |
cpdbr |
Users who want to run cpd-cli
backup-restore commands against the cluster must specify the --image-prefix=${PRIVATE_REGISTRY_LOCATION} option when they
run the cpd-cli
backup-restore
init command. |
cpdbr-oadp |
Users who want to run cpd-cli
oadp commands against the cluster must specify the --image-prefix=${PRIVATE_REGISTRY_LOCATION} option when they
run some cpd-cli
oadp commands. |
cpdctl |
Not applicable. This plug-in doesn't require any images. |
cpdtool |
Users who want to run cpd-cli
export-import commands against the cluster must specify the --image-prefix=${PRIVATE_REGISTRY_LOCATION} option when they
run the cpd-cli
export-import
init command. |
health |
The next steps depend on the commands that you want to run:
|
manage |
The next steps depend on the commands that you want to run:
|
platform-diag |
Not applicable. This plug-in doesn't require any images. |
platform-mgmt |
Not applicable. This plug-in doesn't require any images. |