Moving images for the migrate
plug-in to the private container
registry
If you need to run cpd-cli
migrate-ldap
commands against a cluster in a restricted network, you
must make the zen-ldapmigrate
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.
- Installation phase
- Setting up a client workstation
- 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?
- You must complete this task before users try to run the
cpd-cli migrate-ldap
commands inside cluster network.
Before you begin
Complete the following tasks before you move the images to the private container registry:
About this task
This plug-in requires the zen-ldapmigrate
image:
- x86-64 clusters
icr.io/cpopen/cpd/zen-ldapmigrate:latest-amd64
- ppc64le clusters
icr.io/cpopen/cpd/zen-ldapmigrate:latest-ppc64le
- s390x clusters
icr.io/cpopen/cpd/zen-ldapmigrate:latest-s390x
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
- Ensure that Docker or Podman is running on the workstation.
- Ensure that the
olm-utils
image 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, see
cpd-cli manage login-private-registry
for additional options. - Run the following command to copy the
zen-ldapmigrate
image from the IBM® Entitled Registry to the private container registry:- x86-64 clusters
-
cpd-cli manage copy-image \ --from=icr.io/cpopen/cpd/zen-ldapmigrate:latest-amd64 \ --to=${PRIVATE_REGISTRY_LOCATION}/cpd/zen-ldapmigrate:latest-amd64
- ppc64le clusters
-
cpd-cli manage copy-image \ --from=icr.io/cpopen/cpd/zen-ldapmigrate:latest-ppc64le \ --to=${PRIVATE_REGISTRY_LOCATION}/cpd/zen-ldapmigrate:latest-ppc64le
- s390x clusters
-
cpd-cli manage copy-image \ --from=icr.io/cpopen/cpd/zen-ldapmigrate:latest-s390x \ --to=${PRIVATE_REGISTRY_LOCATION}/cpd/zen-ldapmigrate:latest-s390x
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
image is available on the client workstation:cpd-cli manage restart-container
- Run the following command to save the
zen-ldapmigrate
image to the client workstation:- x86-64 clusters
-
cpd-cli manage save-image \ --from=icr.io/cpopen/cpd/zen-ldapmigrate:latest-amd64
This command saves the image as a compressed TAR file named
icr.io_cpopen_cpd_zen-ldapmigrate_latest_amd64.tar.gz
in thecpd-cli-workspace/olm-utils-workspace/work/offline
directory. - ppc64le clusters
-
cpd-cli manage save-image \ --from=icr.io/cpopen/cpd/zen-ldapmigrate:latest-ppc64le
This command saves the image as a compressed TAR file named
icr.io_cpopen_cpd_zen-ldapmigrate_latest_ppc64le.tar.gz
in thecpd-cli-workspace/olm-utils-workspace/work/offline
directory. - s390x clusters
-
cpd-cli manage save-image \ --from=icr.io/cpopen/cpd/zen-ldapmigrate:latest-s390x
This command saves the image as a compressed TAR file named
icr.io_cpopen_cpd_zen-ldapmigrate_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
cpd-cli-workspace/olm-utils-workspace/work/offline
directory:- x86-64 clusters
icr.io_cpopen_cpd_cpdtool_4.0.0_${BUILD_NUM}_x86_64.tar.gz
- ppc64le clusters
icr.io_cpopen_cpd_zen-ldapmigrate_latest_ppc64le.tar.gz
- s390x clusters
icr.io_cpopen_cpd_zen-ldapmigrate_latest_s390x.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, see
cpd-cli manage login-private-registry
for additional options. - Run the following command to copy the
cpdtool
image to the private container registry:- x86-64 clusters
-
cpd-cli manage copy-image \ --from=icr.io/cpopen/cpd/zen-ldapmigrate:latest-amd64 \ --to=${PRIVATE_REGISTRY_LOCATION}/cpd/zen-ldapmigrate:latest-amd64
- ppc64le clusters
-
cpd-cli manage copy-image \ --from=icr.io/cpopen/cpd/zen-ldapmigrate:latest-ppc64le \ --to=${PRIVATE_REGISTRY_LOCATION}/cpd/zen-ldapmigrate:latest-ppc64le
- s390x clusters
-
cpd-cli manage copy-image \ --from=icr.io/cpopen/cpd/zen-ldapmigrate:latest-s390x \ --to=${PRIVATE_REGISTRY_LOCATION}/cpd/zen-ldapmigrate:latest-s390x
What to do next
After you push the zen-ldapmigrate
image to the private
container registry, users who want to run the cpd-cli
migrate-ldap
against the cluster must set the --image-prefix=${PRIVATE_REGISTRY_LOCATION}
when they run
cpd-cli
migrate-ldap
init
.