Setting up a repeatable mirroring process

After you save a CASE, you can mirror it as many times as you want. This approach allows you to mirror a specific version of Operational Decision Manager into development, test, and production stages using a private container registry.

About this task

Complete the following steps if you want to save the CASE to multiple registries (per environment) once and be able to run it in the future without repeating the save process.

Procedure

  1. Run the following command to save the CASE to ~/.ibm-pak/data/cases/$CASE_NAME/$CASE_VERSION so that it can be used as input during the generation of the mirror manifest.
    
       oc ibm-pak get $CASE_NAME --version $CASE_VERSION
  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

    If you want to repeat this process across environments, you can reuse the same saved CASE cache (~/.ibm-pak/$CASE_NAME/$CASE_VERSION) instead of saving the CASE again in other environments. No need to worry about updated versions of dependencies being brought into the saved cache.