Skip to content

Commit 49db6eb

Browse files
authored
Merge pull request #58552 from bergerhoffer/OSDOCS-4906
OSDOCS-4906: Updating oc-mirror docs for OCI FBC GA
2 parents c5bdf7b + ef8a0fe commit 49db6eb

8 files changed

+87
-103
lines changed

installing/disconnected_install/installing-mirroring-disconnected.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,14 @@ include::modules/oc-mirror-differential-updates.adoc[leveloffset=+2]
124124
// Performing a dry run
125125
include::modules/oc-mirror-dry-run.adoc[leveloffset=+1]
126126

127-
// Mirroring Operator images in OCI format
127+
// Including local OCI Operator catalogs
128128
include::modules/oc-mirror-oci-format.adoc[leveloffset=+1]
129129

130130
[role="_additional-resources"]
131131
.Additional resources
132132

133-
* xref:../../operators/admin/olm-managing-custom-catalogs.adoc#olm-managing-custom-catalogs-fb[File-based catalogs]
133+
// TODO: This title might need to update per sebastian's PR
134+
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.html#oc-mirror-updating-cluster-manifests_installing-mirroring-disconnected[Configuring your cluster to use the resources generated by oc-mirror]
134135

135136
// Image set configuration parameters
136137
include::modules/oc-mirror-imageset-config-params.adoc[leveloffset=+1]
@@ -145,4 +146,4 @@ include::modules/oc-mirror-command-reference.adoc[leveloffset=+1]
145146
[id="additional-resources_installing-mirroring-disconnected"]
146147
== Additional resources
147148

148-
* xref:../../updating/updating-restricted-network-cluster/index.adoc#about-restricted-network-updates[About cluster updates in a disconnected environment]
149+
* xref:../../updating/updating-restricted-network-cluster/index.adoc#about-restricted-network-updates[About cluster updates in a disconnected environment]

modules/oc-mirror-command-reference.adoc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ The following tables describe the `oc mirror` subcommands and flags:
6565
|`--ignore-history`
6666
|Ignore past mirrors when downloading images and packing layers. Disables incremental mirroring and might download more data.
6767

68+
|`--include-local-oci-catalogs`
69+
|Enable mirroring for local OCI catalogs on disk to the target mirror registry.
70+
6871
|`--manifests-only`
6972
|Generate manifests for `ImageContentSourcePolicy` objects to configure a cluster to use the mirror registry, but do not actually mirror any images.
7073

@@ -74,14 +77,11 @@ The following tables describe the `oc mirror` subcommands and flags:
7477
|`--max-per-registry <int>`
7578
|Specify the number of concurrent requests allowed per registry. The default is `6`.
7679

77-
|`--oci-feature-action`
78-
|The action to perform when using the Technology Preview OCI feature. The options are `copy` or `mirror`.
79-
8080
|`--oci-insecure-signature-policy`
81-
|Do not push signatures when using the Technology Preview OCI feature.
81+
|Do not push signatures when mirroring local OCI catalogs (with `--include-local-oci-catalogs`).
8282

8383
|`--oci-registries-config`
84-
|Provide a registries configuration file to specify an alternative registry location to copy from when using the Technology Preview OCI feature.
84+
|Provide a registries configuration file to specify an alternative registry location to copy from when mirroring local OCI catalogs (with `--include-local-oci-catalogs`).
8585

8686
|`--skip-cleanup`
8787
|Skip removal of artifact directories.
@@ -108,7 +108,9 @@ The following tables describe the `oc mirror` subcommands and flags:
108108
|Use plain HTTP for the source registry.
109109

110110
|`--use-oci-feature`
111-
|Use the Technology Preview OCI feature for copying OCI-formatted images.
111+
|Enable mirroring for local OCI catalogs on disk to the target mirror registry.
112+
113+
The `--use-oci-feature` flag is deprecated. Use the `--include-local-oci-catalogs` flag instead.
112114

113115
|`-v`, `--verbose` `<int>`
114116
|Specify the number for the log level verbosity. Valid values are `0` - `9`. The default is `0`.

