Skip to content

Commit 6dba828

Browse files
committed
Updated oc-mirror v2 docs
1 parent 05b1a79 commit 6dba828

10 files changed

+135
-44
lines changed

_topic_maps/_topic_map.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@ Topics:
124124
File: index
125125
- Name: Creating a mirror registry with mirror registry for Red Hat OpenShift
126126
File: installing-mirroring-creating-registry
127-
- Name: Mirroring images for a disconnected installation by using the oc adm command
128-
File: installing-mirroring-installation-images
129-
- Name: Mirroring images for a disconnected installation using the oc-mirror plugin v1
130-
File: installing-mirroring-disconnected
131127
- Name: Mirroring images for a disconnected installation using oc-mirror plugin v2
132128
File: about-installing-oc-mirror-v2
133129
- Name: Migrating from oc-mirror plugin v1 to v2
134130
File: oc-mirror-migration-v1-to-v2
131+
- Name: Mirroring images for a disconnected installation using the oc-mirror plugin v1
132+
File: installing-mirroring-disconnected
133+
- Name: Mirroring images for a disconnected installation by using the oc adm command
134+
File: installing-mirroring-installation-images
135135
- Name: Installing a cluster in a disconnected environment
136136
File: installing
137137
- Name: Using OLM in disconnected environments

disconnected/mirroring/about-installing-oc-mirror-v2.adoc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ toc::[]
88

99
You can run your cluster in a disconnected environment if you install the cluster from a mirrored set of {product-title} container images in a private registry. This registry must be running whenever your cluster is running.
1010

11-
Just as you can use the oc-mirror OpenShift CLI (`oc`) plugin, you can also use oc-mirror plugin v2 to mirror images to a mirror registry in your fully or partially disconnected environments. To download the required images from the official Red{nbsp}Hat registries, you must run oc-mirror plugin v2 from a system with internet connectivity.
12-
13-
:FeatureName: oc-mirror plugin v2
14-
include::snippets/technology-preview.adoc[]
11+
You can use oc-mirror plugin v2 to mirror images to a mirror registry in your fully or partially disconnected environments. To download the required images from the official Red{nbsp}Hat registries, you must run oc-mirror plugin v2 from a system with internet connectivity.
1512

1613
// About oc-mirror plugin v2
1714
include::modules/oc-mirror-v2-about.adoc[leveloffset=+1]
@@ -85,7 +82,7 @@ After your cluster is configured to use the resources generated by oc-mirror plu
8582

8683
* xref:../../extensions/catalogs/disconnected-catalogs.adoc#disconnected-catalogs[Disconnected environment support in {olmv1}]
8784

88-
//Delete Feature
85+
// Delete Feature
8986
// workflows of delete feature
9087
include::modules/oc-mirror-workflows-delete-v2.adoc[leveloffset=+1]
9188

@@ -107,7 +104,7 @@ include::modules/oc-mirror-dry-run-v2.adoc[leveloffset=+2]
107104
// Troubleshooting
108105
include::modules/oc-mirror-troubleshooting-v2.adoc[leveloffset=+1]
109106

110-
//oc-mirror-enclave-support-about
107+
// oc-mirror-enclave-support-about
111108
include::modules//oc-mirror-enclave-support-about.adoc[leveloffset=+1]
112109

113110
// How to mirror to an Enclave
@@ -121,14 +118,18 @@ include::modules/oc-mirror-proxy-support.adoc[leveloffset=+1]
121118
* xref:../../disconnected/updating/disconnected-update-osus.adoc#updating-disconnected-cluster-osus[Updating a cluster in a disconnected environment using the OpenShift Update Service]
122119
* xref:../../disconnected/mirroring/about-installing-oc-mirror-v2.adoc#oc-mirror-v2-procedure-garbage-collector_about-installing-oc-mirror-v2[Resolving storage cleanup issues in the distribution registry]
123120

