Installing the product metadata export and import utility

The product metadata export and import utility exports and imports metadata between your IBM® Cloud Pak for Data deployments.

Before you begin

Security and roles: cpdtool and cpd-cli export-import require cluster administrator or similar roles.

About this task

The product metadata export and import utility exports metadata from one Cloud Pak for Data installation and imports the metadata to another installation.

The product metadata export and import utility consists of the following components:

  1. The cpdtool command line interface, included as part of the cpd-cli export-import command.
  2. The cpdtool docker image.
  3. The Zen Core Auxiliary component, which has the logic to export and import IBM Cloud Pak for Data control plane metadata, including user accounts and roles.
    Note: The Zen Core Auxiliary component is deprecated and support will be removed in a future release.

These instructions assume that the IBM Cloud Pak for Data control plane is already installed on your Red Hat® OpenShift® cluster.

Procedure

To install the cpdtool image:

  1. Check whether Docker or Podman is available on the system. If neither of them are available, install one of them.

    You can use either Docker or Podman to install the cpdtool Docker image.

    Tip: For more information about installing Podman, see the Podman installation instructions.
  2. Install the cpdtool Docker image.

    The following examples install the cpdtool image by using Podman.

    Note: If your Docker image registry is different than what is shown in the examples, change the appropriate flags.

    OpenShift 4.x example:

    IMAGE_REGISTRY=`oc get route -n openshift-image-registry | grep image-registry | awk '{print $2}'`
    echo $IMAGE_REGISTRY
    NAMESPACE=`oc project -q`
    echo $NAMESPACE
    CPU_ARCH=`uname -m`
    echo $CPU_ARCH
    BUILD_NUM=`./cpd-cli export-import version | grep "Build Number" |cut -d : -f 2 | xargs`
    echo $BUILD_NUM
    
    # Pull cpdtool image from Docker Hub
    podman pull docker.io/ibmcom/cpdtool:4.0.0-${BUILD_NUM}-${CPU_ARCH}
    # Push image to internal registry
    podman login -u kubeadmin -p $(oc whoami -t) $IMAGE_REGISTRY --tls-verify=false
    podman tag docker.io/ibmcom/cpdtool:4.0.0-${BUILD_NUM}-${CPU_ARCH} $IMAGE_REGISTRY/$NAMESPACE/cpdtool:4.0.0-${BUILD_NUM}-${CPU_ARCH}
    podman push $IMAGE_REGISTRY/$NAMESPACE/cpdtool:4.0.0-${BUILD_NUM}-${CPU_ARCH} --tls-verify=false

    OpenShift 3.11 example:

    Note: Cloud Pak for Data 4.0.x does not support OpenShift 3.11. This example can be used to migrate an OpenShift 3.11 installation to a supported OpenShift 4.x version before upgrading to Cloud Pak for Data 4.0.x.
    IMAGE_REGISTRY=`oc registry info`
    echo $IMAGE_REGISTRY
    NAMESPACE=`oc project -q`
    echo $NAMESPACE
    CPU_ARCH=`uname -m`
    echo $CPU_ARCH
    BUILD_NUM=`./cpd-cli export-import version | grep "Build Number" |cut -d : -f 2 | xargs`
    echo $BUILD_NUM
    
    # Pull cpdtool image from Docker Hub
    podman pull docker.io/ibmcom/cpdtool:4.0.0-${BUILD_NUM}-${CPU_ARCH}
    # Push image to internal registry
    podman login -u ocadmin -p $(oc whoami -t) $IMAGE_REGISTRY --tls-verify=false
    podman tag docker.io/ibmcom/cpdtool:4.0.0-${BUILD_NUM}-${CPU_ARCH} $IMAGE_REGISTRY/$NAMESPACE/cpdtool:4.0.0-${BUILD_NUM}-${CPU_ARCH}
    podman push $IMAGE_REGISTRY/$NAMESPACE/cpdtool:4.0.0-${BUILD_NUM}-${CPU_ARCH} --tls-verify=false

To install the Zen Core Auxiliary component:

Note: The Zen Core Auxiliary component is deprecated and support will be removed in a future release.

  1. Install the zen-core-aux Docker image.

    The following examples install the zen-core-aux image by using Podman.

    Note: If your Docker image registry is different than what is shown in the examples, change the appropriate flags.

    OpenShift 4.x example:

    IMAGE_REGISTRY=`oc get route -n openshift-image-registry | grep image-registry | awk '{print $2}'`
    echo $IMAGE_REGISTRY
    NAMESPACE=`oc project -q`
    echo $NAMESPACE
    CPU_ARCH=`uname -m`
    echo $CPU_ARCH
    BUILD_NUM=350
    echo $BUILD_NUM
    
    # Pull zen-core-aux image from Docker Hub
    podman pull docker.io/ibmcom/zen-core-aux:4.0.0-${BUILD_NUM}-${CPU_ARCH}
    # Push image to internal registry
    podman login -u kubeadmin -p $(oc whoami -t) $IMAGE_REGISTRY --tls-verify=false
    podman tag docker.io/ibmcom/zen-core-aux:4.0.0-${BUILD_NUM}-${CPU_ARCH} $IMAGE_REGISTRY/$NAMESPACE/zen-core-aux:4.0.0-${BUILD_NUM}-${CPU_ARCH}
    podman push $IMAGE_REGISTRY/$NAMESPACE/zen-core-aux:4.0.0-${BUILD_NUM}-${CPU_ARCH} --tls-verify=false

    OpenShift 3.11 example:

    Note: Cloud Pak for Data 4.0.x does not support OpenShift 3.11. This example can be used to migrate an OpenShift 3.11 installation to a supported OpenShift 4.x version before upgrading to Cloud Pak for Data 4.0.x.
    IMAGE_REGISTRY=`oc registry info`
    echo $IMAGE_REGISTRY
    NAMESPACE=`oc project -q`
    echo $NAMESPACE
    CPU_ARCH=`uname -m`
    echo $CPU_ARCH
    BUILD_NUM=350
    echo $BUILD_NUM
    
    # Pull zen-core-aux image from Docker Hub
    podman pull docker.io/ibmcom/zen-core-aux:4.0.0-${BUILD_NUM}-${CPU_ARCH}
    # Push image to internal registry
    podman login -u ocadmin -p $(oc whoami -t) $IMAGE_REGISTRY --tls-verify=false
    podman tag docker.io/ibmcom/zen-core-aux:4.0.0-${BUILD_NUM}-${CPU_ARCH} $IMAGE_REGISTRY/$NAMESPACE/zen-core-aux:4.0.0-${BUILD_NUM}-${CPU_ARCH}
    podman push $IMAGE_REGISTRY/$NAMESPACE/zen-core-aux:4.0.0-${BUILD_NUM}-${CPU_ARCH} --tls-verify=false
  2. Install the zen-core-aux Helm chart.
    1. Download the Helm chart zen-core-aux-4.0.0.tgz:
    2. Delete any existing zen-core-aux-exim configmaps:
      oc delete cm cpd-zen-aux-zen-core-aux-exim-cm
      oc delete cm zen-core-aux-exim-cm
    3. Install the zen-core-aux helm chart by using a Helm 3 client:
      helm install zen-core-aux ./zen-core-aux-4.0.0.tgz -n zen

      If the Helm release already exists, uninstall it:

      helm uninstall zen-core-aux -n zen

    When the zen-core-aux image and Helm chart are installed, the Zen Core Auxiliary component is considered registered. Running the cpd-cli export-import export create command dispatches the zen-core-aux export job.

What to do next

Migrating metadata between Cloud Pak for Data installations