modules/oc-mirror-creating-image-set-config.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ mirror:
5858
helm: {}
5959
----
6060
<1> Add `archiveSize` to set the maximum size, in GiB, of each file within the image set.
61-
<2> Set 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, unless you are using the Technology Preview OCI feature.
61+
<2> Set 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.
6262
<3> Set the registry URL for the storage backend.
6363
<4> Set the channel to retrieve the {product-title} images from.
6464
<5> Add `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) applications. The `graph: true` field also generates the `UpdateService` CR manifest. The `oc` command-line interface (CLI) can use the `UpdateService` CR manifest to create OSUS applications. For more information, see _About the OpenShift Update Service_.

modules/oc-mirror-image-set-config-examples.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ mirror:
7272
[id="oc-mirror-image-set-examples-shortest-upgrade-path_{context}"]
7373
== Use case: Including the shortest {product-title} upgrade path
7474

75-
The following `ImageSetConfiguration` file uses a local storage backend and includes all {product-title} versions along the shortest upgrade path from the minimum version of `4.9.37` to the maximum version of `4.10.22`.
75+
The following `ImageSetConfiguration` file uses a local storage backend and includes all {product-title} versions along the shortest upgrade path from the minimum version of `4.11.37` to the maximum version of `4.12.15`.
7676

7777
.Example `ImageSetConfiguration` file
7878
[source,yaml]
@@ -86,8 +86,8 @@ mirror:
8686
platform:
8787
channels:
8888
- name: stable-4.10
89-
minVersion: 4.9.37
90-
maxVersion: 4.10.22
89+
minVersion: 4.11.37
90+
maxVersion: 4.12.15
9191
shortestPath: true
9292
----
9393

modules/oc-mirror-imageset-config-params.adoc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,19 @@ operators:
175175
|If `true`, dependencies of bundles are not included.
176176
|Boolean. The default value is `false`.
177177

178+
|`mirror.operators.targetCatalog`
179+
|An alternative name and optional namespace hierarchy to mirror the referenced catalog as.
180+
|String. For example: `my-namespace/my-operator-catalog`
181+
178182
|`mirror.operators.targetName`
179-
|Optional alternative name to mirror the referenced catalog as.
183+
|An alternative name to mirror the referenced catalog as.
184+
185+
The `targetName` parameter is deprecated. Use the `targetCatalog` parameter instead.
186+
180187
|String. For example: `my-operator-catalog`
181188

182189
|`mirror.operators.targetTag`
183-
|Optional alternative tag to append to the `targetName`.
190+
|An alternative tag to append to the `targetName` or `targetCatalog`.
184191
|String. For example: `v1`
185192

186193
|`mirror.platform`
@@ -219,7 +226,7 @@ channels:
219226

220227
|`mirror.platform.channels.minVersion`
221228
|The minimum version of the referenced platform to be mirrored.
222-
|String. For example: `4.9.6`
229+
|String. For example: `4.12.6`
223230

224231
|`mirror.platform.channels.maxVersion`
225232
|The highest version of the referenced platform to be mirrored.

modules/oc-mirror-oci-format.adoc

Lines changed: 53 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,25 @@
55

66
:_content-type: PROCEDURE
77
[id="oc-mirror-oci-format_{context}"]
8-
= Mirroring file-based catalog Operator images in OCI format
8+
= Including local OCI Operator catalogs
99

10-
You can use the oc-mirror plugin to mirror Operators in the Open Container Initiative (OCI) image format, instead of Docker v2 format. You can copy Operator images to a file-based catalog on disk in OCI format. Then you can copy local OCI images to your target mirror registry.
10+
While mirroring {product-title} releases, Operator catalogs, and additional images from a registry to a partially disconnected cluster, you can include Operator catalog images from a local file-based catalog on disk. The local catalog must be in the Open Container Initiative (OCI) format.
1111

12-
:FeatureName: Using the oc-mirror plugin to mirror Operator images in OCI format
13-
include::snippets/technology-preview.adoc[]
12+
The local catalog and its contents are mirrored to your target mirror registry based on the filtering information in the image set configuration file.
13+
14+
[IMPORTANT]
15+
====
16+
When mirroring local OCI catalogs, any {product-title} releases or additional images that you want to mirror along with the local OCI-formatted catalog must be pulled from a registry.
17+
18+
You cannot mirror OCI catalogs along with an oc-mirror image set file on disk.
19+
====
20+
21+
One example use case for using the OCI feature is if you have a CI/CD system building an OCI catalog to a location on disk, and you want to mirror that OCI catalog along with an {product-title} release to your mirror registry.
22+
23+
[NOTE]
24+
====
25+
If you used the Technology Preview OCI local catalogs feature for the oc-mirror plugin for {product-title} 4.12, you can no longer use the OCI local catalogs feature of the oc-mirror plugin to copy a catalog locally and convert it to OCI format as a first step to mirroring to a fully disconnected cluster.
26+
====
1427

1528
.Prerequisites
1629

@@ -20,47 +33,57 @@ include::snippets/technology-preview.adoc[]
2033
2134
.Procedure
2235

23-
. Optional: Retrieve the catalogs and images that you require and save them to disk. If you already have the catalog image in OCI format on disk, you can skip this step.
24-
25-
.. Create the image set configuration file:
36+
. Create the image set configuration file and adjust the settings as necessary.
37+
+
38+
The following example image set configuration mirrors an OCI catalog on disk along with an {product-title} release and a UBI image from `registry.redhat.io`.
2639
+
27-
.Example image set configuration file for copying to disk
2840
[source,yaml]
2941
----
3042
kind: ImageSetConfiguration
3143
apiVersion: mirror.openshift.io/v1alpha2
44+
storageConfig:
45+
local:
46+
path: /home/user/metadata <1>
3247
mirror:
33-
operators:
34-
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.13
35-
packages:
36-
- name: aws-load-balancer-operator
48+
platform:
49+
channels:
50+
- name: stable-4.13 <2>
51+
type: ocp
52+
graph: false
53+
operators:
54+
- catalog: oci:///home/user/oc-mirror/my-oci-catalog <3>
55+
packages:
56+
- name: aws-load-balancer-operator
57+
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.13 <4>
58+
packages:
59+
- name: rhacs-operator
60+
additionalImages:
61+
- name: registry.redhat.io/ubi8/ubi:latest <5>
3762
----
38-
+
39-
[NOTE]
40-
====
41-
When using the OCI feature, only the `mirror.operators.catalog` setting is available for use.
42-
43-
The `storageConfig` setting is ignored in favor of the location passed in to the `oc mirror` command.
44-
====
63+
<1> Set 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.
64+
<2> Optionally, include an {product-title} release to mirror from `registry.redhat.io`.
65+
<3> Specify the absolute path to the location of the OCI catalog on disk. The path must start with `oci://` when using the OCI feature.
66+
<4> Optionally, specify additional Operator catalogs to pull from a registry.
67+
<5> Optionally, specify additional images to pull from a registry.
4568