124-
//operator catalog filtering
121+
// Operator catalog filtering
125122
include::modules/oc-mirror-operator-catalog-filtering.adoc[leveloffset=+1]
126123

127-
//Image set configuration parameters
124+
// Image set configuration parameters
128125
include::modules/oc-mirror-imageset-config-parameters-v2.adoc[leveloffset=+1]
129126

130127
// Command reference for oc-mirror v2
131128
include::modules/oc-mirror-command-reference-v2.adoc[leveloffset=+1]
129+
include::modules/oc-mirror-command-reference-v2-delete.adoc[leveloffset=+2]
130+
131+
[role="_additional-resources"]
132+
.Additional resources
132133
* xref:../../disconnected/mirroring/about-installing-oc-mirror-v2.adoc#oc-mirror-updating-cluster-manifests-v2_about-installing-oc-mirror-v2[Configuring your cluster to use the resources generated by oc-mirror]
133134

134135
[id="next-steps_{context}"]
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * installing/disconnected_install/installing-mirroring-disconnected-v2.adoc
4+
5+
6+
:_mod-docs-content-type: REFERENCE
7+
[id="oc-mirror-command-reference-delete-v2_{context}"]
8+
= Command reference for deleting images
9+
10+
The following tables describe the `oc mirror` subcommands and flags for deleting images:
11+
12+
.Subcommands and flags for the deleting images
13+
[cols="1,2",options="header"]
14+
|===
15+
|Subcommand
16+
|Description
17+
18+
|`--authfile <string>`
19+
|Path of the authentication file. The default value is `${XDG_RUNTIME_DIR}/containers/auth.json`.
20+
21+
|`--cache-dir <string>`
22+
|oc-mirror cache directory location. The default is `$HOME`.
23+
24+
|`-c <string>`, `--config <string>`
25+
|Path to the delete imageset configuration file.
26+
27+
|`--delete-id <string>`
28+
|Used to differentiate between versions for files created by the delete functionality.
29+
30+
|`--delete-v1-images`
31+
|Used during the migration, along with `--generate`, in order to target images previously mirrored with oc-mirror plugin v1.
32+
33+
|`--delete-yaml-file <string>`
34+
|If set, uses the generated or updated yaml file to delete contents.
35+
36+
|`--dest-tls-verify`
37+
|Require HTTPS and verify certificates when talking to the container registry or daemon. TThe default value is `true`.
38+
39+
|`--force-cache-delete`
40+
|Used to force delete the local cache manifests and blobs.
41+
42+
|`--generate`
43+
|Used to generate the delete yaml for the list of manifests and blobs, used when deleting from local cache and remote registry.
44+
45+
|`-h`, `--help`
46+
|Displays help.
47+
48+
|`--log-level <string>`
49+
|Log level one of `info`, `debug`, `trace`, and `error`. The default value is `info`.
50+
51+
|`--parallel-images <unit>`
52+
|Indicates the number of images deleted in parallel. The default value is `8`.
53+
54+
|`--parallel-layers <unit>`
55+
|Indicates the number of image layers mirrored in parallel. The default value is `10`.
56+
57+
|`-p <unit>`, `--port <unit>`
58+
|HTTP port used by oc-mirror's local storage instance. The default value is `55000`.
59+
60+
|`--retry-delay`
61+
|Duration delay between 2 retries. The default value is `1s`.
62+
63+
|`--retry-times <int>`
64+
|The number of times to retry. The default value is `2`.
65+
66+
|`--src-tls-verify`
67+
|Require HTTPS and verify certificates when talking to the container registry or daemon. The default value is `true`.
68+
69+
|`--workspace <string>`
70+
|oc-mirror workspace where resources and internal artifacts are generated.
71+
72+
|===

modules/oc-mirror-command-reference-v2.adoc

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,41 @@ The following tables describe the `oc mirror` subcommands and flags for oc-mirro
3838
|`-c`, `--config` `<string>`
3939
|Specifies the path to an image set configuration file.
4040

