Skip to content

Commit ee2ac46

Browse files
authored
Merge pull request #63332 from GroceryBoyJr/install-config-yaml
OCPBUGS-10304: Document oc-mirror command for creating ImageContentSou…
2 parents f460704 + edd4979 commit ee2ac46

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

modules/installation-bare-metal-config-yaml.adoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,14 @@ ifdef::ibm-z,ibm-z-kvm[]
298298
<15> Add the `additionalTrustBundle` parameter and value. The value must be the contents of the certificate file that you used for your mirror registry. The certificate file can be an existing, trusted certificate authority or the self-signed certificate that you generated for the mirror registry.
299299
endif::ibm-z,ibm-z-kvm[]
300300
ifndef::openshift-origin[]
301-
<16> Provide the `imageContentSources` section from the output of the command to mirror the repository.
301+
<16> Provide the `imageContentSources` section according to the output of the command that you used to mirror the repository.
302+
+
303+
[IMPORTANT]
304+
====
305+
* When using the `oc adm release mirror` command, use the output from the `imageContentSources` section.
306+
* When using `oc mirror` command, use the `repositoryDigestMirrors` section of the `ImageContentSourcePolicy` file that results from running the command.
307+
* `ImageContentSourcePolicy` is deprecated. For more information see _Configuring image registry repository mirroring_.
308+
====
302309
endif::openshift-origin[]
303310
ifdef::openshift-origin[]
304311
<15> Provide the `imageContentSources` section from the output of the command to mirror the repository.

modules/installation-initializing-manual.adoc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,26 @@ it in the `<installation_directory>`.
144144
====
145145
You must name this configuration file `install-config.yaml`.
146146
====
147+
+
147148
ifdef::restricted,restricted-upi[]
149+
+
148150
** Unless you use a registry that {op-system} trusts by default, such as
149151
`docker.io`, you must provide the contents of the certificate for your mirror
150152
repository in the `additionalTrustBundle` section. In most cases, you must
151153
provide the certificate for your mirror.
152154
** You must include the `imageContentSources` section from the output of the command to
153155
mirror the repository.
156+
+
157+
[IMPORTANT]
158+
====
159+
** The `ImageContentSourcePolicy` file is generated as an output of `oc mirror` after the mirroring process is finished.
160+
** The `oc mirror` command generates an `ImageContentSourcePolicy` file which contains the YAML needed to define `ImageContentSourcePolicy`.
161+
Copy the text from this file and paste it into your `install-config.yaml` file.
162+
** You must run the 'oc mirror' command twice. The first time you run the `oc mirror` command, you get a full `ImageContentSourcePolicy` file. The second time you run the `oc mirror` command, you only get the difference between the first and second run.
163+
Because of this behavior, you must always keep a backup of these files in case you need to merge them into one complete `ImageContentSourcePolicy` file. Keeping a backup of these two output files ensures that you have a complete `ImageContentSourcePolicy` file.
164+
====
154165
endif::restricted,restricted-upi[]
155166
+
156-
157167
ifndef::aws-china,aws-gov,aws-secret,azure-gov,ash,ash-default,ash-network,gcp-shared,ibm-cloud-private,ibm-power-vs-private[]
158168
[NOTE]
159169
====
@@ -272,4 +282,4 @@ endif::[]
272282
ifeval::["{context}" == "installing-ibm-power-vs-private-cluster"]
273283
:!ibm-power-vs-private:
274284
endif::[]
275-
:!platform:
285+
:!platform:

modules/oc-mirror-mirror-to-mirror.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ $ oc mirror --config=./imageset-config.yaml \// <1>
4040
. Navigate into the `oc-mirror-workspace/` directory that was generated.
4141
. Navigate into the results directory, for example, `results-1639608409/`.
4242
. Verify that YAML files are present for the `ImageContentSourcePolicy` and `CatalogSource` resources.
43+
44+
[NOTE]
45+
====
46+
The `repositoryDigestMirrors` section of the `ImageContentSourcePolicy` YAML file is used for the `install-config.yaml` file during installation.
47+
====
4348
+
4449
// TODO: Test and get some better wording/example output.
4550

0 commit comments

Comments
 (0)