Skip to content

Commit 690b892

Browse files
authored
Merge pull request #76555 from subhtk/ocm-v1
OSDOCS#8312: oc-mirror content improvement - Part 2
2 parents c136038 + 834f702 commit 690b892

20 files changed

+444
-270
lines changed
Lines changed: 48 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,81 @@
11
:_mod-docs-content-type: ASSEMBLY
2-
[id="installing-mirroring-disconnected"]
3-
= Mirroring images for a disconnected installation using the oc-mirror plugin
2+
[id="installing-mirroring-disconnected_{context}"]
3+
= Mirroring images for a disconnected installation using the oc-mirror plugin v1
44
include::_attributes/common-attributes.adoc[]
55
:context: installing-mirroring-disconnected
66

77
toc::[]
88

9-
Running your cluster in a restricted network without direct internet connectivity is possible by installing the cluster from a mirrored set of {product-title} container images in a private registry. This registry must be running at all times as long as the cluster is running. See the xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#prerequisites_installing-mirroring-disconnected[Prerequisites] section for more information.
10-
11-
You can use the oc-mirror OpenShift CLI (`oc`) plugin to mirror images to a mirror registry in your fully or partially disconnected environments. You must run oc-mirror from a system with internet connectivity in order to download the required images from the official Red Hat registries.
9+
Running your cluster in a restricted network without direct internet connectivity is possible by installing the cluster from a mirrored set of {product-title} container images in a private registry. This registry must be running at all times as long as the cluster is running. See "Prerequisites" section for more information.
1210

1311
// About the oc-mirror plugin
1412
include::modules/oc-mirror-about.adoc[leveloffset=+1]
1513

1614
// oc-mirror compatibility and support
1715
include::modules/oc-mirror-support.adoc[leveloffset=+1]
1816

19-
[role="_additional-resources"]
20-
.Additional resources
21-
22-
* For information on updating oc-mirror, see xref:../../installing/validating-an-installation.adoc#viewing-the-image-pull-source_validating-an-installation[Viewing the image pull source].
23-
24-
// About the mirror registry
25-
include::modules/installation-about-mirror-registry.adoc[leveloffset=+1]
26-
27-
[role="_additional-resources"]
28-
.Additional resources
29-
30-
* For information about viewing the CRI-O logs to view the image source, see xref:../../installing/validating-an-installation.adoc#viewing-the-image-pull-source_validating-an-installation[Viewing the image pull source].
31-
32-
[id="prerequisites_installing-mirroring-disconnected"]
17+
[id="prerequisites_installing-mirroring-disconnected_{context}"]
3318
== Prerequisites
3419

35-
* You must have a container image registry that supports link:https://docs.docker.com/registry/spec/manifest-v2-2[Docker v2-2] in the location that will host the {product-title} cluster, such as Red Hat Quay.
20+
* You must have a container image registry, which is referred as the mirror registry, that supports link:https://docs.docker.com/registry/spec/manifest-v2-2[Docker v2-2] in the location that hosts the {product-title} cluster, such as {quay}.
3621
+
3722
[NOTE]
3823
====
39-
If you use Red Hat Quay, you must use version 3.6 or later with the oc-mirror plugin. If you have an entitlement to Red Hat Quay, see the documentation on deploying Red Hat Quay link:https://access.redhat.com/documentation/en-us/red_hat_quay/3/html/deploy_red_hat_quay_for_proof-of-concept_non-production_purposes/[for proof-of-concept purposes] or link:https://access.redhat.com/documentation/en-us/red_hat_quay/3/html/deploying_the_red_hat_quay_operator_on_openshift_container_platform/index[by using the Red Hat Quay Operator]. If you need additional assistance selecting and installing a registry, contact your sales representative or Red Hat Support.
24+
If you use {quay}, you must use version 3.6 or later with the oc-mirror plugin. If you have an entitlement to {quay}, see the documentation on deploying {quay} link:https://access.redhat.com/documentation/en-us/red_hat_quay/3/html/deploy_red_hat_quay_for_proof-of-concept_non-production_purposes/[for proof-of-concept purposes] or link:https://access.redhat.com/documentation/en-us/red_hat_quay/3/html/deploying_the_red_hat_quay_operator_on_openshift_container_platform/index[by using the Red Hat Quay Operator]. If you need additional assistance selecting and installing a registry, contact your sales representative or Red Hat Support.
4025
====
4126
+
42-
If you do not already have an existing solution for a container image registry, subscribers of {product-title} are provided a xref:../../installing/disconnected_install/installing-mirroring-creating-registry.adoc#installing-mirroring-creating-registry[mirror registry for Red Hat OpenShift]. The _mirror registry for Red Hat OpenShift_ is included with your subscription and is a small-scale container registry that can be used to mirror the required container images of {product-title} in disconnected installations.
27+
If you do not already have an existing solution for a mirror registry, the subscribers of {product-title} are provided in "Creating a mirror registry with mirror registry for Red Hat OpenShift".
4328