46-
.. Run the `oc mirror` command to mirror the images from the specified image set configuration to disk:
69+
. Run the `oc mirror` command to mirror the OCI catalog to a target mirror registry:
4770
+
4871
[source,terminal]
4972
----
5073
$ oc mirror --config=./imageset-config.yaml \ <1>
51-
--use-oci-feature \ <2>
52-
--oci-feature-action=copy \ <3>
53-
oci://my-oci-catalog <4>
74+
--include-local-oci-catalogs <2>
75+
docker://registry.example:5000 <3>
5476
----
5577
<1> Pass in the image set configuration file. This procedure assumes that it is named `imageset-config.yaml`.
56-
<2> Use the `--use-oci-feature` flag to enable the OCI feature.
57-
<3> To copy the catalog to disk, set the `--oci-feature-action` flag to `copy`.
58-
<4> Specify a directory on disk where you want to output the catalog. This procedure assumes that it is named `my-oci-catalog`. The path must start with `oci://`. If the specified directory is not a full path, the directory is created in the current working directory where the `oc mirror` command is run.
78+
<2> Use the `--include-local-oci-catalogs` flag to enable mirroring local OCI catalogs along with other remote content.
79+
<3> Specify the registry to mirror the content to. The registry must start with `docker://`. If you specify a top-level namespace for the mirror registry, you must also use this same namespace on subsequent executions.
80+
+
81+
Optionally, you can specify other flags to adjust the behavior of the OCI feature:
82+
+
83+
`--oci-insecure-signature-policy`:: Do not push signatures to the target mirror registry.
84+
+
85+
`--oci-registries-config`:: Specify the path to a TOML-formatted `registries.conf` file. You can use this to mirror from a different registry, such as a pre-production location for testing, without having to change the image set configuration file. This flag only affects local OCI catalogs, not any other mirrored content.
5986
+
60-
[NOTE]
61-
====
62-
You can optionally use the `--oci-registries-config` flag to specify the path to a TOML-formatted `registries.conf` file. You can use this to mirror from a different registry, such as a pre-production location for testing, without having to change the image set configuration file.
63-
6487
.Example registries.conf file
6588
[source,toml]
6689
----
@@ -75,61 +98,6 @@ You can optionally use the `--oci-registries-config` flag to specify the path to
7598
insecure = false
7699
----
77100
78-
Set the `location` field in the `registry.mirror` section to an alternative registry location that you want to pull images from. The `location` field in the `registry` section must be the same registry location as the one you specify in the image set configuration file.
79-
====
80-
81-
.. List your directory contents and verify that the following directories were created:
82-
+
83-
[source,terminal]
84-
----
85-
$ ls -l
86-
----
87-
+
88-
.Example output
89-
[source,terminal]
90-
----
91-
my-oci-catalog <1>
92-
oc-mirror-workspace <2>
93-
olm_artifacts <3>
94-
----
95-
<1> Directory that contains the OCI catalog. This procedure assumes that it is named `my-oci-catalog`.
96-
<2> Directory that contains each image in the catalog in its original format.
97-
<3> Directory that contains the files that describe the Operator bundles that this catalog references.
98-
99-
. Update the image set configuration file to specify the location of the catalog on disk to mirror to the target mirror registry:
100-
+
101-
.Example image set configuration file for mirroring to mirror registry
102-
[source,yaml]
103-
----
104-
kind: ImageSetConfiguration
105-
apiVersion: mirror.openshift.io/v1alpha2
106-
mirror:
107-
operators:
108-
- catalog: oci:///home/user/oc-mirror/my-oci-catalog/redhat-operator-index <1>
109-
packages:
110-
- name: aws-load-balancer-operator
111-
----
112-
<1> Specify the absolute path to the location of the OCI catalog on disk. This procedure assumes that you used `my-oci-catalog` as the directory and mirrored the `redhat-operator-index` catalog. The path must start with `oci://`.
113-
114-
. Run the oc mirror command to process the image set file on disk and mirror the contents to a target mirror registry:
115-
+
116-
[source,terminal]
117-
----
118-
$ oc mirror --config=./imageset-config.yaml \ <1>
119-
--use-oci-feature \ <2>
120-
--oci-feature-action=mirror \ <3>
121-
docker://registry.example:5000 <4>
122-
----
123-
<1> Pass in the updated image set configuration file. This procedure assumes that it is named `imageset-config.yaml`.
124-
<2> Use the `--use-oci-feature` flag to enable the OCI feature.
125-
<3> To mirror the catalog to the target mirror registry, set the `--oci-feature-action` flag to `mirror`.
126-
<4> Specify the registry to mirror the image set file to. The registry must start with `docker://`. If you specify a top-level namespace for the mirror registry, you must also use this same namespace on subsequent executions.
127-
+
128-
[NOTE]
129-
====
130-
You can optionally use the `--oci-insecure-signature-policy` flag to not push signatures to the target mirror registry.
131-
====
132-
133101
.Next steps
134102
135103
* Configure your cluster to use the resources generated by oc-mirror.

