(Optional) Downloading the CASE package manually

Before mirroring the images, you must connect to the internet so that you can download the corresponding CASE files.

Before you begin

Before you mirror the images to a private registry, make sure that you have valid login credentials for that private registry. For more information, see:

About this task

Important: If your bastion host, portable compute device, or portable storage device must connect to the internet through a proxy, you must set environment variables on the machine that accesses the internet through the proxy server. For more information, see Setting up proxy environment variables External link opens a new window or tab.

Procedure

  1. Connect your host to the internet and disconnect it from the local air-gapped network.
  2. Download ibm-pak CLI plug-in and install the tgz file.

    You can get the latest plug-in tgz file and install the file from https://github.com/IBM/ibm-pak/releases External link opens a new window or tab.

  3. Download the container images to your host.
    1. From IBM Catalog Management Plug-in (ibm-pak) v1.18.2 or later, you can download the CASE files from cp.icr.io/cpopen. You can view the current configuration of the plug-in by running the following command:

      oc ibm-pak config

      The output lists all the configured repositories. The default repository from where the CASE files are downloaded has an asterisk mark (*) against the Name field.

    2. You can then run the following command to configure a repository that downloads the CASE files from the cp.icr.io registry (an OCI-compliant registry) before you run the oc ibm-pak get command.

      oc ibm-pak config repo 'IBM Cloud-Pak OCI registry' -r oci:cp.icr.io/cpopen --enable

      The command sets 'IBM Cloud®-Pak OCI registry' as the default repository.

    3. You can list all the available CASE files to download by running the following command:

      oc ibm-pak list

      To get more help about the list command, run the following command:

      oc ibm-pak list --help
    4. Create the workspace.
      mkdir /root/2600
    5. Run the following command to set the environment variable $IBMPAK_HOME.
      export IBMPAK_HOME=/root/2600
    6. Set the following environment variables in a terminal session on your bastion host. Note the value of CASE_VERSION depends on the major release or interim fix you are targeting.
      export CASE_NAME=ibm-cp-fncm-case
      export CASE_VERSION=26.0.0
      export IBMPAK_HOME=<path>
      export TARGET_REGISTRY=<private registry access name and port>
      export REGISTRY_AUTH_FILE=$IBMPAK_HOME/.ibm-pak/auth.json
      export NAMESPACE=<namespace>
      export CASE_INVENTORY_SETUP=fncmOperatorSetup
    7. When you are ready to start the download of the CASE files, run the following command:

      oc ibm-pak get ${CASE_NAME} --version ${CASE_VERSION}

      By default, the root directory that is used by the ibm-pak plug-in is $IBMPAK_HOME/.ibm-pak. Therefore, by default, the CASE is downloaded to $IBMPAK_HOME/.ibm-pak/data/cases/$CASE_NAME/$CASE_VERSION.

      Tip: You can configure the root directory by setting the IBMPAK_HOME environment variable.
    8. To list the versions of all the downloaded CASE files, you can run the following command:

      oc ibm-pak list --downloaded

      The downloaded CASE is located in $IBMPAK_HOME/.ibm-pak/data/cases/$CASE_NAME/$CASE_VERSION. The logs files can be found in $IBMPAK_HOME/.ibm-pak/logs/oc-ibm_pak.log.

Results

Your host is now configured with the CASE files.

What to do next

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