41+
|`--cache-dir <string>`
42+
|oc-mirror cache directory location. The default value is `$HOME`.
43+
4144
|`--dest-tls-verify`
42-
|Requires HTTPS and verifies certificates when accessing the container registry or daemon.
45+
|Requires HTTPS and verifies certificates when accessing the container registry or daemon. The default value is `true`.
4346

4447
|`--dry-run`
45-
|Prints actions without mirroring images
48+
|Prints actions without mirroring images.
4649

4750
|`--from <string>`
4851
|Specifies the path to an image set archive that was generated by executing oc-mirror plugin v2 to load a target registry.
4952

5053
|`-h`, `--help`
5154
|Displays help
5255

53-
|`--loglevel`
54-
|Displays string log levels. Supported values include info, debug, trace, error. The default is `info`.
56+
|`--image-timeout duration`
57+
|Timeout for mirroring an image. The default is 10m0s. Valid time units are `ns`, `us` or `µs`, `ms`, `s`, `m`, and `h`.
58+
59+
|`--log-level <string>`
60+
|Displays string log levels. Supported values include info, debug, trace, error. The default value is `info`.
5561

5662
|`-p`, `--port`
57-
|Determines the HTTP port used by oc-mirror plugin v2 local storage instance. The default is `55000`.
63+
|Determines the HTTP port used by oc-mirror plugin v2 local storage instance. The default value is `55000`.
64+
65+
|`--parallel-images <unit>`
66+
|Specifies the number of images mirrored in parallel. The default value is `8`.
67+
68+
|`--parallel-layers <unit>`
69+
|Specifies the number of image layers mirrored in parallel. The default value is `10`.
5870

5971
|`--max-nested-paths <int>`
60-
|Specifies the maximum number of nested paths for destination registries that limit nested paths. The default is `0`.
72+
|Specifies the maximum number of nested paths for destination registries that limit nested paths. The default value is `0`.
6173

6274
|`--secure-policy`
63-
|Default value is `false`. If you set a non-default value, the command enables signature verification, which is the secure policy for signature verification.
75+
|The default value is `false`. If you set a non-default value, the command enables signature verification, which is the secure policy for signature verification.
6476

6577
|`--since`
6678
|Includes all new content since a specified date (format: `yyyy-mm-dd`). When not provided, new content since previous mirroring is mirrored.
@@ -69,12 +81,21 @@ The following tables describe the `oc mirror` subcommands and flags for oc-mirro
6981
|Requires HTTPS and verifies certificates when accessing the container registry or daemon.
7082

7183
|`--strict-archive`
72-
|Default value is `false`. If you set a value, the command generates archives that are strictly less than the `archiveSize` that was set in the `imageSetConfig` custom resource (CR). Mirroring exist in error if a file being archived exceeds `archiveSize` (GB).
84+
|The default value is `false`. If you set a value, the command generates archives that are strictly less than the `archiveSize` that was set in the `imageSetConfig` custom resource (CR). Mirroring exist in error if a file being archived exceeds `archiveSize` (GB).
7385

7486
|`-v`, `--version`
7587
|Displays the version for oc-mirror plugin v2.
7688

7789
|`--workspace`
7890
|Determines string oc-mirror plugin v2 workspace where resources and internal artifacts are generated.
7991

92+
|`--retry-delay duration`
93+
|Delay between 2 retries. The default value is `1s`.
94+
95+
|`--retry-times <int>`
96+
|The number of times to retry. The default value is `2`.
97+
98+
|`--rootless-storage-path <string>`
99+
|Overrides the default container rootless storage path (usually in `etc/containers/storage.conf`).
100+
80101
|===

modules/oc-mirror-dry-run-v2.adoc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
:_mod-docs-content-type: PROCEDURE
77
[id="oc-mirror-dry-run-v2_{context}"]
8-
= Performing dry run for oc-mirror plugin v2
8+
= Performing a dry run for oc-mirror plugin v2
99

