Mirroring IBM Fusion images

Mirror the IBM Fusion images to your enterprise registry.

About this task

Use this procedure only necessary if you plan to mirror specific sub-components of IBM Fusion instead of following the full end-to-end mirroring instructions. For more information about the end-to-end mirroring of IBM Fusion and all its services, see .

High level tasks for mirroring:
  • Log in to the relevant Docker registries.
  • Define some convenience variables that are used to configure and mirror the Fusion base component.
  • Run the ibm-pak configuration tool to automatically generate the files needed by the oc-mirror CLI tool.
  • Run the oc-mirror CLI tool that mirrors the Fusion base components.
  • Run the mirroring steps for the additional components you want to include in your installation.
Note: If you choose to mirror specific sub-components, it is recommended that you use the same TARGET_PATH variable so that all the components mirror in the same location, and the generated ImageDigestMirrorSet is same across all components.

Procedure

  1. Run the following command to login to Docker registry with your Red Hat® enterprise credentials:
    Note: If you do not have Docker, you can use Podman.
    docker login registry.redhat.io -u <Red Hat enterprise registry username> -p <Red Hat enterprise registry password>
    
    Log in to the IBM Entitled Container Registry using the IBM entitlement key:
    docker login cp.icr.io -u cp -p <your entitlement key>
    Note: Ensure that your entitlement key for IBM Fusion contains the correct entitlement.
    Set the following environment variables:
    export LOCAL_SECRET_JSON="<relative path to pull-secret.json>"
    export LOCAL_ISF_REGISTRY="<Your container registry host>:<port>" export
    LOCAL_ISF_REPOSITORY="<Your image path>" export
    TARGET_PATH="$LOCAL_ISF_REGISTRY/$LOCAL_ISF_REPOSITORY"
    export CASE_NAME=ibm-spectrum-fusion-sds
    export CASE_VERSION=2.9.0
    Note: Port is a non-mandatory value when setting the LOCAL_ISF_REGISTRY variable. You can ignore this if your enterprise registry is accessible and has a secure connection.
    Sample value for without port:
    export LOCAL_ISF_REGISTRY="registryhost.com"
    See the following sample values:
    export LOCAL_ISF_REGISTRY="registryhost.com:443"
    export LOCAL_ISF_REPOSITORY="fusion-mirror"

    LOCAL_ISF_REGISTRY is your entitlement registry.

    LOCAL_ISF_REPOSITORY is the image path in which you want to mirror the images. You can choose your own repository paths. For example, sds-2.9.0/isf or sds-2.9.0 or sds-2.9.0/isf or sds-2.9.0.

  2. Run the command to login to the Docker registry with your enterprise registry credentials.
    docker login $LOCAL_ISF_REGISTRY -u <your enterprise registry username> -p <your enterprise registry password>
    
  3. Configure the ibm-pak plugin to use the oc mirror command:
    oc ibm-pak config mirror-tools -e oc-mirror
  4. From the mirroring host, run the get command to download the mirroring metadata from IBM’s public CloudPak repository:
    oc ibm-pak get --version "${CASE_VERSION}" "${CASE_NAME}" --skip-dependencies
    Note: The --skip-dependencies is critical when you mirror only sub-components of Fusion.
  5. Run the ibm-pak generate command to generate the oc mirror configuration files specific to your environment:
    oc ibm-pak generate mirror-manifests --version "${CASE_VERSION}" "${CASE_NAME}" "${TARGET_PATH}"
    An example output of a successfully completed generate command:
    ...
    
    - To mirror the non curated catalog:
    
      oc mirror --config /root/.ibm-pak/data/mirror/${CASE_NAME}/${CASE_VERSION}/image-set-config.yaml docker://${TARGET_PATH}
    
    
  6. Run the oc mirror command for the “non curated catalog” provided in the output of the generate command.
    Example:
    oc mirror --config /root/.ibm-pak/data/mirror/${CASE_NAME}/${CASE_VERSION}/image-set-config.yaml docker://${TARGET_PATH}
  7. Go to the directory that contains the image-set-config.yaml file that is referenced in the previous oc mirror command:
    cd /root/.ibm-pak/data/mirror/${CASE_NAME}/${CASE_VERSION}/
    This directory contains several files that were automatically generated by CloudPak.
  8. Apply the IDMS file to your cluster:
    oc apply -f image-digest-mirror-set.yaml
  9. Apply the CatalogSource file to your cluster:
    oc apply -f catalog-sources.yaml