Skip to content

Commit 1fd7630

Browse files
committed
Disconnected doc section
Instead of pointing folks to a random blog post let's add a proper disconnected section to our docs
1 parent ed035d4 commit 1fd7630

2 files changed

Lines changed: 200 additions & 1 deletion

File tree

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
---
2+
menu:
3+
learn:
4+
parent: Patterns quick start
5+
title: Deploying in a disconnected network
6+
weight: 22
7+
aliases: /learn/disconnected-installation/
8+
---
9+
10+
:toc:
11+
:_content-type: ASSEMBLY
12+
include::modules/comm-attributes.adoc[]
13+
14+
[id="disconnected-installation"]
15+
== Deploying a validated pattern in a disconnected network
16+
17+
A disconnected (air-gapped) network is an infrastructure that is isolated from
18+
external internet access. Deploying {solution-name-upstream} in such an
19+
environment requires additional steps to mirror container images, configure
20+
internal registries, and adjust pattern configuration files.
21+
22+
This guide walks through deploying the {mcg-pattern} on {ocp} 4.19 in
23+
a disconnected network. The same approach applies to other validated patterns,
24+
though the specific list of images and operators will vary by pattern.
25+
26+
== Prerequisites
27+
28+
* One or more {ocp} clusters deployed in a disconnected network
29+
* An OCI-compliant registry accessible from the disconnected network (referred
30+
to as `registry.internal.disconnected.net` in this guide)
31+
* A Git repository accessible from the disconnected network
32+
* (Optional) A VM in the disconnected network from which to run commands
33+
34+
[NOTE]
35+
====
36+
Deploying {ocp} in a disconnected network is out of scope for this guide. See the
37+
https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html-single/disconnected_environments/index#about-installing-oc-mirror-v2[{ocp} disconnected environments documentation]
38+
for details.
39+
====
40+
41+
== Mirroring container images
42+
43+
The first step is to mirror all required container images to the internal
44+
registry. The exact list of images depends on the pattern, the {ocp} version,
45+
and the required operators. The list of images will depend on the pattern,
46+
the below is an example for Multicloud GitOps.
47+
48+
This guide uses `oc mirror --v2`. Create an `imageset-config.yaml` file that
49+
lists the required platform images, operators, and additional images:
50+
51+
[source,yaml]
52+
----
53+
kind: ImageSetConfiguration
54+
apiVersion: mirror.openshift.io/v2alpha1
55+
mirror:
56+
platform:
57+
graph: true
58+
channels:
59+
- name: stable-4.19
60+
type: ocp
61+
operators:
62+
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.19
63+
packages:
64+
- name: lvms-operator
65+
- name: advanced-cluster-management
66+
channels:
67+
- name: release-2.14
68+
- name: openshift-external-secrets-operator
69+
channels:
70+
- name: stable-v1
71+
- name: multicluster-engine
72+
channels:
73+
- name: stable-2.9
74+
- name: openshift-gitops-operator
75+
channels:
76+
- name: gitops-1.19
77+
- catalog: registry.redhat.io/redhat/community-operator-index:v4.19
78+
packages:
79+
- name: patterns-operator
80+
additionalImages:
81+
- name: registry.redhat.io/ubi9/ubi-minimal:latest
82+
- name: registry.connect.redhat.com/hashicorp/vault:1.20.2-ubi
83+
- name: registry.access.redhat.com/ubi8/httpd-24:10.0-1755779646
84+
- name: ghcr.io/external-secrets/external-secrets:v0.10.2-ubi
85+
# Validated Patterns Helm charts
86+
- name: quay.io/validatedpatterns/acm:0.1.17
87+
- name: quay.io/validatedpatterns/clustergroup:0.9.41
88+
- name: quay.io/validatedpatterns/gitea:0.0.3
89+
- name: quay.io/validatedpatterns/golang-external-secrets:0.1.5
90+
- name: quay.io/validatedpatterns/openshift-external-secrets:0.0.3
91+
- name: quay.io/validatedpatterns/hashicorp-vault:0.1.6
92+
- name: quay.io/validatedpatterns/utility-container:latest
93+
- name: quay.io/validatedpatterns/imperative-container:v1
94+
- name: quay.io/validatedpatterns/pattern-install:0.0.11
95+
- name: docker.io/gitea/gitea:1.22.6-rootless
96+
----
97+
98+
Run the mirror command, specifying a local cache directory and the target
99+
registry:
100+
101+
[source,sh]
102+
----
103+
oc mirror --config=/var/cache/oc-mirror/imageset-config.yaml \
104+
--workspace file:///var/cache/oc-mirror/workspace \
105+
docker://registry.internal.disconnected.net --v2
106+
----
107+
108+
Once mirroring completes, `oc mirror` generates resource files under
109+
`/var/cache/oc-mirror/workspace/working-dir/cluster-resources`. Apply these to
110+
the cluster so that it can resolve images from the internal registry:
111+
112+
[source,sh]
113+
----
114+
cd /var/cache/oc-mirror/workspace/working-dir/cluster-resources
115+
oc apply -f cs-community-operator-index-v4-19.yaml \
116+
cs-redhat-operator-index-v4-19.yaml idms-oc-mirror.yaml \
117+
itms-oc-mirror.yaml
118+
----
119+
120+
[IMPORTANT]
121+
====
122+
The catalog source names generated by `oc mirror` (for example,
123+
`cs-redhat-operator-index-v4-19`) are needed in the next step when configuring
124+
the pattern's values files.
125+
====
126+
127+
== Configuring the pattern for disconnected use
128+
129+
The pattern's values files must be updated to reference the mirrored catalog
130+
sources and the internal Helm chart registry. Ensure your local Git clone has
131+
its `origin` remote pointing to the disconnected Git server (verify with
132+
`git remote -v`).
133+
134+
=== values-global.yaml
135+
136+
Point the Helm chart repository to the internal registry and configure operator
137+
sources:
138+
139+
[source,yaml]
140+
----
141+
main:
142+
multiSourceConfig:
143+
enabled: true
144+
clusterGroupChartVersion: "0.9.*"
145+
helmRepoUrl: registry.internal.disconnected.net/validatedpatterns
146+
patternsOperator:
147+
source: cs-community-operator-index-v4-19
148+
gitops:
149+
operatorSource: cs-redhat-operator-index-v4-19
150+
----
151+
152+
=== values-hub.yaml
153+
154+
Configure operator sources for hub-specific components:
155+
156+
[source,yaml]
157+
----
158+
acm:
159+
mce_operator:
160+
source: cs-redhat-operator-index-v4-19
161+
162+
clusterGroup:
163+
subscriptions:
164+
acm:
165+
name: advanced-cluster-management
166+
namespace: open-cluster-management
167+
channel: release-2.14
168+
source: cs-redhat-operator-index-v4-19
169+
----
170+
171+
Commit and push these changes to the disconnected Git server.
172+
173+
== Deploying the pattern
174+
175+
With images mirrored and the pattern configured, deploy from a machine that has
176+
access to both the disconnected cluster and the Git repository:
177+
178+
[source,sh]
179+
----
180+
# Point the installer to the mirrored Helm chart
181+
export PATTERN_DISCONNECTED_HOME=registry.internal.disconnected.net/validatedpatterns
182+
./pattern.sh make install
183+
----
184+
185+
The cluster will converge to the desired state and the pattern will be
186+
installed.
187+
188+
== Adapting this guide for other patterns
189+
190+
The steps above use the {mcg-pattern} as an example. When deploying a different
191+
pattern in a disconnected network:
192+
193+
* Identify all operators required by the pattern and add them to the
194+
`imageset-config.yaml` operator list.
195+
* Identify all additional container images referenced by the pattern's Helm
196+
charts and add them to the `additionalImages` list.
197+
* Update each values file (`values-global.yaml`, `values-hub.yaml`, and any
198+
site-specific values files) to reference the correct catalog source names for
199+
all operator subscriptions.

content/learn/quickstart.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ Before beginning, ensure you have the following:
5555
* An OCI-compliant registry that is accessible from the disconnected network
5656
* A Git Repository that is accessible from the disconnected network
5757

58-
For more information on disconnected installation, see link:/blog/2024-10-12-disconnected/[Validated Patterns in a disconnected Network].
58+
For more information on disconnected installation, see link:/learn/disconnected-installation/[Deploying in a disconnected network].
5959

0 commit comments

Comments
 (0)