You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
+
20
23
ifndef::oc-mirror[]
21
24
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.
22
25
@@ -41,7 +44,7 @@ For mirrored registries, to view the source of pulled images, you must review th
41
44
42
45
[NOTE]
43
46
====
44
-
RedHat does not test third party registries with {product-title}.
47
+
Red{nbsp}Hat does not test third party registries with {product-title}.
= Configuring credentials that allow images to be mirrored
31
31
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.
33
34
34
35
ifdef::restricted[]
35
36
[WARNING]
@@ -54,19 +55,17 @@ ifdef::restricted[]
54
55
endif::restricted[]
55
56
56
57
.Procedure
57
-
58
-
Complete the following steps on the installation host:
59
-
60
58
ifndef::openshift-origin[]
61
59
. Download your `registry.redhat.io`{cluster-manager-url-pull}.
62
60
63
61
. Make a copy of your pull secret in JSON format by running the following command:
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
+
--
114
119
endif::oc-mirror[]
115
120
// 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)
116
121
ifdef::update-oc-mirror[]
122
+
117
123
. 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:
119
126
+
120
127
[source,terminal]
121
128
----
122
129
$ mkdir -p <directory_name>
123
130
----
124
131
+
125
132
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:
<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.
156
167
+
157
168
.Example output
158
169
[source,terminal]
@@ -167,17 +178,17 @@ ifdef::openshift-origin[]
167
178
----
168
179
{
169
180
"auths": {
170
-
"<mirror_registry>": { <1>
171
-
"auth": "<credentials>", <2>
181
+
"<mirror_registry>": {
182
+
"auth": "<credentials>",
172
183
"email": "you@example.com"
173
184
}
174
185
}
175
186
}
176
187
----
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.
181
192
182
193
endif::openshift-origin[]
183
194
@@ -187,16 +198,16 @@ ifndef::openshift-origin[]
187
198
[source,json]
188
199
----
189
200
"auths": {
190
-
"<mirror_registry>": { <1>
191
-
"auth": "<credentials>", <2>
201
+
"<mirror_registry>": {
202
+
"auth": "<credentials>",
192
203
"email": "you@example.com"
193
204
}
194
205
},
195
206
----
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.
Copy file name to clipboardExpand all lines: modules/installation-mirror-repository.adoc
+27-38Lines changed: 27 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,8 @@
7
7
[id="installation-mirror-repository_{context}"]
8
8
= Mirroring the {product-title} image repository
9
9
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.
11
12
12
13
.Prerequisites
13
14
@@ -25,13 +26,10 @@ endif::[]
25
26
ifdef::openshift-origin[]
26
27
* You have created a pull secret for your mirror repository.
27
28
endif::[]
28
-
29
29
* If you use self-signed certificates, you have specified a Subject Alternative Name in the certificates.
30
30
31
31
.Procedure
32
32
33
-
Complete the following steps on the mirror host:
34
-
35
33
. Review the
36
34
ifndef::openshift-origin[]
37
35
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.
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.
65
61
66
62
.. Export the local repository name:
67
63
+
@@ -70,8 +66,7 @@ serves content on.
70
66
$ LOCAL_REPOSITORY='<local_repository_name>'
71
67
----
72
68
+
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`.
75
70
76
71
.. Export the name of the repository to mirror:
77
72
+
@@ -121,19 +116,20 @@ ifndef::openshift-origin[]
121
116
+
122
117
[source,terminal]
123
118
----
124
-
$ ARCHITECTURE=<cluster_architecture> <1>
119
+
$ ARCHITECTURE=<cluster_architecture>
125
120
----
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`.
128
123
endif::[]
129
124
130
125
.. Export the path to the directory to host the mirrored images:
131
126
+
132
127
[source,terminal]
133
128
----
134
-
$ REMOVABLE_MEDIA_PATH=<path> <1>
129
+
$ REMOVABLE_MEDIA_PATH=<path>
135
130
----
136
-
<1> Specify the full path, including the initial forward slash (/) character.
131
+
+
132
+
Specify the full path, including the initial forward slash (/) character.
137
133
138
134
ifndef::openshift-rosa,openshift-dedicated[]
139
135
. Mirror the version images to the mirror registry:
@@ -181,14 +177,14 @@ endif::[]
181
177
+
182
178
[source,terminal]
183
179
----
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}
185
181
----
186
182
+
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.
188
184
+
189
185
[IMPORTANT]
190
186
====
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].
192
188
====
193
189
194
190
** If the local container registry is connected to the mirror host, take the following actions:
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.
218
213
219
214
... Record the entire `imageContentSources` section from the output of the previous
220
215
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.
221
216
+
222
217
[NOTE]
223
218
====
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.
225
220
====
226
221
227
222
. 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:
231
226
[source,terminal]
232
227
----
233
228
$ 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
235
230
----
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.
237
233
238
234
** If the local container registry is connected to the mirror host, run the following command:
239
235
+
@@ -252,9 +248,7 @@ endif::[]
252
248
+
253
249
[IMPORTANT]
254
250
====
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.
258
252
259
253
You must perform this step on a machine with an active internet connection.
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.
286
279
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.
289
281
+
290
282
[NOTE]
291
283
====
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.
293
285
====
294
286
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:
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.
308
297
309
298
You must perform this step on a machine with an active internet connection.
0 commit comments