modules/oc-mirror-support.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
[id="oc-mirror-support_{context}"]
88
= oc-mirror compatibility and support
99

10-
The oc-mirror plugin supports mirroring {product-title} payload images and Operator catalogs for {product-title} versions 4.9 and later.
10+
The oc-mirror plugin supports mirroring {product-title} payload images and Operator catalogs for {product-title} versions 4.10 and later.
1111

1212
Use the latest available version of the oc-mirror plugin regardless of which versions of {product-title} you need to mirror.
13+
14+
// TODO: Remove this in 4.14
15+
[IMPORTANT]
16+
====
17+
If you used the Technology Preview OCI local catalogs feature for the oc-mirror plugin for {product-title} 4.12, you can no longer use the OCI local catalogs feature of the oc-mirror plugin to copy a catalog locally and convert it to OCI format as a first step to mirroring to a fully disconnected cluster.
18+
====

modules/preparing-an-inital-cluster-deployment-for-mce-disconnected.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ To mirror your {product-title} image repository to your mirror registry, you can
4848
----
4949
+
5050
<1> Specify the maximum size, in GiB, of each file within the image set.
51-
<2> Set the back-end location to receive the image set metadata. This location can be a registry or local directory. You must specify `storageConfig` values unless you are using the Technology Preview OCI feature.
51+
<2> Set the back-end location to receive the image set metadata. This location can be a registry or local directory. It is required to specify `storageConfig` values.
5252
<3> Set the registry URL for the storage backend.
5353
<4> Set the channel that contains the {product-title} images for the version you are installing.
5454
<5> Set the Operator catalog that contains the {product-title} images that you are installing.

0 commit comments

Comments
 (0)