Skip to content

Commit 8180a90

Browse files
committed
RHIDP-5351: Apply changes based on feature demos
1 parent 460fa80 commit 8180a90

File tree

1 file changed

+134
-34
lines changed

1 file changed

+134
-34
lines changed

modules/installation/proc-install-rhdh-airgapped-environment-ocp-helm.adoc

Lines changed: 134 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@
66

77
You can install {product} in a fully disconnected or partially disconnected environment using the {product} Helm chart.
88

9+
[role="_additional-resources"]
10+
.Additional resources
11+
* For more information about registry authentication, see https://access.redhat.com/RegistryAuthentication[{company-name} Container Registry Authentication].
12+
913
== Installing {product} on {ocp-short} in a partially disconnected environment with the Helm chart
1014

11-
If your network has access to the `registry.redhat.io` registry and the `charts.openshift.io` Helm Chart repository, you can deploy your {product} instance in your partially disconnected environment by mirroring the specified resources directly to the target registry.
15+
If your network has access to the `registry.redhat.io` registry and the `charts.openshift.io` Helm chart repository, you can deploy your {product} instance in your partially disconnected environment by mirroring the specified resources directly to the target registry.
1216

1317
.Prerequisites
1418

1519
* You have installed {ocp-brand-name} {ocp-version-min} or later.
16-
* You have access to the `registry.redhat.io`.
1720
* You have access to the `charts.openshift.io` Helm chart repository.
21+
* You have access to the `registry.redhat.io`.
1822
* You have access to a mirror registry that can be reached from the disconnected cluster, for example, the {ocp-short} image registry. For more information about exposing the {ocp-short} image registry, see https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html-single/registry/index#securing-exposing-registry[Exposing the registry].
1923
* You are logged in to your target mirror registry and have permissions to push images to it. For more information, see link:https://docs.openshift.com/container-platform/4.17/disconnected/mirroring/installing-mirroring-disconnected.html#installation-adding-registry-pull-secret_installing-mirroring-disconnected[Configuring credentials that allow images to be mirrored].
2024
* You have installed the {openshift-cli} on your workstation.
@@ -30,7 +34,7 @@ oc login -u <user> -p <password> https://api.<hostname>:6443
3034
----
3135

3236
. From your disconnected cluster, log in to the image registry that you want to mirror, for example, the {ocp-short} image registry.
33-
. Create an `ImageSetConfiguration` file, for example, `ImageSetConfiguration.yaml`.
37+
. Create an image set configuration file, for example, `ImageSetConfiguration.yaml`.
3438
. In your `ImageSetConfiguration.yaml` file, specify the resources that you want to mirror. For example:
3539
+
3640
[source,terminal,subs="attributes+"]
@@ -46,29 +50,31 @@ mirror:
4650
- name: <chart-name> (3)
4751
version: "<{product-very-short}-version>" (4)
4852
----
49-
<1> The name of the repository that you want to mirror, for example, `openshift-charts`.
50-
<2> The URL for the repository that you want to mirror, for example, `https://charts.openshift.io`.
51-
<3> The name of the chart that you want to mirror, for example, `redhat-developer-hub`.
52-
<4> The version of {product} that you want to use, for example, `{product-version}`
53+
<1> The name of the repository containing the Helm chart that you want to mirror, for example, `openshift-charts`.
54+
<2> The URL for the repository containing the Helm chart that you want to mirror, for example, `https://charts.openshift.io`.
55+
<3> The name of the Helm chart containing the images that you want to mirror, for example, `redhat-developer-hub`.
56+
<4> The {product} version that you want to use, for example, `{product-version}`
5357

54-
. Mirror the resources specified in the`ImageSetConfiguration` file directly to the target registry using the `oc-mirror` command. For example:
58+
. Mirror the resources specified in the image set configuration file directly to the target registry by running the `oc-mirror` command. For example:
5559
+
5660
[source,terminal,subs="attributes+"]
5761
----
58-
oc-mirror --config=<mirror-configuration-file> <target-mirror-registry>
62+
oc-mirror --config=<mirror-config-directory>/<mirror-configuration-file> <target-mirror-registry>
5963
----
6064
+
6165
--
6266
where:
6367

