|
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 |
139 | 3 |
|
140 | 4 | 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.
|
141 | 5 |
|
@@ -282,4 +146,4 @@ where:
|
282 | 146 | `<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`.
|
283 | 147 |
|
284 | 148 | `<your_namespace>` :: Specifies the namespace that you want to deploy the Helm chart to, for example, `{my-product-namespace}`.
|
285 |
| --- |
| 149 | +-- |
0 commit comments