Skip to content

Commit d9c84fe

Browse files
committed
RHIDP-5351: Apply SME suggestions and add'l changes
1 parent d2ced0d commit d9c84fe

File tree

1 file changed

+112
-110
lines changed

1 file changed

+112
-110
lines changed

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

Lines changed: 112 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -2,203 +2,205 @@
22
// no assembly
33

44
[id="proc-install-rhdh-airgapped-environment-ocp-helm_{context}"]
5-
= Installing {product} in an air-gapped environment with the Helm chart
5+
= Installing {product} on {ocp-short} in an air-gapped environment with the Helm chart
66

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

9-
== Installing {product} in a partially disconnected environment with the Helm chart
9+
== Installing {product} on {ocp-short} in a partially disconnected environment with the Helm chart
1010

11-
If your network has access to the internal {company-name} registries, you can deploy your {product} instance in your partially disconnected environment by mirroring the specified resources directly to the target registry.
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.
1212

1313
.Prerequisites
1414

15-
* You have installed an {ocp-brand-name} {ocp-version-min} or later.
15+
* You have installed {ocp-brand-name} {ocp-version-min} or later.
1616
* You have access to the `registry.redhat.io`.
17-
* You have access to the {ocp-brand-name} image registry of your cluster. For more information about exposing the image registry, see the {ocp-brand-name} documentation about https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html-single/registry/index#securing-exposing-registry[Exposing the registry].
17+
* You have access to the `charts.openshift.io` Helm chart repository.
18+
* 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].
19+
* 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].
1820
* You have installed the {openshift-cli} on your workstation.
19-
* You have installed the `podman` command line tools on your workstation.
2021
* You have installed the oc-mirror {openshift-cli} plugin, for more information see https://docs.openshift.com/container-platform/4.17/disconnected/mirroring/installing-mirroring-disconnected.html#installation-oc-mirror-installing-plugin_installing-mirroring-disconnected[Installing the oc-mirror OpenShift CLI plugin].
2122
* You have an account in https://developers.redhat.com/[{rhdeveloper-name}] portal.
2223

2324
.Procedure
2425
. Log in to your {ocp-short} account using the {openshift-cli} by running the following command:
2526
+
26-
[source,terminal]
27+
[source,terminal,subs="attributes+"]
2728
----
2829
oc login -u <user> -p <password> https://api.<hostname>:6443
2930
----
3031

31-
. Log in to the {ocp-short} image registry using the `podman` command line tool by running the following command:
32+
. 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`.
34+
. In your `ImageSetConfiguration.yaml` file, specify the resources that you want to mirror. For example:
3235
+
33-
[source,terminal]
36+
[source,terminal,subs="attributes+"]
3437
----
35-
podman login -u kubeadmin -p $(oc whoami -t) default-route-openshift-image-registry.<hostname>
38+
apiVersion: mirror.openshift.io/v1alpha2
39+
kind: ImageSetConfiguration
40+
mirror:
41+
helm:
42+
repositories:
43+
- name: <repository-name> (1)
44+
url: <repository-url> (2)
45+
charts:
46+
- name: <chart-name> (3)
47+
version: "<{product-very-short}-version>" (4)
3648
----
37-
+
38-
[NOTE]
39-
====
40-
You can run the following commands to get the full host name of the {ocp-short} image registry, and then use the host name in a command to log in:
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}`
4153

42-
[source,terminal]
54+
. Mirror the resources specified in the`ImageSetConfiguration` file directly to the target registry using the `oc-mirror` command. For example:
55+
+
56+
[source,terminal,subs="attributes+"]
4357
----
44-
REGISTRY_HOST=$(oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}')
58+
oc-mirror --config=<mirror-configuration-file> <target-mirror-registry>
4559
----
60+
+
61+
--
62+
where:
4663

47-
[source,terminal]
48-
----
49-
podman login -u kubeadmin -p $(oc whoami -t) $REGISTRY_HOST
50-
----
51-
====
64+
`<mirror-configuration-file>` :: Specifies the name of your mirror configuration yaml file, for example, `mirror-config.yaml`
5265

