Setting up the CASE archive and inventory

Before mirroring the images, you must set the environment variables on your mirroring device, and connect to the internet so that you can download the corresponding CASE files.

About this task

These instructions apply to 21.0.3-IF007 or later. Starting with 21.0.3-IF007 the process changed to specify the mirrored images for all of the Cloud Pak dependencies.

You must ensure that a specific version of the software is installed on your cluster by saving the corresponding CASE package. Setting a specific software version in the CatalogSource prevents it from updating automatically.

It is the Container Application Software for Enterprises (CASE) package that creates the CatalogSource for each service that can be installed. You must modify the catalog sources to set a specific version of the software to install and prevent automatic updates.

Procedure

  1. On the host, create a directory that serves as the offline store.

    The following example directory is used in the subsequent steps.

    mkdir -p ${HOME}/offline/cp4ba
    Note: The offline store must be persistent to avoid transferring data multiple times. The persistence also helps to run the mirroring process multiple times or on a schedule.
  2. Create environment variables for the offline store that you created and the image inventory.

    On the host, create the following environment variables with the installer image name and the image inventory to identify the corresponding CASE file. Make sure that the OFFLINEDIR and CASE_VERSION have the correct values. The OFFLINEDIR must match the path for the offline store directory you created. The CASE_VERSION must match the CASE package for the version that you want to install. The CASE version numbers follow the release.major.minor standard. For example, the interim fix 7 (IF007) for 21.0.3 is packaged in the archive ibm-cp-automation-3.2.7.tgz.

    export CASE_NAME=ibm-cp-automation
    export CASE_VERSION=3.2.x
    export CASE_INVENTORY_SETUP=cp4aOperatorSetup
    export CASE_ARCHIVE=${CASE_NAME}-${CASE_VERSION}.tgz
    export OFFLINEDIR=${HOME}/offline/cp4ba
    export CASE_LOCAL_PATH=${OFFLINEDIR}/${CASE_ARCHIVE}
    Note: The command might show a warning about failing to get the registry credentials. If the result shows Success, then you do not need to worry about the warning.
  3. Download the Cloud Pak CASE image and put it in the offline store by running the case save command.

    If your host is a portable compute device, disconnect it from the local air-gapped network and connect the host to the internet before you run the following cloudctl case save command.

    Run the following cloudctl command, where the <image_digest> of the pinned case image is unique to each interim fix. Starting with 21.0.3-IF007, the relevant digest is provided in each interim fix readme file. Open the interim fix readme file and find the <image_digest> of the ibm-cp-automation-case-cache image by viewing the case save command. Make sure that --outputdir /path is changed to --outputdir ${OFFLINEDIR}.

    cloudctl case save \
       --case docker://icr.io/cpopen/ibm-cp-automation-case-cache@sha256:<image_digest> \
       --outputdir ${OFFLINEDIR}

    The host is now configured and you are ready to mirror your images.

What to do next

You can now go ahead and mirror the images to your local registry. For more information, see Mirroring images to the private registry.