You must use the output of either the oc adm release mirror
command or the oc-mirror plugin to configure the Agent-based Installer to use mirrored images.
-
If you used the oc-mirror plugin to mirror your release images:
-
Open the
imageContentSourcePolicy.yaml
located in the results directory, for exampleoc-mirror-workspace/results-1682697932/
. -
Copy the text in the
repositoryDigestMirrors
section of the yaml file.
-
-
If you used the
oc adm release mirror
command to mirror your release images:-
Copy the text in the
imageContentSources
section of the command output.
-
-
Paste the copied text into the
imageContentSources
field of theinstall-config.yaml
file. -
Add the certificate file used for the mirror registry to the
additionalTrustBundle
field of the yaml file.ImportantThe 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.
Exampleinstall-config.yaml
fileadditionalTrustBundle: | -----BEGIN CERTIFICATE----- ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ -----END CERTIFICATE-----
-
If you are using {ztp} manifests: add the
registries.conf
andca-bundle.crt
files to themirror
path to add the mirror configuration in the agent ISO image.NoteYou can create the
registries.conf
file from the output of either theoc adm release mirror
command or theoc mirror
plugin. The format of the/etc/containers/registries.conf
file has changed. It is now version 2 and in TOML format.Exampleregistries.conf
file[[registry]] location = "registry.ci.openshift.org/ocp/release" mirror-by-digest-only = true [[registry.mirror]] location = "virthost.ostest.test.metalkube.org:5000/localimages/local-release-image" [[registry]] location = "quay.io/openshift-release-dev/ocp-v4.0-art-dev" mirror-by-digest-only = true [[registry.mirror]] location = "virthost.ostest.test.metalkube.org:5000/localimages/local-release-image"