Mirroring IBM Storage Fusion images

Mirror the IBM Storage Fusion 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 contains the correct entitlement.
    Set the following environment variables:
    
    export LOCAL_SECRET_JSON='<absolute 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')-; else export TARGET_PATH="$LOCAL_ISF_REGISTRY/$NAMESPACE"; export REPO_PREFIX=""; fi
    #verify both variables set correctly
    echo "$TARGET_PATH"
    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, sds-2.6.0/isf or sds-2.6.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. From the mirroring host, run the following copy command to copy IBM Storage Fusion images to the host:
    Note: Make sure you are logged into the source and destination repositories via docker login command.

    For 2.6.0

    skopeo copy --all docker://cp.icr.io/cp/isf-sds/fusion-ui@sha256:53d21261e99d6f25578ebc094861f7572bcef522e14feb1bf6d88165a4267ad2 docker://$TARGET_PATH/fusion-ui@sha256:53d21261e99d6f25578ebc094861f7572bcef522e14feb1bf6d88165a4267ad2
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-application-operator@sha256:7fe89cdaa8c65075383d6d426b6c0e5ff45f9f58a2d778cf855b887df0fdc664 docker://$TARGET_PATH/isf-application-operator@sha256:7fe89cdaa8c65075383d6d426b6c0e5ff45f9f58a2d778cf855b887df0fdc664
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-bkprstr-operator@sha256:8c35717bb853ea6a190adecec41a2dc50f9c1f79aeb783e5dc26be9c1cb93362 docker://$TARGET_PATH/isf-bkprstr-operator@sha256:8c35717bb853ea6a190adecec41a2dc50f9c1f79aeb783e5dc26be9c1cb93362
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-cns-operator@sha256:6db01c70639f0f28acd9e71259c1146a301508203be3087025000d4d1337feec docker://$TARGET_PATH/isf-cns-operator@sha256:6db01c70639f0f28acd9e71259c1146a301508203be3087025000d4d1337feec
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-data-protection-operator@sha256:01a6de8c10ce006e920a7e6e66eee76126f904f75f7389f7ec59b2c6034ca6bf docker://$TARGET_PATH/isf-data-protection-operator@sha256:01a6de8c10ce006e920a7e6e66eee76126f904f75f7389f7ec59b2c6034ca6bf
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-prereq-operator@sha256:1112a30b3b539b44b9ed5cf78b5621ce8df6986c0e7a3cc0c7053b640bf47f4f docker://$TARGET_PATH/isf-prereq-operator@sha256:1112a30b3b539b44b9ed5cf78b5621ce8df6986c0e7a3cc0c7053b640bf47f4f
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-proxy@sha256:a2ef33ee3af7666653cababd1abe9459cf9a4edd636e932995128e885790221d docker://$TARGET_PATH/isf-proxy@sha256:a2ef33ee3af7666653cababd1abe9459cf9a4edd636e932995128e885790221d
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-serviceability-operator@sha256:c690a7ed7cc2f2a369c220d93dad91bd6d8bdc94e99a38d2da85770cfa6e87f0 docker://$TARGET_PATH/isf-serviceability-operator@sha256:c690a7ed7cc2f2a369c220d93dad91bd6d8bdc94e99a38d2da85770cfa6e87f0
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-ui-operator@sha256:6108f2fa8b9370d363ad8e2e3f67c8efba42c7141e30ecb82798a320f2c0f8e6 docker://$TARGET_PATH/isf-ui-operator@sha256:6108f2fa8b9370d363ad8e2e3f67c8efba42c7141e30ecb82798a320f2c0f8e6
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-update-operator@sha256:5e3a62419b7243cc462c708e5adb59ecfbeaf399e3ac73e2d29976dc77fac104 docker://$TARGET_PATH/isf-update-operator@sha256:5e3a62419b7243cc462c708e5adb59ecfbeaf399e3ac73e2d29976dc77fac104
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/callhomeclient@sha256:0846903339b9e25a8ff51e9dbe3fba69cb97f48582a378afaca0738267b57b25 docker://$TARGET_PATH/callhomeclient@sha256:0846903339b9e25a8ff51e9dbe3fba69cb97f48582a378afaca0738267b57b25
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/eventmanager@sha256:0296c4df365efa53cbf28ef9459cdf9026d0435b3855bf1e10d3ef0db4720d9a docker://$TARGET_PATH/eventmanager@sha256:0296c4df365efa53cbf28ef9459cdf9026d0435b3855bf1e10d3ef0db4720d9a
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/eventmanager-snmp3@sha256:edd78eaf69498f9087b8691b5c2d7bbf993c3273667d309781ef77cf1a808632 docker://$TARGET_PATH/eventmanager-snmp3@sha256:edd78eaf69498f9087b8691b5c2d7bbf993c3273667d309781ef77cf1a808632
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/logcollector@sha256:7c426be2aec5553317c3f2906bd4b3efa7c1a0cf11d64c024ce5fc4a736b8222 docker://$TARGET_PATH/logcollector@sha256:7c426be2aec5553317c3f2906bd4b3efa7c1a0cf11d64c024ce5fc4a736b8222
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/spp-dp-operator@sha256:ace8d82f71616e576057e8a8b3ff3f7c545869350fa6c85f6b8eb9c1a3befef2 docker://$TARGET_PATH/spp-dp-operator@sha256:ace8d82f71616e576057e8a8b3ff3f7c545869350fa6c85f6b8eb9c1a3befef2
    skopeo copy --all docker://icr.io/cpopen/isf-operator-software-bundle@sha256:11726ca8e8c52d9e535dc1663b34b3ab45379b07164a2c005ce1d3325fe99c12 docker://$TARGET_PATH/isf-operator-software-bundle@sha256:11726ca8e8c52d9e535dc1663b34b3ab45379b07164a2c005ce1d3325fe99c12
    skopeo copy --all docker://icr.io/cpopen/isf-operator-software-catalog:2.6.0  docker://$TARGET_PATH/isf-operator-software-catalog:2.6.0
    skopeo copy --all docker://registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:63482c91717cb5acdf2734bce6ebadd43c6159c6116b6a2a581f4135873ad0dd docker://$TARGET_PATH/openshift4/ose-kube-rbac-proxy@sha256:63482c91717cb5acdf2734bce6ebadd43c6159c6116b6a2a581f4135873ad0dd
    

    For 2.6.1

    skopeo copy --all docker://cp.icr.io/cp/isf-sds/fusion-ui@sha256:769a525d83b782b7a149a40e2625f2b1ac51f291c3531a09a1e292f3e9dd97f6 docker://$TARGET_PATH/fusion-ui@sha256:769a525d83b782b7a149a40e2625f2b1ac51f291c3531a09a1e292f3e9dd97f6
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-application-operator@sha256:bba8f2756cad3b18f792bee8d51d662c471df1bfb0ec91e32787a05cb362a5c8 docker://$TARGET_PATH/isf-application-operator@sha256:bba8f2756cad3b18f792bee8d51d662c471df1bfb0ec91e32787a05cb362a5c8
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-bkprstr-operator@sha256:7359a17bc71bfd63a774a27186fbf9cff4bc8fc33b784848c6eca7f966fa346f docker://$TARGET_PATH/isf-bkprstr-operator@sha256:7359a17bc71bfd63a774a27186fbf9cff4bc8fc33b784848c6eca7f966fa346f
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-cns-operator@sha256:00497bad94900daa9a7986a897f7c4496ce7491313ba9a05ab7d9adb47fe7b1c docker://$TARGET_PATH/isf-cns-operator@sha256:00497bad94900daa9a7986a897f7c4496ce7491313ba9a05ab7d9adb47fe7b1c
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-data-protection-operator@sha256:19104ea1d62173eeff67c79b66923d041b02ad0bb7650618ed8d7ca655475fcb docker://$TARGET_PATH/isf-data-protection-operator@sha256:19104ea1d62173eeff67c79b66923d041b02ad0bb7650618ed8d7ca655475fcb
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-prereq-operator@sha256:224ea5eadf8e3e4875093d4c43ae9f895999917d6a527ef5c28e370571a53131 docker://$TARGET_PATH/isf-prereq-operator@sha256:224ea5eadf8e3e4875093d4c43ae9f895999917d6a527ef5c28e370571a53131
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-proxy@sha256:f7d33e64e0996a0549f31d5a8353c93a23a08d2726912cf1f13bb75730833d74 docker://$TARGET_PATH/isf-proxy@sha256:f7d33e64e0996a0549f31d5a8353c93a23a08d2726912cf1f13bb75730833d74
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-serviceability-operator@sha256:43c2241507abcc2c2cdfdfa5393a554c98f28782c0676f8344241ee9ed61bb8b docker://$TARGET_PATH/isf-serviceability-operator@sha256:43c2241507abcc2c2cdfdfa5393a554c98f28782c0676f8344241ee9ed61bb8b
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-ui-operator@sha256:7027a8af4650c564110164ba2e726d975a871d23c613abdace5dd6c002451c42 docker://$TARGET_PATH/isf-ui-operator@sha256:7027a8af4650c564110164ba2e726d975a871d23c613abdace5dd6c002451c42
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/isf-update-operator@sha256:b4f1c609d0016150b02a83b3e97c471ae5eb7944e02a1fbee38698bc519a6d50 docker://$TARGET_PATH/isf-update-operator@sha256:b4f1c609d0016150b02a83b3e97c471ae5eb7944e02a1fbee38698bc519a6d50
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/callhomeclient@sha256:f82752db42e65f562c8537bba2f7f17efde36af4ba1cfeb02813c5a1dd31e5e0 docker://$TARGET_PATH/callhomeclient@sha256:f82752db42e65f562c8537bba2f7f17efde36af4ba1cfeb02813c5a1dd31e5e0
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/eventmanager@sha256:f62eb3eeca87965c01045183cd15563aa372f949d5c4f21206df0f0012849d2d docker://$TARGET_PATH/eventmanager@sha256:f62eb3eeca87965c01045183cd15563aa372f949d5c4f21206df0f0012849d2d
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/eventmanager-snmp3@sha256:50848c68fdc56d5acbb95ff8d8263710d99062a470076d29691acad913c591ed docker://$TARGET_PATH/eventmanager-snmp3@sha256:50848c68fdc56d5acbb95ff8d8263710d99062a470076d29691acad913c591ed
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/logcollector@sha256:2f6647c887264730ef06aee80565acd491c654004912d88cf22290bc7e5c12a9 docker://$TARGET_PATH/logcollector@sha256:2f6647c887264730ef06aee80565acd491c654004912d88cf22290bc7e5c12a9
    skopeo copy --all docker://cp.icr.io/cp/isf-sds/spp-dp-operator@sha256:bccd7bc4ab33216b153ca18c2f48d69222ad28e6ff5262161fda3f54ea34f7e7 docker://$TARGET_PATH/spp-dp-operator@sha256:bccd7bc4ab33216b153ca18c2f48d69222ad28e6ff5262161fda3f54ea34f7e7
    skopeo copy --all docker://cp.icr.io/cpopen/isf-operator-software-bundle@sha256:cd3ce753b5fd978591b25ba913ba5ad3430a1c304afa3d5116a964fa21ebe27a docker://$TARGET_PATH/isf-operator-software-bundle@sha256:cd3ce753b5fd978591b25ba913ba5ad3430a1c304afa3d5116a964fa21ebe27a
    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://cp.icr.io/cpopen/isf-operator-software-catalog:2.6.1 docker://$TARGET_PATH/isf-operator-software-catalog:2.6.1
    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
  4. Add ImageContentSourcePolicy.
    Note: The ImageContentSourcePolicy contains list of repositories, copy digests for the IBM Storage Fusion.
    See the following ImageContentSourcePolicy:
    apiVersion: operator.openshift.io/v1alpha1 
    kind: ImageContentSourcePolicy 
    metadata: 
      name: isf-fusion-icsp 
    spec: 
      repositoryDigestMirrors:  
      - mirrors:
        - $TARGET_PATH 
        source: cp.icr.io/cp/isf-sds 
      - mirrors:
        - $TARGET_PATH 
        source: icr.io/cpopen 
      - mirrors: 
        - $TARGET_PATH/openshift4 
        source: registry.redhat.io/openshift4