Skip to content

Commit fef3d9e

Browse files
authored
Merge pull request #33841 from wking/update-service-release-image-mirror-fix
modules/update-service-mirror-release: Use 'oc image mirror ...' for the release image
2 parents 3c9be5f + d49d9d6 commit fef3d9e

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

modules/update-service-mirror-release.adoc

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,31 +137,21 @@ $ oc adm release mirror -a ${LOCAL_SECRET_JSON} \
137137
----
138138
$ oc adm release mirror -a ${LOCAL_SECRET_JSON} --to-dir=${REMOVABLE_MEDIA_PATH}/mirror quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE}-${ARCHITECTURE}
139139
----
140-
... Export a local temporary repository name:
140+
... Take the media to the restricted network environment and upload the images to the local container registry:
141141
+
142142
[source,terminal]
143143
----
144-
$ TEMP_REPOSITORY='<temp_repository_name>'
144+
$ oc image mirror -a ${LOCAL_SECRET_JSON} --from-dir=${REMOVABLE_MEDIA_PATH}/mirror "file://openshift/release:${OCP_RELEASE}*" ${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} <1>
145145
----
146146
+
147-
For `<temp_repository_name>`, specify the name of a temporary repository to create in your
148-
registry, such as `ocp4/temp`.
149-
... Take the media to the restricted network environment and upload the images to the temporary repository in the local container registry. By uploading the images to the temporary repository, you can then mirror them to the final repositories so that the release images are mirrored to a separate repository.
147+
<1> For `REMOVABLE_MEDIA_PATH`, you must use the path where you mounted the removable media.
150148
+
151-
[source,terminal]
152-
----
153-
$ oc image mirror -a ${LOCAL_SECRET_JSON} --from-dir=${REMOVABLE_MEDIA_PATH}/mirror "file://openshift/release:${OCP_RELEASE}*" ${LOCAL_REGISTRY}/${TEMP_REPOSITORY} <1>
154-
----
149+
... Mirror the release image to a separate repository:
155150
+
156151
[source,terminal]
157152
----
158-
$ oc adm release mirror -a ${LOCAL_SECRET_JSON} \
159-
--from=${LOCAL_REGISTRY}/${TEMP_REPOSITORY} \
160-
--to=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} \
161-
--to-release-image=${LOCAL_REGISTRY}/${LOCAL_RELEASE_IMAGES_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE}
153+
$ oc image mirror -a ${LOCAL_SECRET_JSON} ${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE} ${LOCAL_REGISTRY}/${LOCAL_RELEASE_IMAGES_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE}
162154
----
163-
+
164-
<1> For `REMOVABLE_MEDIA_PATH`, you must use the same path that you specified when you mirrored the images.
165155

166156
** If the local container registry is connected to the mirror host, push the release images directly to the local registry:
167157
+

0 commit comments

Comments
 (0)