1010
Verify your image set configuration by performing a dry run without mirroring any images. This ensures your setup is correct and prevents unintended changes.
1111

@@ -15,19 +15,18 @@ Verify your image set configuration by performing a dry run without mirroring an
1515
+
1616
[source,terminal]
1717
----
18-
$ oc mirror -c <image_set_config_yaml> --from file://<oc_mirror_workspace_path> docker://<mirror_registry_url> --dry-run --v2
18+
$ oc mirror -c <image_set_config_yaml> file://<oc_mirror_workspace_path> --dry-run --v2
1919
----
20-
Where:
21-
- `<image_set_config_yaml>`: Use the image set configuration file that you just created.
22-
- `<oc_mirror_workspace_path>`: Insert the address of the workspace path.
23-
- `<mirror_registry_url>`: Insert the URL or address of the remote container registry from which images will be deleted.
20+
+
21+
where:
22+
23+
`<image_set_config_yaml>`:: Specifies the image set configuration file that you created.
24+
`<oc_mirror_workspace_path>`:: Insert the address of the workspace path.
25+
`<mirror_registry_url>`:: Insert the URL or address of the remote container registry from which images will be mirrored or deleted.
2426
+
2527
.Example output
2628
[source,terminal]
2729
----
28-
$ oc mirror --config /tmp/isc_dryrun.yaml file://<oc_mirror_workspace_path> --dry-run --v2
29-
30-
[INFO] : :warning: --v2 flag identified, flow redirected to the oc-mirror v2 version. This is Tech Preview, it is still under development and it is not production ready.
3130
[INFO] : :wave: Hello, welcome to oc-mirror
3231
[INFO] : :gear: setting up the environment for you...
3332
[INFO] : :twisted_rightwards_arrows: workflow mode: mirrorToDisk

modules/oc-mirror-enclave-support-about.adoc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88

99
Enclave support restricts internal access to a specific part of a network. Unlike a demilitarized zone (DMZ) network, which allows inbound and outbound traffic access through firewall boundaries, enclaves do not cross firewall boundaries.
1010

11-
:FeatureName: Enclave Support
12-
include::snippets/technology-preview.adoc[]
13-
1411
The new enclave support functionality is for scenarios where mirroring is needed for multiple enclaves that are secured behind at least one intermediate disconnected network.
1512

1613
Enclave support has the following benefits:

modules/oc-mirror-procedure-delete-v2.adoc

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,15 @@ delete:
3838
minVersion: <operator_max_version> <5>
3939
maxVersion: <operator_min_version> <5>
4040
additionalImages:
41-
- name: <additional_images> <6>
41+
- name: <additional_images>
4242
----
4343
<1> Specify the name of the {product-title} channel to delete, for example `stable-4.15`.
4444
<2> Specify a version range of the images to delete within the channel, for example `4.15.0` for the minimum version and `4.15.1` for the maximum version.
4545
To delete only one version's images, use that version number for both the `minVersion` and `maxVersion` fields.
46-
<3> Specify an Operator catalog image to delete, for example `registry.redhat.io/redhat/redhat-operator-index:v4.14`.
47-
To delete the catalog image, you must not specify individual Operators using the `delete.operators.packages` parameter.
48-
<4> Specify a specific Operator bundle to delete, for example `aws-load-balancer-operator`.
49-
If you specify individual Operators, the Operator catalog image does not get deleted.
46+
<3> Specify an Operator catalog image containing the Operators to delete, for example `registry.redhat.io/redhat/redhat-operator-index:v4.14`.
47+
The Operator catalog image will not get deleted. Its presence in the registry might be necessary for other Operators still remaining on the cluster.
48+
<4> Specify a specific Operator to delete, for example `aws-load-balancer-operator`.
5049
<5> Specify a version range of the images to delete for the Operator, for example `0.0.1` for the minimum version and `0.0.2` for the maximum version.
51-
To delete only one version's images, use that version number for both the `minVersion` and `maxVersion` fields.
52-
<6> Specify additional images to delete, for example `registry.redhat.io/ubi9/ubi-init:latest`.
5350

