Skip to content

Commit 0e91ef6

Browse files
authored
Merge pull request #40474 from bergerhoffer/OSDOCS-2891
OSDOCS-2891: Adding docs for using the oc-mirror plug-in to mirror im…
2 parents 50117ff + 142f4a3 commit 0e91ef6

File tree

52 files changed

+961
-110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+961
-110
lines changed

_topic_maps/_topic_map.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,18 @@ Topics:
105105
- Name: Selecting an installation method and preparing a cluster
106106
File: installing-preparing
107107
Distros: openshift-origin,openshift-enterprise
108-
- Name: Mirroring images for a disconnected installation
109-
File: installing-mirroring-installation-images
108+
- Name: Disconnected installation mirroring
109+
Dir: disconnected_install
110110
Distros: openshift-origin,openshift-enterprise
111+
Topics:
112+
- Name: About disconnected installation mirroring
113+
File: index
114+
- Name: Creating a mirror registry
115+
File: installing-mirroring-creating-registry
116+
- Name: Mirroring images for a disconnected installation
117+
File: installing-mirroring-installation-images
118+
- Name: Mirroring images for a disconnected installation using the oc-mirror plug-in
119+
File: installing-mirroring-disconnected
111120
- Name: Installing on AWS
112121
Dir: installing_aws
113122
Distros: openshift-origin,openshift-enterprise

cicd/pipelines/creating-applications-with-cicd-pipelines.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ include::modules/op-mirroring-images-to-run-pipelines-in-restricted-environment.
4646

4747
* xref:../../openshift_images/configuring-samples-operator.adoc#samples-operator-restricted-network-install[Configuring Samples Operator for a restricted cluster]
4848

49-
* xref:../../installing/installing-mirroring-installation-images.adoc#installation-about-mirror-registry_installing-mirroring-installation-images[Creating a cluster with a mirrored registry]
49+
* xref:../../installing/disconnected_install/installing-mirroring-installation-images.adoc#installation-about-mirror-registry_installing-mirroring-installation-images[Creating a cluster with a mirrored registry]
5050

5151
* xref:../../cli_reference/developer_cli_odo/using_odo_in_a_restricted_environment/creating-and-deploying-a-component-to-the-disconnected-cluster.adoc#mirroring-a-supported-builder-image_creating-and-deploying-a-component-to-the-disconnected-cluster[Mirroring a supported builder image]
5252

