manage mirror-images

Mirror the images for the specified components to your private container registry.

Extended description

You must run the mirror-images command to mirror the images for any Cloud Pak for Data components that you want to install on your cluster.

If the cluster is in a restricted network, the command can automatically configure an intermediary registry in the cpd-cli-workspace/olm-utils-workspace/work directory. After you transfer the directory to a workstation within the cluster network, you can mirror the images to the private container registry.

Note: When you mirror images from one registry to a private container registry, you must run the cpd-cli manage login-private-registry command twice (once for the mirrored registry and once for the private container registry). For more information, see manage login-private-registry.

Syntax

cpd-cli manage mirror-images \
--components=<comma-separated-list-of-component-names> \
--release=<version> \
--target_registry=<registry-URL> \
[--source_registry=127.0.0.1:12443] \
[--arch=amd64|ppc64le|s390x] \
[--case_download=true|false] \
[--retry_count=3] \
[--retry_delay=30] \
[--param-file=<file-name>] \
[-v][-vv][-vvv]

Arguments

The mirror-images command has no arguments.

Options

Option Description
--arch Specify the architecture of your Red Hat OpenShift Container Platform cluster.
Status
Optional
Syntax
--arch=amd64|ppc64le|s390x
Default value
No default.
Valid values
amd64
Specify amd64 to mirror only the images that are needed for x86-64 hardware.
ppc64le
Specify ppc64le to mirror only the images that are needed for Power® (ppc64le) hardware.
s390x
Specify s390x to mirror only the images that are needed for Z (s390x) hardware.
--case_download Specify whether to download the CASE packages for the specified components if they are not detected in the work directory.
Status
Optional.
Syntax
--case_download=true|false
Default value
true
Valid values
true
Download the CASE packages for the specified components if they are not detected.
false
Specify false when you are running commands in a restricted network, or you cannot download the CASE packages directly from GitHub.
--components A comma-separated list of the components for which you want to mirror the associated images.
Status
Required.
Syntax
--components=<comma-separated-list-of-component-names>
Default value
There is no default value. The list depends on which components for which you want to mirror images.
Valid values
For the list of components, see Component IDs.

You can specify individual components or a comma-separated list of components.

--param-file The fully qualified path of a file that includes additional parameters.

Create the file in the cpd-cli-workspace/olm-utils-workspace/work directory.

Status
Optional.

Refer to the installation documentation for the specified components for guidance.

Syntax
--param-file=/tmp/work/<param-file-name>
Default value
No default. User-defined.
Valid values
The fully qualified path of a file that includes additional parameters.
--release The release for which you want to mirror images.
Status
Required.
Syntax
--release=<version>
Default value
No default. You must specify the release.
Valid values
  • 4.6.0
  • 4.6.1
  • 4.6.2
  • 4.6.3
  • 4.6.4
  • 4.6.5
  • 4.6.6
--retry_count The number of times to retry the command in the event of a network failure.
Status
Optional.
Syntax
--retry_count=3
Default value
3

If you omit this option, the default value is used.

Valid values
Any integer greater than zero (0).
--retry_delay The number of seconds to wait before retrying the command in the event of a network failure.
Status
Optional.
Syntax
--retry_delay=30
Default value
30

If you omit this option, the default value is used.

Valid values
Any integer greater than zero (0).
--source_registry The URL of the intermediary container registry.

If the cluster is in a restricted network, specify this parameter after you transfer the images behind the firewall.

Status
Required if the cluster is in a restricted network and you mirrored the images to the intermediary container registry.
Syntax
--source_registry=127.0.0.1:12443
Default value
127.0.0.1:12443
Valid values
Any valid intermediary container registry URL.
--target_registry The registry to mirror images to.
Status
Required.
Syntax
--target_registry=<registry-URL>
Default value
No default.
Valid values
Specify the URL of the registry:
  • If the client workstation can connect to the IBM® Entitled Registry (icr.io) and the private container registry, specify the URL of the private container registry.
  • If the cluster is in a restricted network:
    • Specify 127.0.0.1:12443 when the client is connected to the internet.
    • Specify the URL of the private container registry after you transfer the images behind the firewall.
-v
-vv
-vvv
Display verbose output.

Options are listed from least verbose to the most verbose.

Status
Optional.
Syntax
Verbose output
-v
Very verbose output
-vv
Most verbose output
-vvv
Default value
Not applicable.
Valid values
Not applicable.

Examples

Note: The following example uses the recommended installation environment variables.

Use a script to create environment variables with the correct values for your environment. For more information, see Best practice: Setting up install variables.

Mirror images from the IBM Entitled Registry to a private container registry
This command mirrors only the images for your cluster architecture. If you want to mirror all of the images, remove the --arch option.
Important: To mirror images directly from the IBM Entitled Registry to a private container registry, you must be connected to the internet.
cpd-cli manage mirror-images \
--components=${COMPONENTS} \
--release=${VERSION} \
--target_registry=${PRIVATE_REGISTRY_LOCATION} \
--arch=${IMAGE_ARCH}
Mirror the images for your cluster architecture in a restricted network to an intermediary container registry (Step 1 of 2)
This command mirrors only the images for your cluster architecture. If you want to mirror all of the images, remove the --arch option.
Important: To mirror images from the IBM Entitled Registry to the intermediary container registry, you must be connected to the internet.
cpd-cli manage mirror-images \
--components=${COMPONENTS} \
--release=${VERSION} \
--target_registry=127.0.0.1:12443 \
--arch=${IMAGE_ARCH}
Mirror images in a restricted network to a private container registry (Step 2 of 2)
This command mirrors only the images for your cluster architecture. If you removed the --arch option when you mirrored the images from the IBM Entitled Registry, remove the --arch option when you mirror the images from the intermediary container registry.
Important: To mirror images from the intermediary container registry to the private container registry, you must be in the same network as the private container registry.
cpd-cli manage mirror-images \
--components=${COMPONENTS} \
--release=${VERSION} \
--source_registry=127.0.0.1:12443 \
--target_registry=${PRIVATE_REGISTRY_LOCATION} \
--arch=${IMAGE_ARCH} \
--case_download=false