44-
[id="mirroring-preparing-your-hosts"]
45-
== Preparing your mirror hosts
29+
* The mirror registry must be reachable by every machine in the clusters that you provision. If the registry is unreachable, installation, updating, or normal operations such as workload relocation might fail. For this reason, you must run mirror registries ensuring highly availability. The mirror registries must meet or exceed the production availability of your {product-title} clusters.
4630

47-
Before you can use the oc-mirror plugin to mirror images, you must install the plugin and create a container image registry credentials file to allow the mirroring from Red Hat to your mirror.
48-
49-
// Installing the oc-mirror OpenShift CLI plugin
50-
include::modules/oc-mirror-installing-plugin.adoc[leveloffset=+2]
31+
* You have set the umask parameter to `0022` on the operating system that uses oc-mirror plugin v1.
5132

5233
[role="_additional-resources"]
5334
.Additional resources
5435

55-
* xref:../../cli_reference/openshift_cli/extending-cli-plugins.adoc#cli-installing-plugins_cli-extend-plugins[Installing and using CLI plugins]
36+
* xref:../../installing/disconnected_install/installing-mirroring-creating-registry.adoc#installing-mirroring-creating-registry[Creating a mirror registry with mirror registry for Red Hat OpenShift]
37+
38+
[id="mirroring-preparing-your-hosts_{context}"]
39+
== Preparing your mirror hosts
40+
41+
To use the oc-mirror plugin v1 to mirror images, you need to install the plugin and create a container image registry credentials file to enable mirroring from Red Hat to your mirror.
42+
43+
// Installing the oc-mirror OpenShift CLI plugin v1
44+
include::modules/oc-mirror-installing-plugin.adoc[leveloffset=+2]
5645

5746
// Configuring credentials that allow images to be mirrored
5847
include::modules/installation-adding-registry-pull-secret.adoc[leveloffset=+2]
5948

60-
// Creating the image set configuration
61-
include::modules/oc-mirror-creating-image-set-config.adoc[leveloffset=+1]
49+
// About Image set configuration
50+
include::modules/oc-mirror-about-image-set-config.adoc[leveloffset=+1]
6251

63-
[role="_additional-resources"]
64-
.Additional resources
52+
// Creating the image set configuration
53+
include::modules/oc-mirror-creating-image-set-config.adoc[leveloffset=+2]
6554

66-
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#oc-mirror-imageset-config-params_installing-mirroring-disconnected[Image set configuration parameters]
67-
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#oc-mirror-image-set-examples_installing-mirroring-disconnected[Image set configuration examples]
68-
* xref:../../updating/updating_a_cluster/updating_disconnected_cluster/disconnected-update-osus.adoc#update-service-overview_updating-restricted-network-cluster-osus[Using the OpenShift Update Service in a disconnected environment]
55+
// Image set configuration parameters
56+
include::modules/oc-mirror-imageset-config-params.adoc[leveloffset=+2]
6957

70-
[id="mirroring-image-set"]
71-
== Mirroring an image set to a mirror registry
58+
// Image set configuration examples
59+
include::modules/oc-mirror-image-set-config-examples.adoc[leveloffset=+2]
7260

73-
You can use the oc-mirror CLI plugin to mirror images to a mirror registry in a xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#mirroring-image-set-partial[partially disconnected environment] or in a xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#mirroring-image-set-full[fully disconnected environment].
61+
// Setting up for incremental mirroring
62+
include::modules/oc-mirror-setting-incremental-mirroring.adoc[leveloffset=+1]
7463

