Skip to content

Commit 48069cb

Browse files
jmagakGitHub Actions
and
GitHub Actions
authored
RHIDP-6397: Modularize air-gapped installation doc Helm (redhat-developer#1012)
* Modularize air-gapped installation doc Helm * Modularize air-gapped installation doc Helm * Modularize air-gapped installation doc Helm * Modularize air-gapped installation doc Helm --------- Co-authored-by: GitHub Actions <[email protected]>
1 parent e1e8dfb commit 48069cb

File tree

4 files changed

+141
-140
lines changed

4 files changed

+141
-140
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[id="assembly-install-rhdh-airgapped-environment-ocp-helm_{context}"]
2+
= Installing {product} on {ocp-short} in an air-gapped environment with the Helm chart
3+
4+
You can install {product} in a fully disconnected or partially disconnected environment using the {product} Helm chart.
5+
6+
[role="_additional-resources"]
7+
.Additional resources
8+
* For more information about registry authentication, see https://access.redhat.com/RegistryAuthentication[{company-name} Container Registry Authentication].
9+
10+
include::modules/installation/proc-install-rhdh-helm-airgapped-full.adoc[leveloffset=+1]
11+
12+
include::modules/installation/proc-install-rhdh-helm-airgapped-partial.adoc[leveloffset=+1]
Original file line numberDiff line numberDiff line change
@@ -1,141 +1,5 @@
1-
// Module included in the following assemblies:
2-
// no assembly
3-
4-
[id="proc-install-rhdh-airgapped-environment-ocp-helm_{context}"]
5-
= Installing {product} on {ocp-short} in an air-gapped environment with the Helm chart
6-
7-
You can install {product} in a fully disconnected or partially disconnected environment using the {product} Helm chart.
8-
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-
13-
== Installing {product} on {ocp-short} in a partially disconnected environment with the Helm chart
14-
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.
16-
17-
.Prerequisites
18-
19-
* You have installed {ocp-brand-name} {ocp-version-min} or later.
20-
* You have access to the `charts.openshift.io` Helm chart repository.
21-
* You have access to the `registry.redhat.io`.
22-
* 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].
23-
* 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].
24-
* You have installed the {openshift-cli} on your workstation.
25-
* 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].
26-
* You have an account in https://developers.redhat.com/[{rhdeveloper-name}] portal.
27-
28-
.Procedure
29-
. Log in to your {ocp-short} account using the {openshift-cli} by running the following command:
30-
+
31-
[source,terminal,subs="attributes+"]
32-
----
33-
oc login -u <user> -p <password> https://api.<hostname>:6443
34-
----
35-
36-
. From your disconnected cluster, log in to the image registry that you want to mirror, for example, the {ocp-short} image registry.
37-
. Create an `ImageSetConfiguration.yaml` file.
38-
. In your `ImageSetConfiguration.yaml` file, specify the resources that you want to mirror. For example:
39-
+
40-
[source,terminal,subs="+quotes"]
41-
----
42-
apiVersion: mirror.openshift.io/v1alpha2
43-
kind: ImageSetConfiguration
44-
mirror:
45-
helm:
46-
repositories:
47-
- name: _<repository_name>_ (1)
48-
url: _<repository_url>_ (2)
49-
charts:
50-
- name: _<chart_name>_ (3)
51-
version: "_<rhdh_version>_" (4)
52-
----
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}`
57-
58-
. Mirror the resources specified in the image set configuration file directly to the target registry by running the `oc-mirror` command. For example:
59-
+
60-
[source,terminal,subs="+quotes"]
61-
----
62-
oc-mirror --config=_<mirror_config_directory>_/ImageSetConfiguration.yaml _<target-mirror-registry>_
63-
----
64-
+
65-
--
66-
where:
67-
68-
`<mirror_config_directory>` :: Specifies the location of your image set configuration file on your system, for example, `.user`.
69-
70-
`<target_mirror_registry>` :: Specifies the location and name of your target mirror registry, for example,`docker://registry.example:5000`.
71-
--
72-
+
73-
[NOTE]
74-
====
75-
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.
76-
====
77-
+
78-
.Example output
79-
[source,terminal,subs="+quotes"]
80-
----
81-
Writing image mapping to oc-mirror-workspace/results-1738070846/mapping.txt
82-
Writing ICSP manifests to oc-mirror-workspace/results-1738070846
83-
----
84-
+
85-
. In your workspace, locate the `imageContentSourcePolicy.yaml` file by running the `ls` command. For example:
86-
+
87-
[source,terminal,subs="+quotes"]
88-
----
89-
ls _<workspace_directory>_/_<results_directory>_
90-
----
91-
+
92-
--
93-
where:
94-
95-
`<workspace_directory>` :: Specifies the name of your workspace directory, for example, `oc-mirror-workspace`.
96-
97-
`<results_directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
98-
--
99-
+
100-
. To mirror the Helm chart, deploy the `imageContentSourcePolicy.yaml` file in the disconnected cluster by running the `oc apply` command. For example:
101-
+
102-
[source,terminal,subs="+quotes"]
103-
----
104-
oc apply -f _<workspace_directory>_/_<results_directory>_/`ImageContentSourcePolicy.yaml`
105-
----
106-
+
107-
--
108-
where:
109-
110-
`<workspace_directory>` :: Specifies the name of your workspace directory, for example, `oc-mirror-workspace`.
111-
112-
`<results_directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
113-
--
114-
. In your air-gapped environment, deploy the Helm chart to the namespace that you want to use by running the `helm install` command with `namespace` and `set` options. For example:
115-
+
116-
[source,terminal,subs="+quotes"]
117-
----
118-
CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')
119-
120-
helm install _<rhdh_instance>_ _<workspace_directory>_/_<results_directory>_/charts/_<archive_file>_ --namespace _<your_namespace>_ --create-namespace \
121-
--set global.clusterRouterBase="$CLUSTER_ROUTER_BASE"
122-
----
123-
+
124-
--
125-
where:
126-
127-
`<rhdh_instance>` :: Specifies the name of your {product} instance, for example, `my-rhdh`.
128-
129-
`<workspace_directory>` :: Specifies the name of your workspace directory, for example, `oc-mirror-workspace`.
130-
131-
`<results_directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
132-
133-
`<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`.
134-
135-
`<your_namespace>` :: Specifies the namespace that you want to deploy the Helm chart to, for example, `{my-product-namespace}`.
136-
--
137-
138-
== Installing {product} on {ocp-short} in a fully disconnected environment with the Helm chart
1+
[id="proc-install-rhdh-helm-airgapped-full.adoc_{context}"]
2+
= Installing {product} on {ocp-short} in a fully disconnected environment with the Helm chart
1393

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

@@ -282,4 +146,4 @@ where:
282146
`<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`.
283147

284148
`<your_namespace>` :: Specifies the namespace that you want to deploy the Helm chart to, for example, `{my-product-namespace}`.
285-
--
149+
--
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
[id="proc-install-rhdh-helm-airgapped-partial.adoc_{context}"]
2+
= Installing {product} on {ocp-short} in a partially disconnected environment with the Helm chart
3+
4+
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.
5+
6+
.Prerequisites
7+
8+
* You have installed {ocp-brand-name} {ocp-version-min} or later.
9+
* You have access to the `charts.openshift.io` Helm chart repository.
10+
* You have access to the `registry.redhat.io`.
11+
* 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].
12+
* 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].
13+
* You have installed the {openshift-cli} on your workstation.
14+
* 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].
15+
* You have an account in https://developers.redhat.com/[{rhdeveloper-name}] portal.
16+
17+
.Procedure
18+
. Log in to your {ocp-short} account using the {openshift-cli} by running the following command:
19+
+
20+
[source,terminal,subs="attributes+"]
21+
----
22+
oc login -u <user> -p <password> https://api.<hostname>:6443
23+
----
24+
25+
. From your disconnected cluster, log in to the image registry that you want to mirror, for example, the {ocp-short} image registry.
26+
. Create an `ImageSetConfiguration.yaml` file.
27+
. In your `ImageSetConfiguration.yaml` file, specify the resources that you want to mirror. For example:
28+
+
29+
[source,terminal,subs="+quotes"]
30+
----
31+
apiVersion: mirror.openshift.io/v1alpha2
32+
kind: ImageSetConfiguration
33+
mirror:
34+
helm:
35+
repositories:
36+
- name: _<repository_name>_ (1)
37+
url: _<repository_url>_ (2)
38+
charts:
39+
- name: _<chart_name>_ (3)
40+
version: "_<rhdh_version>_" (4)
41+
----
42+
<1> The name of the repository containing the Helm chart that you want to mirror, for example, `openshift-charts`.
43+
<2> The URL for the repository containing the Helm chart that you want to mirror, for example, `https://charts.openshift.io`.
44+
<3> The name of the Helm chart containing the images that you want to mirror, for example, `redhat-developer-hub`.
45+
<4> The {product} version that you want to use, for example, `{product-version}`
46+
47+
. Mirror the resources specified in the image set configuration file directly to the target registry by running the `oc-mirror` command. For example:
48+
+
49+
[source,terminal,subs="+quotes"]
50+
----
51+
oc-mirror --config=_<mirror_config_directory>_/ImageSetConfiguration.yaml _<target-mirror-registry>_
52+
----
53+
+
54+
--
55+
where:
56+
57+
`<mirror_config_directory>` :: Specifies the location of your image set configuration file on your system, for example, `.user`.
58+
59+
`<target_mirror_registry>` :: Specifies the location and name of your target mirror registry, for example,`docker://registry.example:5000`.
60+
--
61+
+
62+
[NOTE]
63+
====
64+
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.
65+
====
66+
+
67+
.Example output
68+
[source,terminal,subs="+quotes"]
69+
----
70+
Writing image mapping to oc-mirror-workspace/results-1738070846/mapping.txt
71+
Writing ICSP manifests to oc-mirror-workspace/results-1738070846
72+
----
73+
+
74+
. In your workspace, locate the `imageContentSourcePolicy.yaml` file by running the `ls` command. For example:
75+
+
76+
[source,terminal,subs="+quotes"]
77+
----
78+
ls _<workspace_directory>_/_<results_directory>_
79+
----
80+
+
81+
--
82+
where:
83+
84+
`<workspace_directory>` :: Specifies the name of your workspace directory, for example, `oc-mirror-workspace`.
85+
86+
`<results_directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
87+
--
88+
+
89+
. To mirror the Helm chart, deploy the `imageContentSourcePolicy.yaml` file in the disconnected cluster by running the `oc apply` command. For example:
90+
+
91+
[source,terminal,subs="+quotes"]
92+
----
93+
oc apply -f _<workspace_directory>_/_<results_directory>_/`ImageContentSourcePolicy.yaml`
94+
----
95+
+
96+
--
97+
where:
98+
99+
`<workspace_directory>` :: Specifies the name of your workspace directory, for example, `oc-mirror-workspace`.
100+
101+
`<results_directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
102+
--
103+
. In your air-gapped environment, deploy the Helm chart to the namespace that you want to use by running the `helm install` command with `namespace` and `set` options. For example:
104+
+
105+
[source,terminal,subs="+quotes"]
106+
----
107+
CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')
108+
109+
helm install _<rhdh_instance>_ _<workspace_directory>_/_<results_directory>_/charts/_<archive_file>_ --namespace _<your_namespace>_ --create-namespace \
110+
--set global.clusterRouterBase="$CLUSTER_ROUTER_BASE"
111+
----
112+
+
113+
--
114+
where:
115+
116+
`<rhdh_instance>` :: Specifies the name of your {product} instance, for example, `my-rhdh`.
117+
118+
`<workspace_directory>` :: Specifies the name of your workspace directory, for example, `oc-mirror-workspace`.
119+
120+
`<results_directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
121+
122+
`<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`.
123+
124+
`<your_namespace>` :: Specifies the namespace that you want to deploy the Helm chart to, for example, `{my-product-namespace}`.
125+
--

titles/install-rhdh-air-gapped/master.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ include::modules/installation/con-airgapped-environment.adoc[leveloffset=+1]
1111

1212
include::modules/installation/proc-install-rhdh-airgapped-environment-ocp-operator.adoc[leveloffset=+1]
1313

14-
include::modules/installation/proc-install-rhdh-airgapped-environment-ocp-helm.adoc[leveloffset=+1]
14+
include::assemblies/assembly-install-rhdh-airgapped-environment-ocp-helm.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)