@@ -71,12 +71,20 @@ registry, such as `ocp4/openshift4`.
7171
7272.. Export the name of the repository to mirror:
7373+
74+ ifndef::openshift-origin[]
7475[source,terminal]
7576----
7677$ PRODUCT_REPO='openshift-release-dev'
7778----
7879+
7980For a production release, you must specify `openshift-release-dev`.
81+ endif::[]
82+ ifdef::openshift-origin[]
83+ [source,terminal]
84+ ----
85+ $ PRODUCT_REPO='openshift'
86+ ----
87+ endif::[]
8088
8189.. Export the path to your registry pull secret:
8290+
@@ -89,19 +97,29 @@ For `<path_to_pull_secret>`, specify the absolute path to and file name of the p
8997
9098.. Export the release mirror:
9199+
100+ ifndef::openshift-origin[]
92101[source,terminal]
93102----
94103$ RELEASE_NAME="ocp-release"
95104----
96105+
97106For a production release, you must specify `ocp-release`.
107+ endif::[]
108+ ifdef::openshift-origin[]
109+ [source,terminal]
110+ ----
111+ $ RELEASE_NAME="okd"
112+ ----
113+ endif::[]
98114
99- .. Export the type of architecture for your server, such as `x86_64`.:
115+ ifndef::openshift-origin[]
116+ .. Export the type of architecture for your server, such as `x86_64`:
100117+
101118[source,terminal]
102119----
103120$ ARCHITECTURE=<server_architecture>
104121----
122+ endif::[]
105123
106124.. Export the path to the directory to host the mirrored images:
107125+
@@ -116,21 +134,42 @@ $ REMOVABLE_MEDIA_PATH=<path> <1>
116134... Connect the removable media to a system that is connected to the Internet.
117135... Review the images and configuration manifests to mirror:
118136+
137+ ifdef::openshift-origin[]
138+ [source,terminal]
139+ ----
140+ $ oc adm release mirror -a ${LOCAL_SECRET_JSON} \
141+ --from=quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE} \
142+ --to=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} \
143+ --to-release-image=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE} --dry-run
144+ ----
145+ endif::[]
146+ ifndef::openshift-origin[]
119147[source,terminal]
120148----
121149$ oc adm release mirror -a ${LOCAL_SECRET_JSON} \
122150 --from=quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE}-${ARCHITECTURE} \
123151 --to=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} \
124152 --to-release-image=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE} --dry-run
125153----
154+ endif::[]
155+
126156... Record the entire `imageContentSources` section from the output of the previous
127157command. 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.
128158... Mirror the images to a directory on the removable media:
129159+
160+ ifdef::openshift-origin[]
161+ [source,terminal]
162+ ----
163+ $ oc adm release mirror -a ${LOCAL_SECRET_JSON} --to-dir=${REMOVABLE_MEDIA_PATH}/mirror quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE}
164+ ----
165+ endif::[]
166+ ifndef::openshift-origin[]
130167[source,terminal]
131168----
132169$ oc adm release mirror -a ${LOCAL_SECRET_JSON} --to-dir=${REMOVABLE_MEDIA_PATH}/mirror quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE}-${ARCHITECTURE}
133170----
171+ endif::[]
172+
134173... Take the media to the restricted network environment and upload the images to the local container registry.
135174+
136175[source,terminal]
@@ -143,13 +182,24 @@ $ oc image mirror -a ${LOCAL_SECRET_JSON} --from-dir=${REMOVABLE_MEDIA_PATH}/mir
143182** If the local container registry is connected to the mirror host, take the following actions:
144183... Directly push the release images to the local registry by using following command:
145184+
185+ ifdef::openshift-origin[]
186+ [source,terminal]
187+ ----
188+ $ oc adm release mirror -a ${LOCAL_SECRET_JSON} \
189+ --from=quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE} \
190+ --to=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} \
191+ --to-release-image=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}
192+ ----
193+ endif::[]
194+ ifndef::openshift-origin[]
146195[source,terminal]
147196----
148197$ oc adm release mirror -a ${LOCAL_SECRET_JSON} \
149198 --from=quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE}-${ARCHITECTURE} \
150199 --to=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} \
151200 --to-release-image=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE}
152201----
202+ endif::[]
153203+
154204This command pulls the release information as a digest, and its output includes
155205the `imageContentSources` data that you require when you install your cluster.
@@ -172,10 +222,18 @@ $ oc adm release extract -a ${LOCAL_SECRET_JSON} --command=openshift-install "${
172222----
173223** If the local container registry is connected to the mirror host, run the following command:
174224+
225+ ifdef::openshift-origin[]
226+ [source,terminal]
227+ ----
228+ $ oc adm release extract -a ${LOCAL_SECRET_JSON} --command=openshift-install "${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}"
229+ ----
230+ endif::[]
231+ ifndef::openshift-origin[]
175232[source,terminal]
176233----
177234$ oc adm release extract -a ${LOCAL_SECRET_JSON} --command=openshift-install "${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE}"
178235----
236+ endif::[]
179237+
180238[IMPORTANT]
181239====
0 commit comments