64-
`<mirror-configuration-file>` :: Specifies the name of your mirror configuration yaml file, for example, `mirror-config.yaml`
68+
`<mirror-config-directory>` :: Specifies the location of your image set configuration file on your system, for example, `.user`.
69+
70+
`<mirror-configuration-file>` :: Specifies the name of your image set configuration file, for example, `ImageSetConfiguration.yaml`.
6571

6672
`<target-mirror-registry>` :: Specifies the location and name of your target mirror registry, for example,`docker://registry.example:5000`.
6773
--
6874
+
6975
[NOTE]
7076
====
71-
Running the `oc-mirror` command creates a `ImageContentSourcePolicy` (ICSP) manifest that you can apply against the cluster in a later step.
77+
Running the `oc-mirror` command creates a local workspace containing the Helm chart and a `ImageContentSourcePolicy` (ICSP) manifest. The ICSP manifest contains an automatically-generated `imageContentSourcePolicy.yaml` file that you must apply against the cluster in a later step.
7278
====
7379
+
7480
.Example output
@@ -78,24 +84,57 @@ Writing image mapping to oc-mirror-workspace/results-1738070846/mapping.txt
7884
Writing ICSP manifests to oc-mirror-workspace/results-1738070846
7985
----
8086
+
81-
. In the `oc-mirror` command output, find the directory containing the Helm chart that you want to use, for example, `mapping.txt`.
82-
. Locate the `ImageContentSourcePolicy` (ICSP) manifest that was automatically generated by running the `oc-mirror` command and apply it against the cluster by running the `oc create` command. For example:
87+
. In your workspace, locate the `imageContentSourcePolicy.yaml` file by running the `ls` command. For example:
8388
+
8489
[source,terminal,subs="attributes+"]
8590
----
86-
oc create -f oc-mirror-workspace/results-1738070846/ImageContentSourcePolicy.yaml
91+
ls <workspace-directory>/<results-directory>
8792
----
93+
+
94+
--
95+
where:
8896

89-
. In your air-gapped environment, deploy the Helm chart to the namespace that you want to use by running the `helm install` command. For example:
97+
`<workspace-directory>` :: Specifies the name of your workspace directory, for example, `oc-mirror-workspace`.
98+
99+
`<results-directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
100+
--
101+
+
102+
. To mirror the Helm chart, deploy the `imageContentSourcePolicy.yaml` file in the disconnected cluster by running the `oc apply` command. For example:
90103
+
91104
[source,terminal,subs="attributes+"]
92105
----
93-
helm install rhdh ./mirror-archive/oc-mirror-workspace/src/charts/redhat-developer-hub-{product-version}.tgz --namespace <your-namespace> --create-namespace
106+
oc apply -f <workspace-directory>/<results-directory>/<image-content-policy-file>
94107
----
95108
+
96109
--
97110
where:
98111

112+
`<workspace-directory>` :: Specifies the name of your workspace directory, for example, `oc-mirror-workspace`.
113+
114+
`<results-directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
115+
116+
`<results-directory>` :: Specifies the name of the image content source policy file, for example, `ImageContentSourcePolicy.yaml `.
117+
--
118+
. In your air-gapped environment, deploy the Helm chart to the namespace that you want to use by running the `helm install` command and `namespace` options. For example:
119+
+
120+
[source,terminal,subs="attributes+"]
121+
----
122+
helm install <rhdh-instance> <workspace-directory>/<results-directory>/<charts-directory>/<archive-file> --namespace <your-namespace> --create-namespace
123+
----
124+
+
125+
--
126+
where:
127+
128+
`<rhdh-instance>` :: Specifies the name of your {product} instance, for example, `my-rhdh`
129+
130+
`<workspace-directory>` :: Specifies the name of your workspace directory, for example, `oc-mirror-workspace`.
131+
132+
`<charts-directory>` :: Specifies the name of the charts directory, for example, `charts`.
133+
134+
`<results-directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
135+
136+
`<archive-file>` :: Specifies the name of the archive file containing the resources that you want to mirror, for example, `redhat-developer-hub-1.4.1.tgz`.
137+
99138
`<your-namespace>` :: Specifies the namespace that you want to deploy the Helm chart to, for example, `{my-product-namespace}`.
100139
--
101140

@@ -113,7 +152,7 @@ helm install redhat-developer-hub./mirror-archive/oc-mirror-workspace/src/charts
113152

114153
== Installing {product} on {ocp-short} in a fully disconnected environment with the Helm chart
115154

116-
You can use the Helm chart to install {product} by mirroring specified resources and transferring them to your air-gapped environment without any connection to the internet.
155+
If your network has access to the registry through a bastion host or physical disk, you can use the Helm chart to install {product} by mirroring specified resources and transferring them to your air-gapped environment without any connection to the internet.
117156

118157
.Prerequisites
119158

@@ -143,27 +182,33 @@ mirror:
143182
----
144183
<1> The name of the repository that you want to mirror, for example, `openshift-charts`.
145184
<2> The URL for the repository that you want to mirror, for example, `https://charts.openshift.io`.
146-
<3> The name of the chart that you want to mirror, for example, `redhat-developer-hub`.
185+
<3> The name of the Helm chart that you want to mirror, for example, `redhat-developer-hub`.
147186
<4> The version of {product} that you want to use, for example, `{product-version}`
148187