5451
. Create a `delete-images.yaml` file by running the following command:
5552
+
@@ -62,6 +59,11 @@ where:
6259

6360
<previously_mirrored_work_folder>:: Specifies the directory where images were previously mirrored to or stored during the mirroring process.
6461
<remote_registry>:: Specifies the URL or address of the remote container registry from which images will be deleted.
62+
+
63+
[IMPORTANT]
64+
====
65+
When deleting images, specify the correct workspace directory. Modify or delete the cache directory only when starting mirroring from scratch, such as setting up a new cluster. Incorrect changes to the cache directory might disrupt further mirroring operations.
66+
====
6567

6668
. Go to the `<previously_mirrored_work_folder>/delete` directory that was created.
6769

modules/oc-mirror-troubleshooting-v2.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ oc-mirror plugin v2 now logs all image mirroring errors in a separate file, maki
1212
====
1313
When errors occur while mirroring release or release component images, they are critical. This stops the mirroring process immediately.
1414
15-
Errors with mirroring Operators, Operator-related images, or additional images do not stop the mirroring process. Mirroring continues, and oc-mirror plugin v2 logs updates every 8 images.
15+
Errors with mirroring Operators, Operator-related images, or additional images do not stop the mirroring process. Mirroring continues, and oc-mirror plugin v2 saves a file under the `working-dir/logs` directory describing which Operator failed to mirror.
1616
====
1717

1818
When an image fails to mirror, and that image is mirrored as part of one or more Operator bundles, oc-mirror plugin v2 notifies the user which Operators are incomplete, providing clarity on the Operator bundles affected by the error.

modules/oc-mirror-v2-about.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
The oc-mirror OpenShift CLI (`oc`) plugin is a single tool that mirrors all required {product-title} content and other images to your mirror registry.
1111

12-
To use the new Technology Preview version of oc-mirror, add the `--v2` flag to the oc-mirror plugin v2 command line.
12+
To use the new version of oc-mirror, add the `--v2` flag to the oc-mirror plugin v2 command line.
1313

1414
oc-mirror plugin v2 has the following features:
1515

modules/oc-mirror-workflows-delete-v2.adoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ You must create a `DeleteImageSetConfiguration` file to specify which images to
1717
In the following example, the `DeleteImageSetConfiguration` file removes the following images:
1818

1919
* All release images for {product-title} 4.13.3.
20-
* The `redhat-operator-index` `v4.12` catalog image.
2120
* The `aws-load-balancer-operator` v0.0.1 bundle and all its related images.
2221
* The additional images for `ubi` and `ubi-minimal`, referenced by their corresponding digests.
2322
@@ -47,7 +46,7 @@ delete:
4746

4847
[IMPORTANT]
4948
====
50-
Consider using the mirror-to-disk and disk-to-mirror workflows to reduce mirroring issues.
49+
Consider using the mirror-to-disk and disk-to-mirror workflows to reduce deletion issues.
5150
====
5251

5352
oc-mirror plugin v2 deletes only the manifests of the images, which does not reduce the storage occupied in the registry.
@@ -68,4 +67,4 @@ If only the Operator catalog image is specified, all Operators within that catal
6867
If you are certain that no Operators from a catalog remain in the registry or cluster, you can explicitly add the catalog image to `additionalImages` in `DeleteImageSetConfiguration` to remove it.
6968
7069
* Garbage collection behavior depends on the registry. Some registries do not automatically remove deleted images, requiring a system administrator to manually trigger garbage collection to free up space.
71-
====
70+
====

0 commit comments

Comments
 (0)