Mirroring IBM Spectrum Scale images

Mirror the IBM Spectrum Scale images to your enterprise registry.

About this task

For more reference information, see Offline setup for network restricted Red Hat OpenShift Container Platform clusters in IBM Spectrum Scale Container Native 5.1.6.

Procedure

  1. 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 Storage Fusion HCI System contains the correct entitlement.
    Set the following environment variables:
    
    export LOCAL_SECRET_JSON='<relative path to pull-secret.json>'
    export LOCAL_ISF_REGISTRY="<Your enterprise registry host>:<port>"
    export LOCAL_ISF_REPOSITORY="<Your image path>"
    IFS='/' read -r NAMESPACE PREFIX <<< "$LOCAL_ISF_REPOSITORY"
    if [[ "$PREFIX" != "" ]]; then export TARGET_PATH="$LOCAL_ISF_REGISTRY/$NAMESPACE/$PREFIX"; export REPO_PREFIX=$(echo "$PREFIX"| sed -r 's/\//-/g')-; export NAMESPACE="$NAMESPACE"; else export TARGET_PATH="$LOCAL_ISF_REGISTRY/$NAMESPACE"; export REPO_PREFIX=""; fi
    #verify both variables set correctly
    echo "$TARGET_PATH"
    echo "$NAMESPACE"
    echo "$REPO_PREFIX" 
    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, hci-2.6.1/isf or hci-2.6.1.

  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. From the mirroring host, run the following copy command to copy IBM Spectrum Scale images to the host:
    Note: Make sure you are logged into the source and destination repositories via docker login command.
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/ibm-spectrum-scale-core-init@sha256:41b260b696a1470340b3f0e45b92efde7062a439f59e5cd12e7c1bd9b2a55c50 docker://$TARGET_PATH/ibm-spectrum-scale-core-init@sha256:41b260b696a1470340b3f0e45b92efde7062a439f59e5cd12e7c1bd9b2a55c50
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/ibm-spectrum-scale-gui@sha256:b2026fd3f989dca9cbaded2157d0dc14c4d89dc1d1f3db0613c07924eb03e852 docker://$TARGET_PATH/ibm-spectrum-scale-gui@sha256:b2026fd3f989dca9cbaded2157d0dc14c4d89dc1d1f3db0613c07924eb03e852
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/postgres@sha256:c2a30d08a6f9e6c365595fd086c9e0436064c52425f15f72379ecf0807bac518 docker://$TARGET_PATH/postgres@sha256:c2a30d08a6f9e6c365595fd086c9e0436064c52425f15f72379ecf0807bac518
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/ubi-minimal@sha256:65a240ad8bd3f2fff3e18a22ebadc40da0b145616231fc1e16251f3c6dee087a docker://$TARGET_PATH/ubi-minimal@sha256:65a240ad8bd3f2fff3e18a22ebadc40da0b145616231fc1e16251f3c6dee087a
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/ibm-spectrum-scale-pmcollector@sha256:4fb78bafd2c01c1d30322b491bfbf344c78ddb24c3e8e3c313589536fb7b15b4 docker://$TARGET_PATH/ibm-spectrum-scale-pmcollector@sha256:4fb78bafd2c01c1d30322b491bfbf344c78ddb24c3e8e3c313589536fb7b15b4
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/ibm-spectrum-scale-monitor@sha256:70766c93b2bf352ea42b153913e8eacb156a298e750ddb8d8274d3eecc913c5a docker://$TARGET_PATH/ibm-spectrum-scale-monitor@sha256:70766c93b2bf352ea42b153913e8eacb156a298e750ddb8d8274d3eecc913c5a
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/ibm-spectrum-scale-grafana-bridge@sha256:bc9eb6ac3a92075cb872c45dc5af2c05422868bdb18e2202ccf928d3cc31d889 docker://$TARGET_PATH/ibm-spectrum-scale-grafana-bridge@sha256:bc9eb6ac3a92075cb872c45dc5af2c05422868bdb18e2202ccf928d3cc31d889
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/ibm-spectrum-scale-coredns@sha256:29f943685acbf4c0a111ae70889465130bac94a4d6d5a6bf5efa0f879c2a79b1 docker://$TARGET_PATH/ibm-spectrum-scale-coredns@sha256:29f943685acbf4c0a111ae70889465130bac94a4d6d5a6bf5efa0f879c2a79b1
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/erasure-code/ibm-spectrum-scale-daemon@sha256:7c019273fb045aadd9eb019829e7733efde9f00447ea30c374b7dfa7861705c9 docker://$TARGET_PATH/erasure-code/ibm-spectrum-scale-daemon@sha256:7c019273fb045aadd9eb019829e7733efde9f00447ea30c374b7dfa7861705c9
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/csi/csi-snapshotter@sha256:0d8d81948af4897bd07b86046424f022f79634ee0315e9f1d4cdb5c1c8d51c90 docker://$TARGET_PATH/csi/csi-snapshotter@sha256:0d8d81948af4897bd07b86046424f022f79634ee0315e9f1d4cdb5c1c8d51c90
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/csi/csi-attacher@sha256:08721106b949e4f5c7ba34b059e17300d73c8e9495201954edc90eeb3e6d8461 docker://$TARGET_PATH/csi/csi-attacher@sha256:08721106b949e4f5c7ba34b059e17300d73c8e9495201954edc90eeb3e6d8461
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/csi/csi-provisioner@sha256:e468dddcd275163a042ab297b2d8c2aca50d5e148d2d22f3b6ba119e2f31fa79 docker://$TARGET_PATH/csi/csi-provisioner@sha256:e468dddcd275163a042ab297b2d8c2aca50d5e148d2d22f3b6ba119e2f31fa79
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/csi/livenessprobe@sha256:2b10b24dafdc3ba94a03fc94d9df9941ca9d6a9207b927f5dfd21d59fbe05ba0 docker://$TARGET_PATH/csi/livenessprobe@sha256:2b10b24dafdc3ba94a03fc94d9df9941ca9d6a9207b927f5dfd21d59fbe05ba0
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/csi/csi-node-driver-registrar@sha256:4a4cae5118c4404e35d66059346b7fa0835d7e6319ff45ed73f4bba335cf5183 docker://$TARGET_PATH/csi/csi-node-driver-registrar@sha256:4a4cae5118c4404e35d66059346b7fa0835d7e6319ff45ed73f4bba335cf5183
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/csi/csi-resizer@sha256:3a7bdf5d105783d05d0962fa06ca53032b01694556e633f27366201c2881e01d docker://$TARGET_PATH/csi/csi-resizer@sha256:3a7bdf5d105783d05d0962fa06ca53032b01694556e633f27366201c2881e01d
    skopeo copy --all docker://cp.icr.io/cp/spectrum/scale/csi/ibm-spectrum-scale-csi-driver@sha256:573b3b2d349359d7871d53060a0fc7df6e03de2e2900d1be46b4146ab1972fb7 docker://$TARGET_PATH/csi/ibm-spectrum-scale-csi-driver@sha256:573b3b2d349359d7871d53060a0fc7df6e03de2e2900d1be46b4146ab1972fb7
    skopeo copy --all docker://icr.io/cpopen/ibm-spectrum-scale-csi-operator@sha256:da7ada19c06b20edc9b3c8067a8380f6879899022dda8a5c1cbed7c15b2a381d docker://$TARGET_PATH/ibm-spectrum-scale-csi-operator@sha256:da7ada19c06b20edc9b3c8067a8380f6879899022dda8a5c1cbed7c15b2a381d
    skopeo copy --all docker://icr.io/cpopen/ibm-spectrum-scale-operator@sha256:eb727060999daea0319c3d67ea7eeb1ca24df6984670272f47f8b6774f451a94 docker://$TARGET_PATH/ibm-spectrum-scale-operator@sha256:eb727060999daea0319c3d67ea7eeb1ca24df6984670272f47f8b6774f451a94
    skopeo copy --all docker://icr.io/cpopen/ibm-spectrum-scale-must-gather@sha256:f9b4e6570a9ff8194840bbb97cd7f021485dabc806a5115c0e14f06813d580e7 docker://$TARGET_PATH/ibm-spectrum-scale-must-gather@sha256:f9b4e6570a9ff8194840bbb97cd7f021485dabc806a5115c0e14f06813d580e7

    Ensure all commands are successful.