Skip to content

Commit 8f9de03

Browse files
authored
Merge pull request #102851 from ShaunaDiaz/OSDOCS-16880-3
OSDOCS-16880-3: CQA IMG-2: Image Configuration and Advanced Features
2 parents 0fdd439 + dcdc885 commit 8f9de03

6 files changed

+92
-107
lines changed

modules/images-registry-mirroring.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Module included in the following assemblies:
22
//
33
// * openshift_images/image-configuration-hcp.adoc
4-
:_mod-docs-content-type: CONCEPT
54

5+
:_mod-docs-content-type: CONCEPT
66
[id="images-registry-mirroring_{context}"]
77
= Image registry mirroring for {product-title}
88

modules/installation-about-mirror-registry.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ endif::[]
1717
[id="installation-about-mirror-registry_{context}"]
1818
= About the mirror registry
1919

20+
[role="_abstract"]
21+
You must have access to the internet to obtain the necessary container images. Using an alternative registry means that you place the mirror registry on a mirror host that has access to both your network and the internet.
22+
2023
ifndef::oc-mirror[]
2124
You can mirror the images that are required for {product-title} installation and subsequent product updates to a container mirror registry such as {quay}, JFrog Artifactory, Sonatype Nexus Repository, or Harbor. If you do not have access to a large-scale container registry, you can use the _mirror registry for Red{nbsp}Hat OpenShift_, a small-scale container registry included with {product-title} subscriptions.
2225

@@ -41,7 +44,7 @@ For mirrored registries, to view the source of pulled images, you must review th
4144

4245
[NOTE]
4346
====
44-
Red Hat does not test third party registries with {product-title}.
47+
Red{nbsp}Hat does not test third party registries with {product-title}.
4548
====
4649

4750
ifeval::["{context}" == "installing-mirroring-disconnected"]

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

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ endif::[]
2929
[id="installation-adding-registry-pull-secret_{context}"]
3030
= Configuring credentials that allow images to be mirrored
3131

32-
Create a container image registry credentials file that enables you to mirror images from Red{nbsp}Hat to your mirror.
32+
[role="_abstract"]
33+
Create a container image registry credentials file so that you can mirror images from Red{nbsp}Hat to your mirror. Complete the following steps on the installation host.
3334

3435
ifdef::restricted[]
3536
[WARNING]
@@ -54,19 +55,17 @@ ifdef::restricted[]
5455
endif::restricted[]
5556

5657
.Procedure
57-
58-
Complete the following steps on the installation host:
59-
6058
ifndef::openshift-origin[]
6159
. Download your `registry.redhat.io` {cluster-manager-url-pull}.
6260

6361
. Make a copy of your pull secret in JSON format by running the following command:
6462
+
6563
[source,terminal]
6664
----
67-
$ cat ./pull-secret | jq . > <path>/<pull_secret_file_in_json> <1>
65+
$ cat ./pull-secret | jq . > <path>/<pull_secret_file_in_json>
6866
----
69-
<1> Specify the path to the folder to store the pull secret in and a name for the JSON file that you create.
67+
+
68+
Specify the path to the directory to store the pull secret in and a name for the JSON file that you create.
7069
+
7170
.Example pull secret
7271
[source,json]
@@ -92,9 +91,13 @@ $ cat ./pull-secret | jq . > <path>/<pull_secret_file_in_json> <1>
9291
}
9392
}
9493
----
94+
+
95+
--
9596
// An additional step for following this procedure when using oc-mirror as part of the disconnected install process.
9697
ifdef::oc-mirror[]
98+
--
9799
. Save the file as either `~/.docker/config.json` or `$XDG_RUNTIME_DIR/containers/auth.json`:
100+
98101
.. If the `.docker` or `$XDG_RUNTIME_DIR/containers` directories do not exist, create one by entering the following command:
99102
+
100103
[source,terminal]
@@ -103,38 +106,45 @@ $ mkdir -p <directory_name>
103106
----
104107
+
105108
Where `<directory_name>` is either `~/.docker` or `$XDG_RUNTIME_DIR/containers`.
109+
106110
.. Copy the pull secret to the appropriate directory by entering the following command:
107111
+
108112
[source,terminal]
109113
----
110114
$ cp <path>/<pull_secret_file_in_json> <directory_name>/<auth_file>
111115
----
112116
+
113-
Where `<directory_name>` is either `~/.docker` or `$XDG_RUNTIME_DIR/containers`, and `<auth_file>` is either `config.json` or `auth.json`.
117+
The `<directory_name>` is either `~/.docker` or `$XDG_RUNTIME_DIR/containers`, and `<auth_file>` is either `config.json` or `auth.json`
118+
--
114119
endif::oc-mirror[]
115120
// Similar to the additional step above, except it is framed as optional because it is included in a disconnected update page (where users may or may not use oc-mirror for their process)
116121
ifdef::update-oc-mirror[]
122+
117123
. Optional: If using the oc-mirror plugin, save the file as either `~/.docker/config.json` or `$XDG_RUNTIME_DIR/containers/auth.json`:
118-
.. If the `.docker` or `$XDG_RUNTIME_DIR/containers` directories do not exist, create one by entering the following command:
124+
125+
** If the `.docker` or `$XDG_RUNTIME_DIR/containers` directories do not exist, create one by entering the following command:
119126
+
120127
[source,terminal]
121128
----
122129
$ mkdir -p <directory_name>
123130
----
124131
+
125132
Where `<directory_name>` is either `~/.docker` or `$XDG_RUNTIME_DIR/containers`.
126-
.. Copy the pull secret to the appropriate directory by entering the following command:
133+
134+
** Copy the pull secret to the appropriate directory by entering the following command:
127135
+
128136
[source,terminal]
129137
----
130138
$ cp <path>/<pull_secret_file_in_json> <directory_name>/<auth_file>
131139
----
132140
+
133141
Where `<directory_name>` is either `~/.docker` or `$XDG_RUNTIME_DIR/containers`, and `<auth_file>` is either `config.json` or `auth.json`.
142+
134143
endif::update-oc-mirror[]
135144
// Additional step for allowing this procedure for oc-mirror-v2
136145
// Should this step below also have the "if you don't have this directory, create it using this command" substeps?
137146
ifdef::oc-mirror-v2[]
147+
138148
. If the `$XDG_RUNTIME_DIR/containers` directory does not exist, create one by entering the following command:
139149
+
140150
[source,terminal]
@@ -145,14 +155,15 @@ $ mkdir -p $XDG_RUNTIME_DIR/containers
145155
. Save the pull secret file as `$XDG_RUNTIME_DIR/containers/auth.json`.
146156
endif::oc-mirror-v2[]
147157
endif::openshift-origin[]
158+
--
148159

