mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
91 lines
4.8 KiB
Plaintext
91 lines
4.8 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * installing/disconnected_install/installing-mirroring-disconnected.adoc
|
|
// * updating/updating_a_cluster/updating_disconnected_cluster/mirroring-image-repository.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="oc-mirror-creating-image-set-config_{context}"]
|
|
= Creating the image set configuration
|
|
|
|
[role="_abstract"]
|
|
Before you can use the oc-mirror plugin to mirror image sets, you must create an image set configuration file. This image set configuration file defines which {product-title} releases, Operators, and other images to mirror, along with other configuration settings for the oc-mirror plugin.
|
|
|
|
You must specify a storage backend in the image set configuration file. This storage backend can be a local directory or a registry that supports link:https://docs.docker.com/registry/spec/manifest-v2-2[Docker v2-2]. The oc-mirror plugin stores metadata in this storage backend during image set creation.
|
|
|
|
[IMPORTANT]
|
|
====
|
|
Do not delete or modify the metadata that is generated by the oc-mirror plugin. You must use the same storage backend every time you run the oc-mirror plugin for the same mirror registry.
|
|
====
|
|
|
|
.Prerequisites
|
|
|
|
* You have created a container image registry credentials file. For instructions, see "Configuring credentials that allow images to be mirrored".
|
|
|
|
.Procedure
|
|
|
|
. Use the `oc mirror init` command to create a template for the image set configuration and save it to a file called `imageset-config.yaml`:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc mirror init --registry <storage_backend> > imageset-config.yaml --v1
|
|
----
|
|
+
|
|
where:
|
|
+
|
|
`<storage_backend>`:: Specifies the location of your storage backend, such as `example.com/mirror/oc-mirror-metadata`.
|
|
|
|
. Edit the file and adjust the settings as necessary:
|
|
+
|
|
[source,yaml,subs="attributes+"]
|
|
----
|
|
kind: ImageSetConfiguration
|
|
apiVersion: mirror.openshift.io/v1alpha2
|
|
archiveSize: 4
|
|
storageConfig:
|
|
registry:
|
|
imageURL: example.com/mirror/oc-mirror-metadata
|
|
skipTLS: false
|
|
mirror:
|
|
platform:
|
|
channels:
|
|
- name: stable-{product-version}
|
|
type: ocp
|
|
graph: true
|
|
operators:
|
|
- catalog: registry.redhat.io/redhat/redhat-operator-index:v{product-version}
|
|
packages:
|
|
- name: serverless-operator
|
|
channels:
|
|
- name: stable
|
|
additionalImages:
|
|
- name: registry.redhat.io/ubi9/ubi:latest
|
|
# ...
|
|
----
|
|
+
|
|
where:
|
|
+
|
|
`archiveSize`:: Specifies the `archiveSize` to set the maximum size, in GiB, of each file within the image set.
|
|
`storageConfig`:: Specifies the back-end location to save the image set metadata to. This location can be a registry or local directory. It is required to specify `storageConfig` values.
|
|
`imageURL`:: Specifies the registry URL for the storage backend.
|
|
`channels.name`:: Specifies the channel to retrieve the {product-title} images from.
|
|
`graph`:: Specifies `graph: true` to build and push the graph-data image to the mirror registry. The graph-data image is required to create OpenShift Update Service (OSUS). The `graph: true` field also generates the `UpdateService` custom resource manifest. The `oc` command-line interface (CLI) can use the `UpdateService` custom resource manifest to create OSUS. For more information, see _About the OpenShift Update Service_.
|
|
`operators.catalog`:: Specifies the Operator catalog to retrieve the {product-title} images from.
|
|
`packages.name`:: Specifies only certain Operator packages to include in the image set. Remove this field to retrieve all packages in the catalog.
|
|
`operators.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> --v1`.
|
|
`additionalImages.name`:: Specifies any additional images to include in image set.
|
|
+
|
|
[NOTE]
|
|
====
|
|
The `graph: true` field also mirrors the `ubi-micro` image along with other mirrored images.
|
|
|
|
When upgrading {product-title} Extended Update Support (EUS) versions, an intermediate version might be required between the current and target versions. For example, if the current version is `4.14` and target version is `4.16`, you might need to include a version such as `4.15.8` in the `ImageSetConfiguration` when using the oc-mirror plugin v1.
|
|
|
|
The oc-mirror plugin v1 might not always detect this automatically, so check the link:https://access.redhat.com/labs/ocpupgradegraph/update_path[Cincinnati graph web page] to confirm any required intermediate versions and add them manually to your configuration.
|
|
====
|
|
+
|
|
See "Image set configuration parameters" for the full list of parameters and "Image set configuration examples" for various mirroring use cases.
|
|
|
|
. Save the updated file.
|
|
+
|
|
This image set configuration file is required by the `oc mirror` command when mirroring content.
|