Skip to content

Commit 61424d1

Browse files
Merge pull request #642 from mbaldessari/disconnected-topic
Disconnected doc section
2 parents c8ff9ca + 2097e12 commit 61424d1

2 files changed

Lines changed: 186 additions & 1 deletion

File tree

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
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+
= Deploy a validated pattern in a disconnected network
16+
17+
A disconnected network is an infrastructure isolated from external internet access.
18+
Deploying {solution-name-upstream} in this environment requires mirroring container images, configuring internal registries, and adjusting pattern configuration files.
19+
20+
This guide describes deploying the {mcg-pattern} on {ocp} 4.19 in a disconnected network.
21+
The same approach applies to other validated patterns, although the required images and Operators vary by pattern.
22+
23+
.Prerequisites
24+
25+
* One or more {ocp} clusters deployed in a disconnected network.
26+
* An OCI-compliant registry accessible from the disconnected network, referred to as `registry.internal.disconnected.net` in this guide.
27+
* A Git repository accessible from the disconnected network.
28+
* (Optional) A virtual machine (VM) in the disconnected network to run commands.
29+
30+
[NOTE]
31+
====
32+
Deploying {ocp} in a disconnected network is outside the scope of this guide. For details, see the link: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] for details.
33+
====
34+
35+
[id="mirror-images"]
36+
== 1. Mirror required container images to an internal registry
37+
38+
Mirror all required container images to the internal registry.
39+
The specific images you mirror depend on the pattern, the {ocp} version, and the required Operators. The example here mirrors images for the Multicloud GitOps pattern.
40+
41+
.Procedure
42+
43+
. Create an `imageset-config.yaml` file that lists the required platform images, Operators, and additional images:
44+
+
45+
[source,yaml]
46+
----
47+
kind: ImageSetConfiguration
48+
apiVersion: mirror.openshift.io/v2alpha1
49+
mirror:
50+
platform:
51+
graph: true
52+
channels:
53+
- name: stable-4.19
54+
type: ocp
55+
operators:
56+
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.19
57+
packages:
58+
- name: lvms-operator
59+
- name: advanced-cluster-management
60+
channels:
61+
- name: release-2.14
62+
- name: openshift-external-secrets-operator
63+
channels:
64+
- name: stable-v1
65+
- name: multicluster-engine
66+
channels:
67+
- name: stable-2.9
68+
- name: openshift-gitops-operator
69+
channels:
70+
- name: gitops-1.19
71+
- catalog: registry.redhat.io/redhat/community-operator-index:v4.19
72+
packages:
73+
- name: patterns-operator
74+
additionalImages:
75+
- name: registry.redhat.io/ubi9/ubi-minimal:latest
76+
- name: registry.connect.redhat.com/hashicorp/vault:1.20.2-ubi
77+
- name: registry.access.redhat.com/ubi8/httpd-24:10.0-1755779646
78+
- name: ghcr.io/external-secrets/external-secrets:v0.10.2-ubi
79+
# Validated Patterns Helm charts
80+
- name: quay.io/validatedpatterns/acm:0.1.17
81+
- name: quay.io/validatedpatterns/clustergroup:0.9.41
82+
- name: quay.io/validatedpatterns/gitea:0.0.3
83+
- name: quay.io/validatedpatterns/golang-external-secrets:0.1.5
84+
- name: quay.io/validatedpatterns/openshift-external-secrets:0.0.3
85+
- name: quay.io/validatedpatterns/hashicorp-vault:0.1.6
86+
- name: quay.io/validatedpatterns/utility-container:latest
87+
- name: quay.io/validatedpatterns/imperative-container:v1
88+
- name: quay.io/validatedpatterns/pattern-install:0.0.11
89+
- name: docker.io/gitea/gitea:1.22.6-rootless
90+
----
91+
92+
. Run the mirror command and specify a local cache directory and the target registry:
93+
+
94+
[source,terminal]
95+
----
96+
oc mirror --config=/var/cache/oc-mirror/imageset-config.yaml \
97+
--workspace file:///var/cache/oc-mirror/workspace \
98+
docker://registry.internal.disconnected.net --v2 <1>
99+
----
100+
<1> The example uses the `--v2` flag to mirror images.
101+
+
102+
When mirroring completes, `oc mirror` generates resource files in the `/var/cache/oc-mirror/workspace/working-dir/cluster-resources` directory.
103+
104+
. Apply the generated resource files to the cluster so that the cluster can resolve images from the internal registry:
105+
+
106+
[source,terminal]
107+
----
108+
cd /var/cache/oc-mirror/workspace/working-dir/cluster-resources
109+
oc apply -f cs-community-operator-index-v4-19.yaml \
110+
cs-redhat-operator-index-v4-19.yaml idms-oc-mirror.yaml \
111+
itms-oc-mirror.yaml
112+
----
113+
+
114+
[IMPORTANT]
115+
====
116+
The catalog source names generated by the `oc mirror` command, such as `cs-redhat-operator-index-v4-19`, are required to configure the pattern values files. Do not change these names.
117+
====
118+
119+
[id="configure-pattern"]
120+
== 2. Configure the pattern for disconnected use
121+
122+
Update the pattern values files to reference the mirrored catalog sources and the internal Helm chart registry.
123+
Verify that the `origin` remote for the local Git clone points to the disconnected Git server by running the `git remote -v` command.
124+
125+
.Procedure
126+
127+
. In the `values-global.yaml` file, point the Helm chart repository to the internal registry and configure operator sources:
128+
+
129+
[source,yaml]
130+
----
131+
main:
132+
multiSourceConfig:
133+
enabled: true
134+
clusterGroupChartVersion: "0.9.*"
135+
helmRepoUrl: registry.internal.disconnected.net/validatedpatterns
136+
patternsOperator:
137+
source: cs-community-operator-index-v4-19 <1>
138+
gitops:
139+
operatorSource: cs-redhat-operator-index-v4-19 <1>
140+
----
141+
<1> The catalog source names must match the generated catalog sources from the `oc mirror` command.
142+
143+
. In the `values-hub.yaml` file, configure operator sources for hub-specific components:
144+
+
145+
[source,yaml]
146+
----
147+
acm:
148+
mce_operator:
149+
source: cs-redhat-operator-index-v4-19
150+
151+
clusterGroup:
152+
subscriptions:
153+
acm:
154+
name: advanced-cluster-management
155+
namespace: open-cluster-management
156+
channel: release-2.14
157+
source: cs-redhat-operator-index-v4-19
158+
----
159+
160+
. Commit and push these changes to the disconnected Git server.
161+
162+
[id="deploy-pattern"]
163+
== 3. Deploy the pattern
164+
165+
After mirroring images and configuring the pattern, deploy the pattern from a machine that has access to the disconnected cluster and the Git repository.
166+
167+
.Procedure
168+
169+
* Point the installation program to the mirrored Helm chart registry and deploy the pattern:
170+
+
171+
[source,terminal]
172+
----
173+
export PATTERN_DISCONNECTED_HOME=registry.internal.disconnected.net/validatedpatterns
174+
./pattern.sh make install
175+
----
176+
+
177+
The cluster converges to the specified state and the pattern installs.
178+
179+
== Adapting this guide for other patterns
180+
181+
When deploying a different pattern in a disconnected network:
182+
183+
* Identify all Operators required by the pattern and add them to the Operators list in the `imageset-config.yaml` file.
184+
* Identify all additional container images referenced by the pattern Helm charts and add them to the `additionalImages` list.
185+
* Update the `values-global.yaml`, `values-hub.yaml`, and site-specific values files to reference the correct catalog source names for 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)