53-
. Log in to the `registry.redhat.io` in `podman` by running the following command:
54-
+
55-
[source,terminal]
56-
----
57-
podman login registry.redhat.io
58-
----
66+
`<target-mirror-registry>` :: Specifies the location and name of your target mirror registry, for example,`docker://registry.example:5000`.
67+
--
5968
+
60-
. Create an `ImageSetConfiguration` file to specify the resources that you want to mirror. For example:
69+
[NOTE]
70+
====
71+
Running the `oc-mirror` command creates a `ImageContentSourcePolicy` (ICSP) manifest that you can apply against the cluster in a later step.
72+
====
6173
+
62-
[source,terminal]
74+
.Example output
75+
[source,terminal,subs="attributes+"]
6376
----
64-
apiVersion: mirror.openshift.io/v1alpha2
65-
kind: ImageSetConfiguration
66-
storageConfig:
67-
local:
68-
path: ./mirror-output
69-
mirror:
70-
helm:
71-
repositories:
72-
- name: openshift-charts
73-
url: https://charts.openshift.io
74-
charts:
75-
- name: redhat-developer-hub
76-
version: "{product-version}"
77+
Writing image mapping to oc-mirror-workspace/results-1738070846/mapping.txt
78+
Writing ICSP manifests to oc-mirror-workspace/results-1738070846
7779
----
78-
. Mirror the resources specified in the`ImageSetConfiguration` file directly to the target registry by running the following command:
7980
+
80-
[source,terminal]
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:
83+
+
84+
[source,terminal,subs="attributes+"]
8185
----
82-
oc-mirror --config=mirror-config.yaml file://mirror-archive
86+
oc create -f oc-mirror-workspace/results-1738070846/ImageContentSourcePolicy.yaml
8387
----
84-
. In your air-gapped environment, deploy the Helm chart to the `rhdh` namespace by running the `helm install` command. For example:
88+
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:
8590
+
8691
[source,terminal,subs="attributes+"]
8792
----
88-
helm install rhdh ./mirror-archive/oc-mirror-workspace/src/charts/redhat-developer-hub-{product-version}.tgz --namespace rhdh --create-namespace
93+
helm install rhdh ./mirror-archive/oc-mirror-workspace/src/charts/redhat-developer-hub-{product-version}.tgz --namespace <your-namespace> --create-namespace
8994
----
95+
+
96+
--
97+
where:
98+
99+
`<your-namespace>` :: Specifies the namespace that you want to deploy the Helm chart to, for example, `{my-product-namespace}`.
100+
--
90101

91102
.Verification
92103
. To verify that all resources are successfully deployed and running, check the status of your deployments and pods in the cluster.
93-
. To validate the route, ensure that the route matches the expected URL based on the router base of the cluster.
94-
.. If necessary, update the route to align with your expected configuration.
104+
. View the router base URL by entering the following command:
105+
+
106+
[source,terminal,subs="attributes+"]
107+
----
108+
CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')
109+
helm install redhat-developer-hub./mirror-archive/oc-mirror-workspace/src/charts/redhat-developer-hub-1.4.1.tgz \
110+
--set global.clusterRouterBase="$CLUSTER_ROUTER_BASE"
111+
----
112+
. 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.
95113

96-
== Installing {product} in a fully disconnected environment with the Helm chart
114+
== Installing {product} on {ocp-short} in a fully disconnected environment with the Helm chart
97115

98116
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.
99117

100118
.Prerequisites
101119

102120
* You have installed {ocp-brand-name} {ocp-version-min} or later.
103121
* You have access to the `registry.redhat.io`.
104-
* You have access to the {ocp-brand-name} image registry for your cluster. For more information about exposing the image registry, see the {ocp-brand-name} documentation about https://docs.openshift.com/container-platform/{ocp-version}/registry/securing-exposing-registry.html[Exposing the registry].
122+
* You have access to a mirror registry that can be reached from the disconnected cluster, for example, the {ocp-brand-name} 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].
105123
* You have installed the {openshift-cli} on your workstation.
106-
* You have installed the `podman` command line tools on your workstation.
124+
* 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].
107125
* You have installed the oc-mirror {openshift-cli} plugin, for more information see https://docs.openshift.com/container-platform/4.17/disconnected/mirroring/installing-mirroring-disconnected.html#installation-oc-mirror-installing-plugin_installing-mirroring-disconnected[Installing the oc-mirror OpenShift CLI plugin].
108126
* You have an account in https://developers.redhat.com/[{rhdeveloper-name}] portal.
109127

