|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * list of assemblies where this module is included |
| 4 | +// * installing/installing_with_agent_based_installer/understanding-disconnected-installation-mirroring.adoc |
| 5 | +// re-use of applicable content from disconnected install mirroring |
| 6 | + |
| 7 | +:_content-type: CONCEPT |
| 8 | +[id="agent-install-about-mirroring-for-disconnected-registry_{context}"] |
| 9 | += About mirroring the {product-title} image repository for a disconnected registry |
| 10 | + |
| 11 | +To use mirror images for a disconnected installation with the Agent-based Installer, you must modify the `install-config.yaml` file. |
| 12 | + |
| 13 | +You can mirror the release image by using the output of either the `oc adm release mirror` or `oc mirror` command. |
| 14 | +This is dependent on which command you used to set up the mirror registry. The following example shows the output of the `oc adm release mirror` command. |
| 15 | + |
| 16 | + |
| 17 | +[source,terminal] |
| 18 | +---- |
| 19 | +$ oc adm release mirror |
| 20 | +---- |
| 21 | + |
| 22 | +.Example output |
| 23 | + |
| 24 | +[source,terminal] |
| 25 | +---- |
| 26 | +To use the new mirrored repository to install, add the following |
| 27 | +section to the install-config.yaml: |
| 28 | +
|
| 29 | +imageContentSources: |
| 30 | +
|
| 31 | +mirrors: |
| 32 | +virthost.ostest.test.metalkube.org:5000/localimages/local-release-image |
| 33 | +source: quay.io/openshift-release-dev/ocp-v4.0-art-dev |
| 34 | +mirrors: |
| 35 | +virthost.ostest.test.metalkube.org:5000/localimages/local-release-image |
| 36 | +source: registry.ci.openshift.org/ocp/release |
| 37 | +---- |
| 38 | +Use the output of the command to update the `imageContentSources` field in the `install-config.yaml` file. Additionally, add the certificate file used for the mirror registry to the `additionalTrustBundle` field. |
| 39 | + |
| 40 | +.Example `install-config.yaml` file |
| 41 | + |
| 42 | +[source,yaml] |
| 43 | +---- |
| 44 | + additionalTrustBundle: | |
| 45 | + -----BEGIN CERTIFICATE----- |
| 46 | + ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
| 47 | + -----END CERTIFICATE----- |
| 48 | +---- |
| 49 | + |
| 50 | +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. |
| 51 | + |
| 52 | +If you are using the optional method of the ZTP manifests, there are two mirror configuration files: `registries.conf` and `ca- bundle.crt` . These files must be added to the `mirror/directory` path to add the mirror configuration in the agent ISO image. |
| 53 | + |
| 54 | +You can create the `registries.conf` file from the output of either the `oc adm release mirror` or `oc mirror` command. The format of the `/etc/containers/registries.conf` file has changed . It is now version 2 and in TOML format. |
| 55 | + |
| 56 | +.Example `registries.conf` file |
| 57 | + |
| 58 | +[source,toml] |
| 59 | +---- |
| 60 | +[[registry]] |
| 61 | +location = "registry.ci.openshift.org/ocp/release" mirror-by-digest-only = true |
| 62 | +
|
| 63 | +[[registry.mirror]] location = "virthost.ostest.test.metalkube.org:5000/localimages/local-release-image" |
| 64 | +
|
| 65 | +[[registry]] |
| 66 | +location = "quay.io/openshift-release-dev/ocp-v4.0- art-dev" mirror-by-digest-only = true |
| 67 | +
|
| 68 | +[[registry.mirror]] location = "virthost.ostest.test.metalkube.org:5000/localimages/local-release-image" |
| 69 | +---- |
0 commit comments