Skip to content

Commit 38e13f7

Browse files
authored
Merge pull request #53404 from Amrita42/Agent-249-new
Agent-249: disconnected install via a mirror through Agent-based Installer
2 parents 159a1bd + f831ae8 commit 38e13f7

File tree

3 files changed

+91
-0
lines changed

3 files changed

+91
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ Topics:
305305
Topics:
306306
- Name: Preparing to install with Agent-based installer
307307
File: preparing-to-install-with-agent-based-installer
308+
- Name: Understanding disconnected installation mirroring
309+
File: understanding-disconnected-installation-mirroring
308310
- Name: Installing a cluster with Agent-based installer
309311
File: installing-with-agent-based-installer
310312
- Name: Installing on a single node
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
:_content-type: ASSEMBLY
2+
[id="understanding-disconnected-installation-mirroring"]
3+
= Understanding disconnected installation mirroring
4+
include::_attributes/common-attributes.adoc[]
5+
:context: understanding-disconnected-installation-mirroring
6+
7+
toc::[]
8+
// Reusing applicable content from Disconnected installation mirroring assembly
9+
10+
You can use a mirror registry for disconnected installations and to ensure that your clusters only use container images that satisfy your organization's controls on external content. Before you install a cluster on infrastructure that you provision in a disconnected environment, you must mirror the required container images into that environment. To mirror container images, you must have a registry for mirroring.
11+
12+
[id="agent-install-mirroring-images-disconnected"]
13+
== Mirroring images for a disconnected installation through the Agent-based Installer
14+
15+
You can use one of the following procedures to mirror your {product-title} image repository to your mirror registry:
16+
17+
* xref:../../installing/disconnected_install/installing-mirroring-installation-images.adoc#installing-mirroring-installation-images[Mirroring images for a disconnected installation]
18+
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#installing-mirroring-disconnected[Mirroring images for a disconnected installation using the oc-mirror plug-in]
19+
20+
include::modules/agent-install-about-mirroring-for-disconnected-registry.adoc[leveloffset=+1]
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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

Comments
 (0)