Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions modules/update-service-mirror-release.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -137,31 +137,21 @@ $ oc adm release mirror -a ${LOCAL_SECRET_JSON} \
----
$ oc adm release mirror -a ${LOCAL_SECRET_JSON} --to-dir=${REMOVABLE_MEDIA_PATH}/mirror quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE}-${ARCHITECTURE}
----
... Export a local temporary repository name:
... Take the media to the restricted network environment and upload the images to the local container registry:
+
[source,terminal]
----
$ TEMP_REPOSITORY='<temp_repository_name>'
$ oc image mirror -a ${LOCAL_SECRET_JSON} --from-dir=${REMOVABLE_MEDIA_PATH}/mirror "file://openshift/release:${OCP_RELEASE}*" ${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} <1>
----
+
For `<temp_repository_name>`, specify the name of a temporary repository to create in your
registry, such as `ocp4/temp`.
... 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.
<1> For `REMOVABLE_MEDIA_PATH`, you must use the path where you mounted the removable media.
+
[source,terminal]
----
$ oc image mirror -a ${LOCAL_SECRET_JSON} --from-dir=${REMOVABLE_MEDIA_PATH}/mirror "file://openshift/release:${OCP_RELEASE}*" ${LOCAL_REGISTRY}/${TEMP_REPOSITORY} <1>
----
... Mirror the release image to a separate repository:
+
[source,terminal]
----
$ oc adm release mirror -a ${LOCAL_SECRET_JSON} \
--from=${LOCAL_REGISTRY}/${TEMP_REPOSITORY} \
--to=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} \
--to-release-image=${LOCAL_REGISTRY}/${LOCAL_RELEASE_IMAGES_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE}
$ oc image mirror -a ${LOCAL_SECRET_JSON} ${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE} ${LOCAL_REGISTRY}/${LOCAL_RELEASE_IMAGES_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE}
----
+
<1> For `REMOVABLE_MEDIA_PATH`, you must use the same path that you specified when you mirrored the images.

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