Create an image set configuration file

You must create an ImageSetConfiguration YAML file to specify both the Operators to mirror and the configuration settings for the oc-mirror plugin. Edit the contents of the file so that the entries are compatible with both MicroShift and the Operator you plan to use.

Note

oc mirror v2 uses a cache system instead of metadata. The cache system prevents the need to start the entire mirroring process over when a single step fails. Instead, you can troubleshoot the failed step and the process does not re-mirror images that existed before the failure.

Prerequisites
Procedure
  1. Create and edit the ImageSetConfiguration YAML for MicroShift by using the following example as a guide:

    Example edited MicroShift image set configuration file
    kind: ImageSetConfiguration
    apiVersion: mirror.openshift.io/v2alpha1
    mirror:
      operators:
      - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.20
        packages:
        - name: amq-broker-rhel9
          channels:
          - name: 7.13.x
      additionalImages:
       - name: quay.io/rh_ee_aguidi/multi-platform-container:latest
       - name: quay.io/rh_ee_aguidi/empty-image:latest

    where:

    mirror.operators.catalog

    Specifies the Operator catalog to retrieve images from.

    mirror.operators.packages.name

    Specifies the Operator packages to include in the image set. Remove this field to retrieve all packages in the catalog.

    mirror.operators.packages.channels.name

    Specifies only certain channels of the Operator packages to include in the image set. You must always include the default channel for the Operator package even if you do not use the bundles in that channel. You can find the default channel by running the following command: oc mirror list operators --catalog=<catalog_name> --package=<package_name>.

    mirror.additionalImages

    Specifies any additional images to include in the image set. If you do not need to specify additional images, delete this field.

    Important

    The platform field, related fields, and Helm are not supported by MicroShift.

  2. Save the updated file as ImageSetConfiguration.yaml.

Next steps
  • Use the oc-mirror plugin to mirror an image set directly to a target mirror registry.

  • Configure CRI-O.

  • Apply the catalog sources to your node.