149160
. Generate the base64-encoded user name and password or token for your mirror registry by running the following command:
150161
+
151162
[source,terminal]
152163
----
153-
$ echo -n '<user_name>:<password>' | base64 -w0 <1>
164+
$ echo -n '<user_name>:<password>' | base64 -w0
154165
----
155-
<1> For `<user_name>` and `<password>`, specify the user name and password that you configured for your registry.
166+
For `<user_name>` and `<password>`, specify the user name and password that you configured for your registry.
156167
+
157168
.Example output
158169
[source,terminal]
@@ -167,17 +178,17 @@ ifdef::openshift-origin[]
167178
----
168179
{
169180
"auths": {
170-
"<mirror_registry>": { <1>
171-
"auth": "<credentials>", <2>
181+
"<mirror_registry>": {
182+
"auth": "<credentials>",
172183
"email": "you@example.com"
173184
}
174185
}
175186
}
176187
----
177-
<1> Specify the registry domain name, and optionally the port, that your mirror registry uses to serve content. For example,
178-
`registry.example.com` or `registry.example.com:8443`
179-
<2> Specify the base64-encoded user name and password for
180-
the mirror registry.
188+
+
189+
* For the `<mirror_registry>` value, specify the registry domain name, and optionally the port, that your mirror registry uses to serve content. For example, `registry.example.com` or `registry.example.com:8443`.
190+
+
191+
* For the `<credentials>` value, specify the base64-encoded user name and password for the mirror registry.
181192
182193
endif::openshift-origin[]
183194

@@ -187,16 +198,16 @@ ifndef::openshift-origin[]
187198
[source,json]
188199
----
189200
"auths": {
190-
"<mirror_registry>": { <1>
191-
"auth": "<credentials>", <2>
201+
"<mirror_registry>": {
202+
"auth": "<credentials>",
192203
"email": "you@example.com"
193204
}
194205
},
195206
----
196-
<1> Specify the registry domain name, and optionally the port, that your mirror registry uses to serve content. For example,
197-
`registry.example.com` or `registry.example.com:8443`
198-
<2> Specify the base64-encoded user name and password for
199-
the mirror registry.
207+
+
208+
* For the `<mirror_registry>` value, specify the registry domain name, and optionally the port, that your mirror registry uses to serve content. For example, `registry.example.com` or `registry.example.com:8443`.
209+
+
210+
* For the `<credentials>` value, specify the base64-encoded user name and password for the mirror registry.
200211
+
201212
.Example modified pull secret
202213
[source,json]

modules/installation-mirror-repository.adoc

Lines changed: 27 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
[id="installation-mirror-repository_{context}"]
88
= Mirroring the {product-title} image repository
99

10-
Mirror the {product-title} image repository to your registry to use during cluster installation or upgrade.
10+
[role="_abstract"]
11+
Mirror the {product-title} image repository to your registry to use during cluster installation or upgrade. Complete the following steps on the mirror host.
1112

1213
.Prerequisites
1314

@@ -25,13 +26,10 @@ endif::[]
2526
ifdef::openshift-origin[]
2627
* You have created a pull secret for your mirror repository.
2728
endif::[]
28-
2929
* If you use self-signed certificates, you have specified a Subject Alternative Name in the certificates.
3030
3131
.Procedure
3232

33-
Complete the following steps on the mirror host:
34-
3533
. Review the
3634
ifndef::openshift-origin[]
3735
link:https://access.redhat.com/downloads/content/290/[Download {product-title}] page to determine the version of {product-title} that you want to install and determine the corresponding tag on the link:https://quay.io/repository/openshift-release-dev/ocp-release?tab=tags[Repository Tags] page.
@@ -41,16 +39,16 @@ link:https://github.com/okd-project/okd/releases/[{product-title} releases page]
4139
to determine the version and tag of {product-title} that you want to install.
4240
endif::[]
4341

44-
. Set the required environment variables:
42+
. Set the following required environment variables:
43+
4544
.. Export the release version:
4645
+
4746
[source,terminal]
4847
----
4948
$ OCP_RELEASE=<release_version>
5049
----
5150
+
52-
For `<release_version>`, specify the tag that corresponds to the version of {product-title} to
53-
install, such as `4.5.4`.
51+
For `<release_version>`, specify the tag that corresponds to the version of {product-title} to install, such as `4.20.1`.
5452

5553
.. Export the local registry name and host port:
5654
+
@@ -59,9 +57,7 @@ install, such as `4.5.4`.
5957
$ LOCAL_REGISTRY='<local_registry_host_name>:<local_registry_host_port>'
6058
----
6159
+
62-
For `<local_registry_host_name>`, specify the registry domain name for your mirror
63-
repository, and for `<local_registry_host_port>`, specify the port that it
64-
serves content on.
60+
For `<local_registry_host_name>`, specify the registry domain name for your mirror repository, and for `<local_registry_host_port>`, specify the port that it serves content on.
6561

6662
.. Export the local repository name:
6763
+
@@ -70,8 +66,7 @@ serves content on.
7066
$ LOCAL_REPOSITORY='<local_repository_name>'
7167
----
7268
+
73-
For `<local_repository_name>`, specify the name of the repository to create in your
74-
registry, such as `ocp4/openshift4`.
69+
For `<local_repository_name>`, specify the name of the repository to create in your registry, such as `ocp4/openshift4`.
7570

7671
.. Export the name of the repository to mirror:
7772
+
@@ -121,19 +116,20 @@ ifndef::openshift-origin[]
121116
+
122117
[source,terminal]
123118
----
124-
$ ARCHITECTURE=<cluster_architecture> <1>
119+
$ ARCHITECTURE=<cluster_architecture>
125120
----
126-
<1> Specify the architecture of the cluster, such as `x86_64`, `aarch64`, `s390x`, or `ppc64le`.
127-
121+
+
122+
Specify the architecture of the cluster, such as `x86_64`, `aarch64`, `s390x`, or `ppc64le`.
128123
endif::[]
129124

130125
.. Export the path to the directory to host the mirrored images:
131126
+
132127
[source,terminal]
133128
----
134-
$ REMOVABLE_MEDIA_PATH=<path> <1>
129+
$ REMOVABLE_MEDIA_PATH=<path>
135130
----
136-
<1> Specify the full path, including the initial forward slash (/) character.
131+
+
132+
Specify the full path, including the initial forward slash (/) character.
137133

138134
ifndef::openshift-rosa,openshift-dedicated[]
139135
. Mirror the version images to the mirror registry:
@@ -181,14 +177,14 @@ endif::[]
181177
+
182178
[source,terminal]
183179
----
184-
$ oc image mirror -a ${LOCAL_SECRET_JSON} --from-dir=${REMOVABLE_MEDIA_PATH}/mirror "file://openshift/release:${OCP_RELEASE}*" ${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} <1>
180+
$ oc image mirror -a ${LOCAL_SECRET_JSON} --from-dir=${REMOVABLE_MEDIA_PATH}/mirror "file://openshift/release:${OCP_RELEASE}*" ${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}
185181
----
186182
+
187-
<1> For `REMOVABLE_MEDIA_PATH`, you must use the same path that you specified when you mirrored the images.
183+
For the `REMOVABLE_MEDIA_PATH` variable, you must use the same path that you specified when you mirrored the images.
188184
+
189185
[IMPORTANT]
190186
====
191-
Running `oc image mirror` might result in the following error: `error: unable to retrieve source image`. This error occurs when image indexes include references to images that no longer exist on the image registry. Image indexes might retain older references to allow users running those images an upgrade path to newer points on the upgrade graph. As a temporary workaround, you can use the `--skip-missing` option to bypass the error and continue downloading the image index. For more information, see link:https://access.redhat.com/solutions/6975305[Service Mesh Operator mirroring failed].
187+
Running the `oc image mirror` command might result in the following error: `error: unable to retrieve source image`. This error occurs when image indexes include references to images that no longer exist on the image registry. Image indexes might retain older references to allow users running those images an upgrade path to newer points on the upgrade graph. As a temporary workaround, you can use the `--skip-missing` option to bypass the error and continue downloading the image index. For more information, see link:https://access.redhat.com/solutions/6975305[Service Mesh Operator mirroring failed].
192188
====
193189

194190
** If the local container registry is connected to the mirror host, take the following actions:
@@ -213,15 +209,14 @@ $ oc adm release mirror -a ${LOCAL_SECRET_JSON} \
213209
----
214210
endif::[]
215211
+
216-
This command pulls the release information as a digest, and its output includes
217-
the `imageContentSources` data that you require when you install your cluster.
212+
This command pulls the release information as a digest, and its output includes the `imageContentSources` data that you require when you install your cluster.
218213

219214
... Record the entire `imageContentSources` section from the output of the previous
220215
command. The information about your mirrors is unique to your mirrored repository, and you must add the `imageContentSources` section to the `install-config.yaml` file during installation.
221216
+
222217
[NOTE]
223218
====
224-
The image name gets patched to Quay.io during the mirroring process, and the podman images will show Quay.io in the registry on the bootstrap virtual machine.
219+
The image name gets patched to Quay.io during the mirroring process, and the Podman images will show Quay.io in the registry on the bootstrap virtual machine.
225220
====
226221

227222
. To create the installation program that is based on the content that you
@@ -231,9 +226,10 @@ mirrored, extract it and pin it to the release:
231226
[source,terminal]
232227
----
233228
$ oc adm release extract -a ${LOCAL_SECRET_JSON} --icsp-file=<file> --command=openshift-install "${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE}" \
234-
--insecure=true <1>
229+
--insecure=true
235230
----
236-
<1> Optional: If you do not want to configure trust for the target registry, add the `--insecure=true` flag.
231+
+
232+
Optional: If you do not want to configure trust for the target registry, add the `--insecure=true` flag.
237233

238234
** If the local container registry is connected to the mirror host, run the following command:
239235
+
@@ -252,9 +248,7 @@ endif::[]
252248
+
253249
[IMPORTANT]
254250
====
255-
To ensure that you use the correct images for the version of {product-title}
256-
that you selected, you must extract the installation program from the mirrored
257-
content.
251+
To ensure that you use the correct images for the version of {product-title} that you selected, you must extract the installation program from the mirrored content.
258252

259253
You must perform this step on a machine with an active internet connection.
260254
====
@@ -281,19 +275,16 @@ $ oc adm release mirror -a ${LOCAL_SECRET_JSON} \
281275
--to-release-image=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE}
282276
----
283277
+
284-
This command pulls the release information as a digest, and its output includes
285-
the `imageContentSources` data that you require when you install your cluster.
278+
This command pulls the release information as a digest, and its output includes the `imageContentSources` data that you require when you install your cluster.
286279

287-
.. Record the entire `imageContentSources` section from the output of the previous
288-
command. The information about your mirrors is unique to your mirrored repository, and you must add the `imageContentSources` section to the `install-config.yaml` file during installation.
280+
.. Record the entire `imageContentSources` section from the output of the previous command. The information about your mirrors is unique to your mirrored repository, and you must add the `imageContentSources` section to the `install-config.yaml` file during installation.
289281
+
290282
[NOTE]
291283
====
292-
The image name gets patched to Quay.io during the mirroring process, and the podman images will show Quay.io in the registry on the bootstrap virtual machine.
284+
The image name gets patched to Quay.io during the mirroring process, and the Podman images show `quay.io` in the registry on the bootstrap virtual machine.
293285
====
294286

295-
. To create the installation program that is based on the content that you
296-
mirrored, extract it and pin it to the release by running the following command:
287+
. To create the installation program that is based on the content that you mirrored, extract it and pin it to the release by running the following command:
297288
+
298289
[source,terminal]
299290
----
@@ -302,9 +293,7 @@ $ oc adm release extract -a ${LOCAL_SECRET_JSON} --command=openshift-install "${
302293
+
303294
[IMPORTANT]
304295
====
305-
To ensure that you use the correct images for the version of {product-title}
306-
that you selected, you must extract the installation program from the mirrored
307-
content.
296+
To ensure that you use the correct images for the version of {product-title} that you selected, you must extract the installation program from the mirrored content.
308297
309298
You must perform this step on a machine with an active internet connection.
310299
====

0 commit comments

Comments
 (0)