75-
These procedures assume that you already have your mirror registry set up.
64+
[role="_additional-resources"]
65+
.Additional resources
7666

77-
[id="mirroring-image-set-partial"]
78-
=== Mirroring an image set in a partially disconnected environment
67+
* xref:../../updating/updating_a_cluster/updating_disconnected_cluster/disconnected-update-osus.adoc#update-service-overview_updating-restricted-network-cluster-osus[Updating a cluster in a disconnected environment using the OpenShift Update Service]
7968

80-
In a partially disconnected environment, you can mirror an image set directly to the target mirror registry.
69+
* xref:../../cli_reference/openshift_cli/extending-cli-plugins.adoc#cli-installing-plugins_cli-extend-plugins[Extending the OpenShift CLI with plugins]
8170

82-
// Mirroring from mirror to mirror
83-
include::modules/oc-mirror-mirror-to-mirror.adoc[leveloffset=+3]
71+
// Mirroring an image set to a mirror registry
72+
include::modules/oc-mirror-mirroring-image-set.adoc[leveloffset=+1]
8473

85-
[id="mirroring-image-set-full"]
86-
=== Mirroring an image set in a fully disconnected environment
74+
// Mirroring from partially disconnected environment:mirror to mirror
75+
include::modules/oc-mirror-mirror-to-mirror.adoc[leveloffset=+2]
8776

88-
To mirror an image set in a fully disconnected environment, you must first xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#oc-mirror-mirror-to-disk_installing-mirroring-disconnected[mirror the image set to disk], then xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#oc-mirror-disk-to-mirror_installing-mirroring-disconnected[mirror the image set file on disk to a mirror].
77+
// Mirroring from fully disconnected environment
78+
include::modules/oc-mirror-fully-disconnected.adoc[leveloffset=+2]
8979

9080
// Mirroring from mirror to disk
9181
include::modules/oc-mirror-mirror-to-disk.adoc[leveloffset=+3]
@@ -96,42 +86,34 @@ include::modules/oc-mirror-disk-to-mirror.adoc[leveloffset=+3]
9686
// Configuring your cluster to use the resources generated by oc-mirror
9787
include::modules/oc-mirror-updating-cluster-manifests.adoc[leveloffset=+1]
9888

89+
[role="_additional-resources"]
90+
.Additional resources
91+
92+
* xref:../../updating/understanding_updates/intro-to-updates.adoc#update-service-about_understanding-openshift-updates[About the OpenShift Update Service]
93+
9994
// About updating your mirror registry content
10095
include::modules/oc-mirror-updating-registry-about.adoc[leveloffset=+1]
10196

97+
// Use-cases
10298
include::modules/oc-mirror-updating-use-cases.adoc[leveloffset=+2]
10399

104-
[role="_additional-resources"]
105-
.Additional resources
106-
107-
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#oc-mirror-image-set-examples_installing-mirroring-disconnected[Image set configuration examples]
108-
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#mirroring-image-set-partial[Mirroring an image set in a partially disconnected environment]
109-
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#mirroring-image-set-full[Mirroring an image set in a fully disconnected environment]
110-
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#oc-mirror-updating-cluster-manifests_installing-mirroring-disconnected[Configuring your cluster to use the resources generated by oc-mirror]
111-
112100
// Performing a dry run
113101
include::modules/oc-mirror-dry-run.adoc[leveloffset=+1]
114102

115103
// Including local OCI Operator catalogs
116104
include::modules/oc-mirror-oci-format.adoc[leveloffset=+1]
117105

118-
[role="_additional-resources"]
119-
.Additional resources
106+
// Additional resources
120107

121108
// TODO: This title might need to update per sebastian's PR
122-
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#oc-mirror-updating-cluster-manifests_installing-mirroring-disconnected[Configuring your cluster to use the resources generated by oc-mirror]
123-
124-
// Image set configuration parameters
125-
include::modules/oc-mirror-imageset-config-params.adoc[leveloffset=+1]
126-
127-
// Image set configuration examples
128-
include::modules/oc-mirror-image-set-config-examples.adoc[leveloffset=+1]
109+
// Configuring your cluster to use the resources generated by oc-mirror
129110

130111
// Command reference for oc-mirror
131112
include::modules/oc-mirror-command-reference.adoc[leveloffset=+1]
132113

