Installing the image for the export and import utility

The export and import utility exports and imports data, including metadata, between your IBM Cloud Pak® for Data deployments. If your cluster pulls images from a private container registry, you must push the cpdtool image to the private container registry.

Who needs to complete this task?

To install the export and import utility, you must have the appropriate permissions to push the cpdtool image to the private container registry.

To migrate export and import data between installations, you must be a Red Hat® OpenShift® Container Platform cluster administrator.

When do you need to complete this task?
Install the export and import utility if your cluster pulls images from a private container registry.

Skip this task if your cluster pulls images directly from the IBM® Entitled Registry.

Before you begin

Complete the following tasks before you install the export and import utility:

  1. Setting up a client workstation
  2. Setting up installation environment variables

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
  1. Ensure that Docker or Podman is running on the workstation.
  2. Ensure that the olm-utils image is available on the client workstation:
    cpd-cli manage restart-container
  3. 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.

  4. Run the following command set the BUILD_NUM environment variable based on the version of the cpdbr plug-in on the workstation:
    BUILD_NUM=`./cpd-cli export-import version | grep "Build Number" |cut -d : -f 2 | xargs`
  5. Run the following command to copy the cpdtool image from the IBM Entitled Registry to the private container registry:
    x86-64 clusters
    cpd-cli manage copy-image \
    --from=icr.io/cpopen/cpd/cpdtool:4.0.0-${BUILD_NUM}-x86_64 \
    --to=${PRIVATE_REGISTRY_LOCATION}/cpd/cpdtool:4.0.0-${BUILD_NUM}-x86_64
    ppc64le clusters
    cpd-cli manage copy-image \
    --from=icr.io/cpopen/cpd/cpdtool:4.0.0-${BUILD_NUM}-ppc64le \
    --to=${PRIVATE_REGISTRY_LOCATION}/cpd/cpdtool:4.0.0-${BUILD_NUM}-ppc64le


The workstation cannot connect to the private container registry at the same time
  1. From a workstation that can connect to the internet:
    1. Ensure that Docker or Podman is running on the workstation.
    2. Ensure that the olm-utils image is available on the client workstation:
      cpd-cli manage restart-container
    3. Run the following command set the BUILD_NUM environment variable based on the version of the cpdbr plug-in on the workstation:
      BUILD_NUM=`./cpd-cli export-import version | grep "Build Number" |cut -d : -f 2 | xargs`
    4. Run the following command to save the cpdtool image to the client workstation:
      x86-64 clusters
      cpd-cli manage save-image \
      --from=icr.io/cpopen/cpd/cpdtool:4.0.0-${BUILD_NUM}-x86_64

      This command saves the image as a compressed TAR file named icr.io_cpopen_cpd_cpdtool_4.0.0_${BUILD_NUM}_x86_64.tar.gz in the cpd-cli-workspace/olm-utils-workspace/work/offline directory.

      ppc64le clusters
      cpd-cli manage save-image \
      --from=icr.io/cpopen/cpd/cpdtool:4.0.0-${BUILD_NUM}-ppc64le

      This command saves the image as a compressed TAR file named icr.io_cpopen_cpd_cpdtool_4.0.0_${BUILD_NUM}_ppc64le.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 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_cpdtool_4.0.0_${BUILD_NUM}_ppc64le.tar.gz
  3. From the workstation that can connect to the cluster:
    1. Ensure that Docker or Podman is running on the workstation.
    2. 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.

    3. 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/cpdtool:4.0.0-${BUILD_NUM}-x86_64 \
      --to=${PRIVATE_REGISTRY_LOCATION}/cpd/cpdtool:4.0.0-${BUILD_NUM}-x86_64
      ppc64le clusters
      cpd-cli manage copy-image \
      --from=icr.io/cpopen/cpd/cpdtool:4.0.0-${BUILD_NUM}-ppc64le \
      --to=${PRIVATE_REGISTRY_LOCATION}/cpd/cpdtool:4.0.0-${BUILD_NUM}-ppc64le