Setting up a repeatable air-gap process

After you completed a CASE save, you can mirror the CASE as many times as you want to. Steps can be taken to air-gap a specific version of the Cloud Pak into development, test, and production stages.

About this task

The following steps show you how to save the CASE files to multiple registries (per environment), and use the same saved CASE cache (~/.ibm-pak/$CASE_NAME/$CASE_VERSION) to mirror the CASE without repeating the save process. As a result of not needing to save the CASE each time, you do not have to worry about introducing newer versions of the dependencies to the CASE cache.

Procedure

  1. Run the following command to save the CASE to ~/.ibm-pak/data/cases/$CASE_NAME/$CASE_VERSION.
    oc ibm-pak get $CASE_NAME \
       --version $CASE_VERSION

    This CASE can be used as an input for the mirror manifest generation.

  2. Run the oc ibm-pak generate mirror-manifests command to generate the image-mapping.txt file.
    oc ibm-pak generate mirror-manifests $CASE_NAME $TARGET_REGISTRY \
       --version $CASE_VERSION
  3. Add the image-mapping.txt to the oc image mirror command.
    oc image mirror -f ~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/images-mapping.txt \
       --filter-by-os '.*' -a $REGISTRY_AUTH_FILE \
       --insecure \
       --skip-multiple-scopes \
       --max-per-registry=1