Mirroring IBM Storage Fusion HCI images

Mirror the IBM Storage Fusion HCI System images to your enterprise registry.

Procedure

  1. Run the following command to login to Docker registry with your Red Hat® enterprise credentials:
    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 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_SECRET_JSON='/home/mirror/pull-secret.json'
    export LOCAL_ISF_REGISTRY="registryhost.com:443"
    export LOCAL_ISF_REPOSITORY="fusion-mirror"

    LOCAL_SECRET_JSON is relative path for your pull-secret.json file.

    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 Storage Fusion HCI System 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/isf/callhomeclient@sha256:0bcc8089baf545567c9b20e93997f1a2b94751a60aafef5dde52f86bfbd1dcd1 docker://$TARGET_PATH/callhomeclient@sha256:0bcc8089baf545567c9b20e93997f1a2b94751a60aafef5dde52f86bfbd1dcd1
    skopeo copy --all docker://cp.icr.io/cp/isf/eventmanager@sha256:71ed90ff22f6adf280f45e9dd449acde60f152df9c0055ca339f289bcc836edc docker://$TARGET_PATH/eventmanager@sha256:71ed90ff22f6adf280f45e9dd449acde60f152df9c0055ca339f289bcc836edc
    skopeo copy --all docker://cp.icr.io/cp/isf/logcollector@sha256:67e25f7eac43dec4e0a7f2d0edd1e835252507bed31f6b0e33a6941e675bfd62 docker://$TARGET_PATH/logcollector@sha256:67e25f7eac43dec4e0a7f2d0edd1e835252507bed31f6b0e33a6941e675bfd62
    skopeo copy --all docker://cp.icr.io/cp/isf/eventmanager-snmp3@sha256:377028a1343fea060202fecc3ff924b1ce94e1d0c6b7c0e6b8d4946ee427556f docker://$TARGET_PATH/eventmanager-snmp3@sha256:377028a1343fea060202fecc3ff924b1ce94e1d0c6b7c0e6b8d4946ee427556f
    skopeo copy --all docker://cp.icr.io/cp/isf/fusion-ui@sha256:285de9f0d99bf4bc18168e90a23cbc4331dce3ad060c990dfbc7c8a822f1784a docker://$TARGET_PATH/fusion-ui@sha256:285de9f0d99bf4bc18168e90a23cbc4331dce3ad060c990dfbc7c8a822f1784a
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-application-operator@sha256:cfcc675d9c5b9289e40e82892f6bb625303b5766ed8d7a24a17f84831aa48ce1 docker://$TARGET_PATH/isf-application-operator@sha256:cfcc675d9c5b9289e40e82892f6bb625303b5766ed8d7a24a17f84831aa48ce1
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-bkprstr-operator@sha256:4f5530c64b42afc7a6ea74483bb706636cc65031081a7acc53833976a22e1b13 docker://$TARGET_PATH/isf-bkprstr-operator@sha256:4f5530c64b42afc7a6ea74483bb706636cc65031081a7acc53833976a22e1b13
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-compute-operator@sha256:477602c61c9ac64c871289757f5c72555f49b7c99a6efffb94b2ffe56c9285d8 docker://$TARGET_PATH/isf-compute-operator@sha256:477602c61c9ac64c871289757f5c72555f49b7c99a6efffb94b2ffe56c9285d8
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-data-protection-operator@sha256:60ee19518902877c99930385bc935bacb27bde09481029905e7b3e73490cfd32 docker://$TARGET_PATH/isf-data-protection-operator@sha256:60ee19518902877c99930385bc935bacb27bde09481029905e7b3e73490cfd32
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-ics-operator@sha256:bddda34506c18a93655ed75284a76e0e33ea4ad92d0c221cf26819b7311da802 docker://$TARGET_PATH/isf-ics-operator@sha256:bddda34506c18a93655ed75284a76e0e33ea4ad92d0c221cf26819b7311da802
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-network-fw-updater@sha256:b4787a1a6563f16f8feb1f0ba5e873d036ac40736967476b20d41ed6437909f0 docker://$TARGET_PATH/isf-network-fw-updater@sha256:b4787a1a6563f16f8feb1f0ba5e873d036ac40736967476b20d41ed6437909f0
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-network-operator@sha256:0ad7c8b007ab84163e725fa7e417569c0cc48afbfe1c2d2ee08e48b983c490b5 docker://$TARGET_PATH/isf-network-operator@sha256:0ad7c8b007ab84163e725fa7e417569c0cc48afbfe1c2d2ee08e48b983c490b5
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-node-exporter@sha256:4c1b13790f767a00dc869f8ffbb626b5ffc5b95623940fe8daa3cb556231b17f docker://$TARGET_PATH/isf-node-exporter@sha256:4c1b13790f767a00dc869f8ffbb626b5ffc5b95623940fe8daa3cb556231b17f
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-proxy@sha256:ffa4e93f289ed68210785939af611576fc3f1c6535c2c7d4ffbb18ad77e4ff87 docker://$TARGET_PATH/isf-proxy@sha256:ffa4e93f289ed68210785939af611576fc3f1c6535c2c7d4ffbb18ad77e4ff87
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-serviceability-operator@sha256:de7183e203d01d92e0c50fea3d9a08290917ebfb56831bf9267eb3e5a7c52201 docker://$TARGET_PATH/isf-serviceability-operator@sha256:de7183e203d01d92e0c50fea3d9a08290917ebfb56831bf9267eb3e5a7c52201
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-snmp-exporter@sha256:d38249f96312d0edd856d5ec917c2f8f3d822b21f61b9dc179b7ccee52371dfc docker://$TARGET_PATH/isf-snmp-exporter@sha256:d38249f96312d0edd856d5ec917c2f8f3d822b21f61b9dc179b7ccee52371dfc
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-storage-operator@sha256:5fb2d4d76b6648fb737f9a855870456cab6d954a723ad0f87e02eeddb75c0ae1 docker://$TARGET_PATH/isf-storage-operator@sha256:5fb2d4d76b6648fb737f9a855870456cab6d954a723ad0f87e02eeddb75c0ae1
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-storage-services@sha256:7ea62acb3d2a8756feeff7f0008b2e74f10547be7c26bf81e8c191ad0db7f112 docker://$TARGET_PATH/isf-storage-services@sha256:7ea62acb3d2a8756feeff7f0008b2e74f10547be7c26bf81e8c191ad0db7f112
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-ui-operator@sha256:3ee2bee4ad20ad2785e5f95d60f9820f58f35f59493f6ac86304e422c013500e docker://$TARGET_PATH/isf-ui-operator@sha256:3ee2bee4ad20ad2785e5f95d60f9820f58f35f59493f6ac86304e422c013500e
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-update-operator@sha256:1b235398e878400a821684ff784600e2d3298eeec3cc8bbab59d105bcae6a4b3 docker://$TARGET_PATH/isf-update-operator@sha256:1b235398e878400a821684ff784600e2d3298eeec3cc8bbab59d105bcae6a4b3
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-metrodr-operator@sha256:e4a08fc765d4bdf5c4d48e10287fe614d1a298ca62a89cef1c583a95cbe05ab1 docker://$TARGET_PATH/isf-metrodr-operator@sha256:e4a08fc765d4bdf5c4d48e10287fe614d1a298ca62a89cef1c583a95cbe05ab1
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-prereq-operator@sha256:13b9feec83144ad3fee5cfd9f1e649c33ed772c11f96a2517eb5d21880066733 docker://$TARGET_PATH/isf-prereq-operator@sha256:13b9feec83144ad3fee5cfd9f1e649c33ed772c11f96a2517eb5d21880066733
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-compute-fw-updater@sha256:a9167b73105fed6056135d611c99b25f088819d3aaa30151b3836865ded2ffaf docker://$TARGET_PATH/isf-compute-fw-updater@sha256:a9167b73105fed6056135d611c99b25f088819d3aaa30151b3836865ded2ffaf
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-utils@sha256:8961a6ed85ab53043a394b539e88abecc678fca26f552a5d88fed3742550a0d2 docker://$TARGET_PATH/isf-utils@sha256:8961a6ed85ab53043a394b539e88abecc678fca26f552a5d88fed3742550a0d2
    skopeo copy --all docker://cp.icr.io/cp/isf/isf-validate-entitlement@sha256:1a0dbf7c537f02dc0091e3abebae0ccac83da6aa147529f5de49af0f23cd9e8e docker://$TARGET_PATH/isf-validate-entitlement@sha256:1a0dbf7c537f02dc0091e3abebae0ccac83da6aa147529f5de49af0f23cd9e8e
    skopeo copy --all docker://cp.icr.io/cp/isf/ramen-operator@sha256:643f19766d032cb4776b50b57a3f210543af0d485f81d17f58434da8eda3b166 docker://$TARGET_PATH/ramen-operator@sha256:643f19766d032cb4776b50b57a3f210543af0d485f81d17f58434da8eda3b166
    skopeo copy --all docker://cp.icr.io/cp/isf/spp-dp-operator@sha256:796d627dcc934ddf4f8a732db14fdf49c349cd845d02b6dde945bc8e86148e6c docker://$TARGET_PATH/spp-dp-operator@sha256:796d627dcc934ddf4f8a732db14fdf49c349cd845d02b6dde945bc8e86148e6c
    skopeo copy --all docker://icr.io/cpopen/isf-operator-bundle@sha256:4ea5595bc1e150da54165f688b14f14ca164269e4cf482f772feb1f9c4a050de docker://$TARGET_PATH/isf-operator-bundle@sha256:4ea5595bc1e150da54165f688b14f14ca164269e4cf482f772feb1f9c4a050de
    skopeo copy --all docker://icr.io/cpopen/isf-operator-catalog:2.6.1-linux.amd64 docker://$TARGET_PATH/isf-operator-catalog:2.6.1-linux.amd64
    skopeo copy --all docker://registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:63482c91717cb5acdf2734bce6ebadd43c6159c6116b6a2a581f4135873ad0dd docker://$TARGET_PATH/openshift4/ose-kube-rbac-proxy@sha256:63482c91717cb5acdf2734bce6ebadd43c6159c6116b6a2a581f4135873ad0dd
    skopeo copy --all docker://registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:63482c91717cb5acdf2734bce6ebadd43c6159c6116b6a2a581f4135873ad0dd docker://$LOCAL_ISF_REGISTRY/$NAMESPACE/$(echo $REPO_PREFIX)openshift4-ose-kube-rbac-proxy@sha256:63482c91717cb5acdf2734bce6ebadd43c6159c6116b6a2a581f4135873ad0dd
    skopeo copy --all docker://quay.io/submariner/submariner-operator:0.12.0 docker://$TARGET_PATH/submariner/submariner-operator:0.12.0
    skopeo copy --all docker://quay.io/submariner/submariner-gateway:0.12.0 docker://$TARGET_PATH/submariner/submariner-gateway:0.12.0
    skopeo copy --all docker://quay.io/submariner/lighthouse-agent:0.12.0 docker://$TARGET_PATH/submariner/lighthouse-agent:0.12.0
    skopeo copy --all docker://quay.io/submariner/lighthouse-coredns:0.12.0 docker://$TARGET_PATH/submariner/lighthouse-coredns:0.12.0
    skopeo copy --all docker://quay.io/submariner/submariner-networkplugin-syncer:0.12.0 docker://$TARGET_PATH/submariner/submariner-networkplugin-syncer:0.12.0
    skopeo copy --all docker://quay.io/submariner/submariner-route-agent:0.12.0 docker://$TARGET_PATH/submariner/submariner-route-agent:0.12.0
    skopeo copy --all docker://gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 docker://$TARGET_PATH/kubebuilder/kube-rbac-proxy:v0.8.0
    skopeo copy --all docker://gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 docker://$LOCAL_ISF_REGISTRY/$NAMESPACE/$(echo $REPO_PREFIX)kubebuilder-kube-rbac-proxy:v0.8.0
    skopeo copy --all docker://cp.icr.io/cp/isf/baas-minio@sha256:07d8b6a01f4bee6a45cedebaa345b1a15f87900f1fb09df52a287d6fcec1cb73 docker://$TARGET_PATH/baas-minio@sha256:07d8b6a01f4bee6a45cedebaa345b1a15f87900f1fb09df52a287d6fcec1cb73
    
    Note: Ensure all the copy commands complete successfully without errors. For example, if you have the correct entitlement key but still observe the following error for any or all of the copy commands, then contact IBM support.
    denied: insufficient scope