133114
[role="_additional-resources"]
134-
[id="additional-resources_installing-mirroring-disconnected"]
135115
== Additional resources
136116

137117
* xref:../../updating/updating_a_cluster/updating_disconnected_cluster/index.adoc#about-restricted-network-updates[About cluster updates in a disconnected environment]
118+
119+
* xref:../../installing/validating-an-installation.adoc#viewing-the-image-pull-source_validating-an-installation[Viewing the image pull source]

modules/installation-adding-registry-pull-secret.adoc

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,18 @@ endif::[]
2222

2323
:_mod-docs-content-type: PROCEDURE
2424
[id="installation-adding-registry-pull-secret_{context}"]
25-
= Configuring credentials that allow images to be mirrored
25+
= Configuring credentials to enable mirroring images
2626

27-
Create a container image registry credentials file that allows mirroring
28-
images from Red Hat to your mirror.
27+
Follow the procedure to create a container image registry credentials file for mirroring images from Red Hat to your mirror registry.
2928

3029
ifdef::restricted[]
3130
[WARNING]
3231
====
33-
Do not use this image registry credentials file as the pull secret when you install a cluster. If you provide this file when you install cluster, all of the machines in the cluster will have write access to your mirror registry.
32+
Do not use this image registry credentials file as the pull secret when installing a cluster. Using this file will grant write access to your mirror registry for all machines in the cluster.
3433
====
3534
endif::restricted[]
3635

3736
ifdef::restricted[]
38-
[WARNING]
39-
====
40-
This process requires that you have write access to a container image registry on the mirror registry and adds the credentials to a registry pull secret.
41-
====
4237

4338
endif::restricted[]
4439

@@ -52,6 +47,8 @@ endif::openshift-rosa,openshift-dedicated[]
5247
ifdef::restricted[]
5348
* You identified an image repository location on your mirror registry to mirror images into.
5449
* You provisioned a mirror registry account that allows images to be uploaded to that image repository.
50+
* You have write access to the mirror registry.
51+
* You included the credentials in the registry pull secret.
5552
endif::restricted[]
5653

5754
.Procedure
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * installing/disconnected_install/installing-mirroring-disconnected.adoc
4+
// * updating/updating_a_cluster/updating_disconnected_cluster/mirroring-image-repository.adoc
5+
6+
:_mod-docs-content-type: CONCEPT
7+
[id="oc-mirror-about-image-set-config_{context}"]
8+
= About the Image Set Configuration
9+
10+
An `ImageSetConfiguration` (ISC) file is a collection of container images for mirroring. The ISC specifies the images, their versions, and any additional configuration needed for mirroring. ISCs provide a structured way to manage image mirroring tasks, allowing users to easily define, organize, and execute mirroring operations within their {product-title} environment.
11+
12+
[id="oc-mirror-possibile-deployment-scenarios_{context}"]
13+
== Possible deployment scenarios
14+
15+
[id="oc-mirror-getting-image-set-config-specific-release_{context}"]
16+
=== Scenario 1: Obtaining the `ImageSetConfiguration` file for a specific release
17+
18+
To obtain the `ImageSetConfiguration` file for a specific release, follow one of these methods:
19+
20+
* Set `minVersion` at the channel level to your target deployment version.
21+
* Alternatively, set `minVersion` to the latest version in the default channel and keep it unchanged.
22+
* Set the `maxVersion` to limit versions being mirrored.
23+
* Use the same version for both `minVersion` and `maxVersion` to mirror only one version.
24+
25+
When you run the `oc-mirror` plugin v1 with the `ImageSetConfiguration` file, it evaluates the latest release of the `stable-<latest-_version>` channel.
26+
27+
[id="oc-mirror-image-set-config-local-storage-shortest-path_{context}"]
28+
=== Scenario 2: Using local storage and including all {product-title} versions with the shortest update path
29+
30+
When using local storage and including all {product-title} versions with the shortest update path, consider the following options:
31+
32+
* Set `maxVersion` to a valid version that exists in the channel you are setting it on, or include a different channel that has this version.
33+
* If `minVersion` and `maxVersion` are not the same, the default behavior is to mirror the shortest valid upgrade path between them.

0 commit comments

Comments
 (0)