110128
.Procedure
111-
112-
. Log in to your {ocp-short} account using the {openshift-cli} by running the following command:
113-
+
114-
[source,terminal]
115-
----
116-
oc login -u <user> -p <password> https://api.<hostname>:6443
117-
----
118-
119-
. Log in to the {ocp-short} image registry using the `podman` command line tool by running the following command:
120-
+
121-
[source,terminal]
122-
----
123-
podman login -u kubeadmin -p $(oc whoami -t) default-route-openshift-image-registry.<hostname>
124-
----
125-
+
126-
[NOTE]
127-
====
128-
You can run the following commands to get the full host name of the {ocp-short} image registry, and then use the host name in a command to log in:
129-
130-
[source,terminal]
131-
----
132-
REGISTRY_HOST=$(oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}')
133-
----
134-
135-
[source,terminal]
136-
----
137-
podman login -u kubeadmin -p $(oc whoami -t) $REGISTRY_HOST
138-
----
139-
====
140-
141-
. Log in to the `registry.redhat.io` in `podman` by running the following command:
142-
+
143-
[source,terminal]
144-
----
145-
podman login registry.redhat.io
146-
----
147-
+
148129
. Create an `ImageSetConfiguration` file to specify the resources that you want to mirror. For example:
149130
+
150-
[source,terminal]
131+
[source,terminal,subs="attributes+"]
151132
----
152133
apiVersion: mirror.openshift.io/v1alpha2
153134
kind: ImageSetConfiguration
154-
storageConfig:
155-
local:
156-
path: ./mirror-output
157135
mirror:
158136
helm:
159137
repositories:
160138
- name: openshift-charts
161139
url: https://charts.openshift.io
162-
charts:
163140
- name: redhat-developer-hub
164141
version: "{product-version}"
165142
----
166-
. Mirror the resources specified in the`ImageSetConfiguration` file by running the following command:
143+
. Mirror the resources specified in the `ImageSetConfiguration` file by running the following command:
144+
+
145+
[source,terminal,subs="attributes+"]
146+
----
147+
oc-mirror --config=mirror-config.yaml <mirror-archive-file>
148+
----
149+
+
150+
--
151+
where:
152+
153+
`<mirror-configuration-file>` :: Specifies the name of your mirror configuration yaml file, for example, `mirror-config.yaml`
154+
155+
`<mirror-archive-file>` :: Specifies the location and name of `.tar` file containing the mirror archive, for example,`file://mirror-archive`.
156+
--
157+
+
158+
[NOTE]
159+
====
160+
Running the `oc-mirror` command creates a `ImageContentSourcePolicy` (ICSP) manifest that you can apply against the cluster in a later step.
161+
====
167162
+
168-
[source,terminal]
163+
.Example output
164+
[source,terminal,subs="attributes+"]
169165
----
170-
oc-mirror --config=mirror-config.yaml file://mirror-archive
166+
Creating archive /path/to/mirror-archive/mirror_seq1_000000.tar
171167
----
172-
. Transfer the generated `.tar` archive file (for example, `mirror++_++seq1++_++000000.tar`) to the air-gapped environment using `scp` or another file transfer tool. For example:
173168
+
174-
[source,terminal]
169+
. Transfer the generated `.tar` archive file (for example, `mirror_seq1_000000.tar`) to the air-gapped environment.
170+
. Connect to following your air-gapped environment and make sure that you are also connected to the following objects:
171+
+
172+
* The target registry
173+
* The target {ocp-short} cluster
174+
+
175+
. From the air-gapped environment, mirror the resources from the archive to the target registry by running the `oc-mirror` command. For example:
176+
+
177+
[source,terminal,subs="attributes+"]
175178
----
176-
scp ./mirror-archive/mirror_seq1_000000.tar /tmp
179+
oc-mirror --from /path/to/mirror_seq1_000000.tar docker://registry.example.com:5000
177180
----
178-
. Extract the contents of the archive into a directory (for example, `/tmp`) by running the `tar` command. For example:
179181
+
180-
[source,terminal]
182+
.Example output
183+
[source,terminal,subs="attributes+"]
181184
----
182-
tar -xvf /mirror-archive/mirror_seq1_000000.tar -C /tmp
185+
Wrote release signatures to oc-mirror-workspace/results-1738075410
186+
Writing image mapping to oc-mirror-workspace/results-1738075410/mapping.txt
187+
Writing ICSP manifests to oc-mirror-workspace/results-1738075410
183188
----
184-
. In your air-gapped environment, deploy the Helm chart to the `rhdh` namespace by running the `helm install` command. For example:
189+
. In the `oc-mirror` command output, find the directory containing the Helm chart that you want to use, for example, `mapping.txt`.
190+
. 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:
185191
+
186192
[source,terminal,subs="attributes+"]
187193
----
188-
helm install rhdh ./mirror-archive/oc-mirror-workspace/src/charts/redhat-developer-hub-{product-version}.tgz --namespace rhdh --create-namespace
194+
oc apply -f oc-mirror-workspace/results-1738070846/ImageContentSourcePolicy.yaml
189195
----
196+
. In your air-gapped environment, deploy the {product} Helm chart. For example:
190197

191-
.Verification
192-
. To verify that all resources are successfully deployed and running, check the status of your deployments and pods in the cluster.
193-
. View the router base URL by entering the following command:
194-
+
195198
[source,terminal,subs="attributes+"]
196199
----
197200
CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')
198201
helm install redhat-developer-hub./mirror-archive/oc-mirror-workspace/src/charts/redhat-developer-hub-1.4.1.tgz \
199202
--set global.clusterRouterBase="$CLUSTER_ROUTER_BASE"
200203
----
201-
. 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.
202204

203205
[role="_additional-resources"]
204206
.Additional resources

0 commit comments

Comments
 (0)