149-
. Mirror the resources specified in the `ImageSetConfiguration` file by running the following command:
188+
. Mirror the resources specified in the `ImageSetConfiguration` file by running the `oc-mirror` command. For example:
150189
+
151190
[source,terminal,subs="attributes+"]
152191
----
153-
oc-mirror --config=mirror-config.yaml <mirror-archive-file>
192+
oc-mirror --config=<mirror-config-directory>/<mirror-configuration-file> <mirror-archive-directory>/<mirror-archive-file>
154193
----
155194
+
156195
--
157196
where:
158197

198+
`<mirror-config-directory>` :: Specifies the location of your image set configuration file on your system, for example, `.user`.
199+
200+
`<mirror-configuration-file>` :: Specifies the name of your image set configuration file, for example, `ImageSetConfiguration.yaml`.
201+
159202
`<mirror-configuration-file>` :: Specifies the name of your mirror configuration yaml file, for example, `mirror-config.yaml`
160203

161-
`<mirror-archive-file>` :: Specifies the location and name of `.tar` file containing the mirror archive, for example,`file://mirror-archive`.
204+
`<mirror-archive-directory>` :: Specifies the location of your `.tar` file containing the mirror archive, for example,`.user`.
205+
206+
`<mirror-archive-file>` :: Specifies the location and name of your `.tar` file containing the mirror archive, for example,`file://mirror-archive`.
162207
--
163208
+
164209
[NOTE]
165210
====
166-
Running the `oc-mirror` command creates a `ImageContentSourcePolicy` (ICSP) manifest that you can apply against the cluster in a later step.
211+
Running the `oc-mirror` command creates a local workspace containing the Helm chart and a `ImageContentSourcePolicy` (ICSP) manifest. The ICSP manifest contains an automatically-generated `imageContentSourcePolicy.yaml` file that you must apply against the cluster in a later step.
167212
====
168213
+
169214
.Example output
@@ -173,41 +218,96 @@ Creating archive /path/to/mirror-archive/mirror_seq1_000000.tar
173218
----
174219
+
175220
. Transfer the generated `.tar` archive file (for example, `mirror_seq1_000000.tar`) to the air-gapped environment.
176-
. Connect to following your air-gapped environment and make sure that you are also connected to the following objects:
221+
. Connect to your air-gapped environment and make sure that you are also connected to the following objects:
177222
+
178-
* The target registry
223+
* The local target registry
179224
* The target {ocp-short} cluster
180225
+
181-
. From the air-gapped environment, mirror the resources from the archive to the target registry by running the `oc-mirror` command. For example:
226+
. From your air-gapped environment, mirror the resources from the archive to the target registry by running the `oc-mirror` command. For example:
182227
+
183228
[source,terminal,subs="attributes+"]
184229
----
185-
oc-mirror --from /path/to/mirror_seq1_000000.tar docker://registry.example.com:5000
230+
oc-mirror --from <mirror-archive-file> <target-registry>
186231
----
187232
+
233+
--
234+
where:
235+
236+
`<mirror-archive-file>` :: Specifies the name of the file containing the resources that you want to mirror, for example,`mirror_seq1_0000.tar`.
237+
238+
`<target-registry>` :: Specifies the name of the target registry that you want to push the mirrored images to, for example, `docker://registry.localhost:5000`.
239+
--
240+
+
188241
.Example output
189242
[source,terminal,subs="attributes+"]
190243
----
191244
Wrote release signatures to oc-mirror-workspace/results-1738075410
192245
Writing image mapping to oc-mirror-workspace/results-1738075410/mapping.txt
193246
Writing ICSP manifests to oc-mirror-workspace/results-1738075410
194247
----
195-
. In the `oc-mirror` command output, find the directory containing the Helm chart that you want to use, for example, `mapping.txt`.
196-
. Locate the `ImageContentSourcePolicy` (ICSP) manifest that was automatically generated by running the `oc-mirror` command and apply it against the cluster by running the `oc apply` command. For example:
248+
+
249+
. In your workspace, locate the `imageContentSourcePolicy.yaml` file by running the `ls` command. For example:
197250
+
198251
[source,terminal,subs="attributes+"]
199252
----
200-
oc apply -f oc-mirror-workspace/results-1738070846/ImageContentSourcePolicy.yaml
253+
ls <workspace-directory>/<results-directory>
201254
----
202-
. In your air-gapped environment, deploy the {product} Helm chart. For example:
255+
+
256+
--
257+
where:
258+
259+
`<workspace-directory>` :: Specifies the name of your workspace directory, for example, `oc-mirror-workspace`.
260+
261+
`<results-directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
262+
--
263+
+
264+
. To mirror the Helm chart, deploy the `imageContentSourcePolicy.yaml` file in the disconnected cluster by running the `oc apply` command. For example:
265+
+
266+
[source,terminal,subs="attributes+"]
267+
----
268+
oc apply -f <workspace-directory>/<results-directory>/<image-content-policy-file>
269+
----
270+
+
271+
--
272+
where:
273+
274+
`<workspace-directory>` :: Specifies the name of your workspace directory, for example, `oc-mirror-workspace`.
275+
276+
`<results-directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
277+
278+
`<results-directory>` :: Specifies the name of the image content source policy file, for example, `ImageContentSourcePolicy.yaml `.
279+
--
280+
. In your air-gapped environment, deploy the Helm chart to the namespace that you want to use by running the `helm install` command and `namespace` options. For example:
281+
+
282+
[source,terminal,subs="attributes+"]
283+
----
284+
helm install <rhdh-instance> <workspace-directory>/<results-directory>/<charts-directory>/<archive-file> --namespace <your-namespace> --create-namespace
285+
----
286+
+
287+
--
288+
where:
289+
290+
`<rhdh-instance>` :: Specifies the name of your {product} instance, for example, `my-rhdh`
291+
292+
`<workspace-directory>` :: Specifies the name of your workspace directory, for example, `oc-mirror-workspace`.
203293

