Skip to content

Commit 5b909d1

Browse files
Update the Helm procedure to use oc-mirror for air-gapped environments
Signed-off-by: Fortune Ndlovu <[email protected]>
1 parent 952e6c7 commit 5b909d1

File tree

1 file changed

+42
-59
lines changed

1 file changed

+42
-59
lines changed

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

Lines changed: 42 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
An air-gapped environment, also known as an air-gapped network or isolated network, ensures security by physically segregating the system or network. This isolation is established to prevent unauthorized access, data transfer, or communication between the air-gapped system and external sources.
88

9-
You can install {product} in an air-gapped environment to ensure security and meet specific regulatory requirements.
9+
This documentation outlines the steps to perform an air-gapped installation of Helm charts using the `oc-mirror` tool. The process ensures that all necessary resources are mirrored and deployed within a restricted environment.
1010

1111
To install {product-short} in an air-gapped environment, you must have access to the `registry.redhat.io` and the registry for the air-gapped environment.
1212

@@ -17,7 +17,8 @@ To install {product-short} in an air-gapped environment, you must have access to
1717
* 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.openshift.com/container-platform/{ocp-version}/registry/securing-exposing-registry.html[Exposing the registry].
1818
* You have installed the {openshift-cli} on your workstation.
1919
* You have installed the `podman` command line tools on your workstation.
20-
* You you have an account in https://developers.redhat.com/[{rhdeveloper-name}] portal.
20+
* You have installed the `oc-mirror`, review 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].
21+
* You have an account in https://developers.redhat.com/[{rhdeveloper-name}] portal.
2122

2223
.Procedure
2324

@@ -59,80 +60,62 @@ podman login registry.redhat.io
5960
+
6061
For more information about registry authentication, see https://access.redhat.com/RegistryAuthentication[{company-name} Container Registry Authentication].
6162

62-
. Pull {product-short} and PostgreSQL images from https://catalog.redhat.com/software/containers/search[{company-name} Image registry] to your workstation, by running the following commands:
63+
. Create an `ImageSetConfiguration` file to specify the resources that
64+
need to be mirrored.
6365
+
64-
[source,terminal,source,subs="attributes+"]
65-
----
66-
podman pull registry.redhat.io/rhdh/rhdh-hub-rhel9:{product-version}
67-
----
68-
+
69-
[source,terminal,source,subs="attributes+"]
70-
----
71-
podman pull registry.redhat.io/rhel9/postgresql-15:latest
72-
----
73-
74-
. Push both images to the internal {ocp-short} image registry by running the following commands:
75-
+
76-
[source,terminal,source,subs="attributes+"]
77-
----
78-
podman push --remove-signatures registry.redhat.io/rhdh/rhdh-hub-rhel9:{product-version} default-route-openshift-image-registry.<hostname>/<project_name>/rhdh-hub-rhel9:{product-version}
79-
----
66+
Example *imageset-config-ref.yaml*
8067
+
8168
[source,terminal]
8269
----
83-
podman push --remove-signatures registry.redhat.io/rhel9/postgresql-15:latest default-route-openshift-image-registry.<hostname>/<project_name>/postgresql-15:latest
84-
----
85-
+
86-
For more information about pushing images directly to the {ocp-short} image registry, see https://access.redhat.com/solutions/6959306[How do I push an Image directly into the OpenShift 4 registry].
87-
+
88-
[IMPORTANT]
89-
====
90-
If an x509 error occurs, verify that you have link:https://access.redhat.com/solutions/6088891[installed the CA certificate used for {ocp-short} routes on your system].
91-
====
92-
93-
. Use the following command to verify that both images are present in the internal {ocp-short} registry:
70+
apiVersion: mirror.openshift.io/v1alpha2
71+
kind: ImageSetConfiguration
72+
storageConfig:
73+
local:
74+
path: ./mirror-output
75+
mirror:
76+
helm:
77+
repositories:
78+
- name: openshift-charts
79+
url: https://charts.openshift.io
80+
charts:
81+
- name: redhat-developer-hub
82+
version: "1.4.1"
83+
additionalImages:
84+
- name: registry.redhat.io/rhdh/rhdh-hub-rhel9:1.4-1737055846
85+
- name: registry.redhat.io/rhel9/postgresql-15:latest
86+
----
87+
. Run the mirroring process on the ImageSetConfiguration file. Use the
88+
`oc-mirror` command to mirror the specified resources based on the
89+
configuration file. his command generates a `.tar` archive that contains
90+
all the mirrored resources.
9491
+
9592
[source,terminal]
9693
----
97-
oc get imagestream -n <project_name>
94+
oc-mirror --config=imageset-config-ref.yaml **** file://mirror-archive
9895
----
99-
100-
. Enable local image lookup for both images by running the following commands:
96+
. Transfer the generated archive (e.g.,
97+
`mirror++_++seq1++_++000000.tar`) to the air-gapped environment using
98+
`scp` or another file transfer tool.
10199
+
102100
[source,terminal]
103101
----
104-
oc set image-lookup postgresql-15
102+
scp ./mirror-archive/mirror_seq1_000000.tar /tmp
105103
----
104+
. Extract the contents of the archive into a directory before proceeding
105+
with deployment.
106106
+
107107
[source,terminal]
108108
----
109-
oc set image-lookup rhdh-hub-rhel9
109+
tar -xvf /mirror-archive/mirror_seq1_000000.tar -C /tmp
110110
----
111-
112-
. Go to *YAML view* and update the `image` section for `backstage` and `postgresql` using the following values:
111+
. Deploy the Helm chart in the air-gapped environment using the `helm`
112+
command.
113113
+
114-
--
115-
.Example values for Developer Hub image
116-
[source,yaml]
117-
----
118-
upstream:
119-
backstage:
120-
image:
121-
registry: ""
122-
repository: rhdh-hub-rhel9
123-
tag: latest
124-
----
125-
126-
.Example values for PostgreSQL image
127-
[source,yaml]
114+
[source,terminal]
128115
----
129-
upstream:
130-
postgresql:
131-
image:
132-
registry: ""
133-
repository: postgresql-15
134-
tag: latest
116+
helm install rhdh ./mirror-archive/oc-mirror-workspace/src/charts/redhat-developer-hub-1.4.1.tgz --namespace rhdh --create-namespace
135117
----
136-
--
137118

138-
. Install the {product} using Helm chart.
119+
Verify that all resources are successfully deployed and running.
120+
Depending on the cluster’s router base, ensure the route matches the
121+
expected URL. If necessary, update the route.

0 commit comments

Comments
 (0)