End-to-end mirroring images of IBM Fusion HCI System and its services to the enterprise registry

If you are planing a disconnected or offline installation, then you must mirror images to your enterprise registry. You can use this procedure to complete an end-to-end mirroring of IBM Fusion HCI System and all its services. Otherwise, you can mirror them individually per your requirement.

Before you begin

  • Before you mirror, go through the prerequisites. See Mirroring prerequisites.
  • Configure Common Environment Variables:
    Define the following environment variables for your target container registry. These values will be used in each of the subsequent steps to mirror all the related components.
    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"

    LOCAL_ISF_REGISTRY is your target container 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, hci-2.9.0/isf or hci-2.9.0. See the following sample values:
    export LOCAL_SECRET_JSON="/home/mirror/pull-secret.json"
    export LOCAL_ISF_REGISTRY="registryhost.com:443"
    export LOCAL_ISF_REPOSITORY="mirror-all-fusion-2.9.x"
    export TARGET_PATH="$LOCAL_ISF_REGISTRY/$LOCAL_ISF_REPOSITORY"
  • Define the following environment variables related to Fusion Data Foundation and related OpenShift® dependencies. The version of Fusion Data Foundation installed is based on the OpenShift version and it gets mirrored along with the other OpenShift dependencies.
    export OCP_VERSION=<your OCP version in X.Y format>
    export OCP_FULL_VERSION=<your OCP version in X.Y.Z format>
    export PRODUCT_REPO="openshift-release-dev"
    export RELEASE_NAME="ocp-release"
    export OCP_RELEASE_IMAGE="quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_FULL_VERSION}-x86_64"
    

About this task

Points to note about this task:

Procedure

  1. Mirror IBM Fusion and related Backup & Restore and Data Cataloging services.
    1. Define the following environment variables related to mirroring IBM Fusion and related services.
      export CASE_NAME=ibm-spectrum-fusion
      export CASE_VERSION=2.9.0
      
      By default, Backup & Restore and Data Cataloging are mirrored together with IBM Fusion in a single set of commands, so you do not have to mirror them separately.
    2. Use the ibm-pak get command to download the mirroring metadata from IBM’s public CloudPak repository:
      oc ibm-pak get --version "${CASE_VERSION}" "${CASE_NAME}"
    3. 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}"
      Example output when the generate command completes successfully:
      ...
      
      - 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}
      
    4. Run the oc mirror command for the non curated catalog provided in the output of the previous generate command.
      oc mirror --config /root/.ibm-pak/data/mirror/${CASE_NAME}/${CASE_VERSION}/image-set-config.yaml docker://${TARGET_PATH}
      Note: Use --dest-tls-verify=false parameter when you mirroring images to quay repository.
    5. Go to the directory that contains the image-set-config.yaml file that is referenced in the previous oc mirror command. This directory contains several files that were automatically generated by the ibm-pak tool and apply the generated image-digest-mirror-set.yaml files to your cluster:
      cd /root/.ibm-pak/data/mirror/${CASE_NAME}/${CASE_VERSION}/
      oc apply -f image-digest-mirror-set.yaml
  2. Mirror either Global Data Platform or Fusion Data Foundation storage service (option a or option b) images depending on which storage you plan to use:
    1. Do the following steps to mirror Fusion Data Foundation and its related OpenShift dependencies:
      1. Create the following ImageSetConfiguration file to mirror OpenShift and Fusion Data Foundation. This file is used by the subsequent oc-mirror command, and indicates which images must be mirrored.
        For 4.14 and 4.15:
        
        cat << EOF > imageset-config-ocp-rh.yaml
        kind: ImageSetConfiguration
        apiVersion: mirror.openshift.io/v1alpha2
        storageConfig:
          registry:
            imageURL: "$TARGET_PATH/isf-df-metadata:latest"
            skipTLS: true
        mirror:
          additionalImages:
        -	 name: ${OCP_RELEASE_IMAGE}
          operators:
            - catalog: icr.io/cpopen/isf-data-foundation-catalog:v$OCP_VERSION
              packages:
                - name: "mcg-operator"
                - name: "ocs-operator"
                - name: "odf-csi-addons-operator"
                - name: "odf-multicluster-orchestrator"
                - name: "odf-operator"
                - name: "odr-cluster-operator"
                - name: "odr-hub-operator"
                - name: "ocs-client-operator"
        EOF
        
        For 4.16:
        
        cat << EOF > imageset-config-ocp-rh.yaml
        kind: ImageSetConfiguration
        apiVersion: mirror.openshift.io/v1alpha2
        storageConfig:
          registry:
            imageURL: "$TARGET_PATH/isf-df-metadata:latest"
            skipTLS: true
        mirror:
          additionalImages:
            - name: ${OCP_RELEASE_IMAGE}
          operators:
            - catalog: registry.redhat.io/redhat/redhat-operator-index:v${OCP_VERSION}
              packages:
                - name: "kubernetes-nmstate-operator"
                - name: "redhat-oadp-operator"
                - name: "amq-streams"
                - name: "kubevirt-hyperconverged"
            - catalog: icr.io/cpopen/isf-data-foundation-catalog:v$OCP_VERSION
            packages:
              - name: "mcg-operator"
              - name: "ocs-operator"
              - name: "odf-csi-addons-operator"
              - name: "odf-multicluster-orchestrator"
              - name: "odf-operator" 
              - name: "odr-cluster-operator"    
              - name: "odr-hub-operator"
              - name: "ocs-client-operator"
              - name: "odf-prometheus-operator"
              - name: "recipe"
              - name: "rook-ceph-operator"
        EOF
        
      2. Run the following OC command to mirror OpenShift and Fusion Data Foundation images:
        oc mirror --config imageset-config-ocp-rh.yaml docker://${TARGET_PATH} --dest-skip-tls --ignore-history
      3. Apply the created files.
    2. To mirror Global Data Platform images, see Mirroring IBM Storage Scale images.