cicd/pipelines/installing-pipelines.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ include::modules/op-pipelines-operator-in-restricted-environment.adoc[leveloffse
4848

4949
** xref:../../openshift_images/configuring-samples-operator.adoc#samples-operator-restricted-network-install[Configuring Samples Operator for a restricted cluster]
5050

51-
** xref:../../installing/installing-mirroring-installation-images.adoc#installation-about-mirror-registry_installing-mirroring-installation-images[Creating a cluster with a mirrored registry]
51+
** xref:../../installing/disconnected_install/installing-mirroring-installation-images.adoc#installation-about-mirror-registry_installing-mirroring-installation-images[Creating a cluster with a mirrored registry]
5252

5353
** xref:../../cli_reference/developer_cli_odo/using_odo_in_a_restricted_environment/creating-and-deploying-a-component-to-the-disconnected-cluster.adoc#mirroring-a-supported-builder-image_creating-and-deploying-a-component-to-the-disconnected-cluster[Mirroring a supported builder image]

cli_reference/developer_cli_odo/using_odo_in_a_restricted_environment/about-odo-in-a-restricted-environment.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ After you push the `odo` init image, you must xref:../../../cli_reference/develo
1818
[role="_additional-resources"]
1919
.Additional resources
2020
ifdef::openshift-enterprise,openshift-webscale[]
21-
* xref:../../../installing/installing-mirroring-installation-images.adoc#installation-about-mirror-registry_installing-mirroring-installation-images[Mirroring images for a disconnected installation]
21+
* xref:../../../installing/disconnected_install/installing-mirroring-installation-images.adoc#installation-about-mirror-registry_installing-mirroring-installation-images[Mirroring images for a disconnected installation]
2222
endif::[]
2323
* xref:../../../registry/accessing-the-registry.adoc#registry-accessing-directly_accessing-the-registry[Accessing the registry]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../images
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
:_content-type: ASSEMBLY
2+
[id="installing-mirroring-disconnected-about"]
3+
= About disconnected installation mirroring
4+
include::_attributes/common-attributes.adoc[]
5+
:context: installing-mirroring-disconnected-about
6+
7+
toc::[]
8+
9+
You can use a mirror registry to ensure that your clusters only use container images that satisfy your organizational controls on external content. Before you install a cluster on infrastructure that you provision in a restricted network, you must mirror the required container images into that environment. To mirror container images, you must have a registry for mirroring.
10+
11+
[id="creating-mirror-registry"]
12+
== Creating a mirror registry
13+
14+
If you already have a container image registry, such as Red Hat Quay, you can use it as your mirror registry. If you do not already have a registry, you can xref:../../installing/disconnected_install/installing-mirroring-creating-registry.adoc#installing-mirroring-creating-registry[create a mirror registry using the _mirror registry for Red Hat OpenShift_].
15+
16+
[id="mirroring-images-disconnected-install"]
17+
== Mirroring images for a disconnected installation
18+
19+
You can use one of the following procedures to mirror your {product-title} image repository to your mirror registry:
20+
21+
* xref:../../installing/disconnected_install/installing-mirroring-installation-images.adoc#installing-mirroring-installation-images[Mirroring images for a disconnected installation]
22+
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#installing-mirroring-disconnected[Mirroring images for a disconnected installation using the oc-mirror plug-in] (Technology Preview)
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
:_content-type: ASSEMBLY
2+
[id="installing-mirroring-creating-registry"]
3+
= Creating a mirror registry
4+
include::_attributes/common-attributes.adoc[]
5+
:context: installing-mirroring-creating-registry
6+
7+
toc::[]
8+
9+
The _mirror registry for Red Hat OpenShift_ is a small and streamlined container registry that you can use as a target for mirroring the required container images of {product-title} for disconnected installations.
10+
11+
If you already have a container image registry, such as Red Hat Quay, you can skip this section and go straight to xref:../../installing/disconnected_install/installing-mirroring-installation-images.adoc#installation-mirror-repository_installing-mirroring-installation-images[Mirroring the OpenShift Container Platform image repository].
12+
13+
[id="prerequisites_installing-mirroring-creating-registry"]
14+
== Prerequisites
15+
16+
* An {product-title} subscription.
17+
* {op-system-base-full} 8 with Podman 3.3 installed.
18+
* Fully qualified domain name for the Red Hat Quay service, which must resolve through a DNS server.
19+
* Passwordless `sudo` access on the target host.
20+
* Key-based SSH connectivity on the target host. SSH keys are automatically generated for local installs. For remote hosts, you must generate your own SSH keys.
21+
* 2 or more vCPUs.
22+
* 8 GB of RAM.
23+
* About 12 GB for {product-title} {product-version} release images, or about 358 GB for {product-title} {product-version} release images and {product-title} {product-version} Red Hat Operator images. Up to 1 TB per stream or more is suggested.
24+
+
25+
[IMPORTANT]
26+
====
27+
These requirements are based on local testing results with only release images and Operator images. Storage requirements can vary based on your organization's needs. You might require more space, for example, when you mirror multiple z-streams. You can use standard Red Hat Quay functionality to remove unnecessary images and free up space.
28+
====
29+
30+
include::modules/mirror-registry-introduction.adoc[leveloffset=+1]
31+
include::modules/mirror-registry-localhost.adoc[leveloffset=+1]
32+
include::modules/mirror-registry-remote.adoc[leveloffset=+1]
33+
include::modules/mirror-registry-uninstall.adoc[leveloffset=+1]
34+
include::modules/mirror-registry-flags.adoc[leveloffset=+1]
35+
36+
[role="_additional-resources"]
37+
.Additional resources
38+
39+
* link:https://access.redhat.com/documentation/en-us/red_hat_quay/3/html/manage_red_hat_quay/using-ssl-to-protect-quay[Using SSL to protect connections to Red Hat Quay]
40+
41+
* link:https://access.redhat.com/documentation/en-us/red_hat_quay/3/html/manage_red_hat_quay/using-ssl-to-protect-quay#configuring_the_system_to_trust_the_certificate_authority[Configuring the system to trust the certificate authority]
42+
43+
* xref:../../installing/disconnected_install/installing-mirroring-installation-images.adoc#installation-mirror-repository_installing-mirroring-installation-images[Mirroring the OpenShift Container Platform image repository]
44+
45+
* xref:../../installing/disconnected_install/installing-mirroring-installation-images.adoc#olm-mirror-catalog_installing-mirroring-installation-images[Mirroring Operator catalogs for use with disconnected clusters]
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
:_content-type: ASSEMBLY
2+
[id="installing-mirroring-disconnected"]
3+
= Mirroring images for a disconnected installation using the oc-mirror plug-in
4+
include::_attributes/common-attributes.adoc[]
5+
:context: installing-mirroring-disconnected
6+
7+
toc::[]
8+
9+
////
10+
General to do list:
11+
* Confirm that no new content was added since I did the reorg of the disconnected install assemblies (up to date as of 2/13)
12+
* Add info about mirroring to a namespace
13+
* Test and get some actual example output
14+
* Use cases for changing image set config between runs
15+
////
16+
17+
You can ensure your clusters only use container images that satisfy your organizational controls on external content. Before you install a cluster on infrastructure that you provision in a restricted network, you must mirror the required container images into that environment. To mirror container images, you must have a registry for mirroring.
18+
19+
You can use the oc-mirror OpenShift CLI (`oc`) plug-in to mirror images to a mirror registry in your fully or partially disconnected environments.
20+
21+
:FeatureName: Mirroring images for disconnected environments using the oc-mirror plug-in
22+
include::snippets/technology-preview.adoc[leveloffset=+1]
23+
24+
The following steps outline the high-level workflow on how to use the oc-mirror plug-in to mirror images to a mirror registry:
25+
26+
. Create an image set configuration file.
27+
. Mirror the image set to the mirror registry.
28+
. Install the `ImageContentSourcePolicy` and `CatalogSource` resources that were generated by oc-mirror into the cluster.
29+
. Repeat these steps to update your mirror registry as necessary.
30+
31+
// About the oc-mirror plug-in
32+
include::modules/oc-mirror-about.adoc[leveloffset=+1]
33+
34+
// TODO: Check the content of this module to make sure it's accurate for oc-mirror
35+
include::modules/installation-about-mirror-registry.adoc[leveloffset=+1]
36+
37+
[role="_additional-resources"]
38+
.Additional resources
39+
40+
* 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].
41+
42+
// TODO: Copied this prereq section + about mirror registry from the orig section. Review/update as necessary
43+
[id="prerequisites_installing-mirroring-disconnected"]
44+
== Prerequisites
45+
46+
* 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.
47+
+
48+
[NOTE]
49+
====
50+
If you use Red Hat Quay, you must use version 3.6 or later with the oc-mirror plug-in. 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.6/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.6/html/deploy_red_hat_quay_on_openshift_with_the_quay_operator/[by using the Quay Operator]. If you need additional assistance selecting and installing a registry, contact your sales representative or Red Hat Support.
51+
====
52+
+
53+
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.
54+
55+
[id="mirroring-preparing-your-hosts"]
56+
== Preparing your mirror hosts
57+
58+
Before you can use the oc-mirror plug-in to mirror images, you must install the plug-in and create a container image registry credentials file to allow the mirroring from Red Hat to your mirror.
59+
60+
// Installing the oc-mirror OpenShift CLI plug-in
61+
include::modules/oc-mirror-installing-plugin.adoc[leveloffset=+2]
62+
63+
[role="_additional-resources"]
64+
.Additional resources
65+
66+
* xref:../../cli_reference/openshift_cli/extending-cli-plugins.adoc#cli-installing-plugins_cli-extend-plugins[Installing and using CLI plug-ins]
67+
68+
// Configuring credentials that allow images to be mirrored
69+
include::modules/installation-adding-registry-pull-secret.adoc[leveloffset=+2]
70+
71+
// Creating the image set configuration
72+
include::modules/oc-mirror-creating-image-set-config.adoc[leveloffset=+1]
73+
74+
[role="_additional-resources"]
75+
.Additional resources
76+
77+
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#oc-mirror-imageset-config-params_installing-mirroring-disconnected[Image set configuration parameters]
78+
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#oc-mirror-image-set-examples_installing-mirroring-disconnected[Image set configuration examples]
79+
80+
[id="mirroring-image-set"]
81+
== Mirroring an image set to a mirror registry
82+
83+
You can use the oc-mirror CLI plug-in 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].
84+
85+
These procedures assume that you already have your mirror registry set up.
86+
87+
[id="mirroring-image-set-partial"]
88+
=== Mirroring an image set in a partially disconnected environment
89+
90+
In a partially disconnected environment, you can mirror an image set directly to the target mirror registry.
91+
92+
// Mirroring from mirror to mirror
93+
include::modules/oc-mirror-mirror-to-mirror.adoc[leveloffset=+3]
94+
95+
[id="mirroring-image-set-full"]
96+
=== Mirroring an image set in a fully disconnected environment
97+
98+
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].
99+
100+
// Mirroring from mirror to disk
101+
include::modules/oc-mirror-mirror-to-disk.adoc[leveloffset=+3]
102+
103+
// Mirroring from disk to mirror in a disconnected environment
104+
include::modules/oc-mirror-disk-to-mirror.adoc[leveloffset=+3]
105+
106+
// Installing the ImageContentSourcePolicy and CatalogSource resources into the cluster
107+
include::modules/oc-mirror-updating-cluster-manifests.adoc[leveloffset=+1]
108+
109+
// TODO: Consider whether we want any sort of reference module on how to use `oc mirror` (the 3 ways etc)
110+
// Maybe consider adding the blurb just to the beginning of the procedure modules (the combo of params?)
111+
112+
// Updating your mirror registry with differential updates
113+
include::modules/oc-mirror-differential-updates.adoc[leveloffset=+1]
114+
115+
[role="_additional-resources"]
116+
.Additional resources
117+
118+
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#mirroring-image-set-partial[Mirroring an image set in a partially disconnected environment]
119+
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#mirroring-image-set-full[Mirroring an image set in a fully disconnected environment]
120+
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#oc-mirror-updating-cluster-manifests_installing-mirroring-disconnected[Installing the ImageContentSourcePolicy and CatalogSource resources into the cluster]
121+
122+
// Image set configuration parameters
123+
include::modules/oc-mirror-imageset-config-params.adoc[leveloffset=+1]
124+
125+
// Image set configuration examples
126+
include::modules/oc-mirror-image-set-config-examples.adoc[leveloffset=+1]
127+
128+
// TODO: Add an additional resources section to link to the non-TP assembly?

0 commit comments

Comments
 (0)