294+
`<charts-directory>` :: Specifies the name of the charts directory, for example, `charts`.
295+
296+
`<results-directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
297+
298+
`<archive-file>` :: Specifies the name of the archive file containing the resources that you want to mirror, for example, `redhat-developer-hub-1.4.1.tgz`.
299+
300+
`<your-namespace>` :: Specifies the namespace that you want to deploy the Helm chart to, for example, `{my-product-namespace}`.
301+
--
302+
303+
.Verification
304+
. To verify that all resources are successfully deployed and running, check the status of your deployments and pods in the cluster.
305+
. View the router base URL by entering the following command:
306+
+
204307
[source,terminal,subs="attributes+"]
205308
----
206309
CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')
207310
helm install redhat-developer-hub./mirror-archive/oc-mirror-workspace/src/charts/redhat-developer-hub-1.4.1.tgz \
208311
--set global.clusterRouterBase="$CLUSTER_ROUTER_BASE"
209312
----
210-
211-
[role="_additional-resources"]
212-
.Additional resources
213-
* For more information about registry authentication, see https://access.redhat.com/RegistryAuthentication[{company-name} Container Registry Authentication].
313+
. Ensure that the route matches the expected URL based on the router base of the cluster. If necessary, update the route to align with your expected configuration.

0 commit comments

Comments
 (0)