|
| 1 | +[id="proc-install-rhdh-airgapped-full-k8s-helm_{context}"] |
| 2 | += Installing {product} on a supported Kubernetes platform in a fully disconnected environment with the Helm chart |
| 3 | + |
| 4 | +In environments without internet access, a fully disconnected installation ensures that {product} can run reliably without external dependencies. This approach involves mirroring images and transferring them manually to the air-gapped environment. |
| 5 | + |
| 6 | +.Prerequisites |
| 7 | + |
| 8 | +* You have installed Skopeo 1.17 or later |
| 9 | +* You have installed Yq 4.4 or later |
| 10 | +* You authenticated to registry.redhat.io for pulling images by using the `skopeo login` command. |
| 11 | +* You have access to the Kubernetes cluster with `kubectl` configured |
| 12 | +* You have installed Helm 3.13 or later on the air-gapped host |
| 13 | + |
| 14 | +.Procedure |
| 15 | + |
| 16 | +. On the mirroring host, in a terminal, fetch the Helm charts values by running the following commands: |
| 17 | ++ |
| 18 | +[source,terminal,subs="+quotes"] |
| 19 | +---- |
| 20 | +helm repo add _<helm_chart_repo_name>_ https://charts.openshift.io/ |
| 21 | +helm repo update |
| 22 | +helm show values _<helm_chart_repo_name>_/redhat-developer-hub --version _<rhdh_version>_ values.default.yaml |
| 23 | +helm pull _<helm_chart_repo_name>_/redhat-developer-hub --version _<rhdh_version>_ |
| 24 | +---- |
| 25 | ++ |
| 26 | +where |
| 27 | + |
| 28 | +_<helm_chart_repo_name>_ :: Specifies the name of the Helm chart repository, for example, `openshift-helm-charts`. |
| 29 | +_<rhdh_version>_ :: Specifies the {product} version that you want to use, for example, `{product-chart-version}`. |
| 30 | ++ |
| 31 | +[NOTE] |
| 32 | +==== |
| 33 | +The `helm pull _<helm_chart_repo_name>_/redhat-developer-hub --version _<rhdh_version>_` command automatically creates the Helm chart archive file and downloads the Helm chart to your current working directory. |
| 34 | +==== |
| 35 | ++ |
| 36 | +. Extract the image digests by running the following commands: |
| 37 | ++ |
| 38 | +[source,terminal,subs="+quotes"] |
| 39 | +---- |
| 40 | +RHDH_IMAGE=$(yq '.upstream.backstage.image | .registry + "/" + .repository' values.default.yaml) |
| 41 | +RHDH_DIGEST=$(yq '.upstream.backstage.image.tag' values.default.yaml) |
| 42 | +PG_IMAGE=$(yq '.upstream.postgresql.image | .registry + "/" + .repository' values.default.yaml) |
| 43 | +PG_DIGEST=$(yq '.upstream.postgresql.image.tag' values.default.yaml) |
| 44 | +---- |
| 45 | +. Mirror the images to your local archive by running the following commands: |
| 46 | ++ |
| 47 | +[source,terminal,subs="+quotes"] |
| 48 | +---- |
| 49 | +skopeo login registry.redhat.io |
| 50 | +skopeo copy --all docker://${RHDH_IMAGE}:${RHDH_DIGEST} dir:./rhdh-hub |
| 51 | +skopeo copy --all docker://${PG_IMAGE}:${PG_DIGEST} dir:./postgresql |
| 52 | +---- |
| 53 | + |
| 54 | +. Transfer the following files and directories to your air-gapped environment: |
| 55 | ++ |
| 56 | +* rhdh-hub |
| 57 | +* postgresql |
| 58 | +* Helm chart archive file, for example, `redhat-developer-hub-{product-chart-version}.tgz` |
| 59 | ++ |
| 60 | +. Load the images onto the air-gapped host by running the following commands: |
| 61 | ++ |
| 62 | +[source,terminal,subs="+quotes"] |
| 63 | +---- |
| 64 | +skopeo copy --all dir:./rhdh-hub docker://_<mirror_registry_name>_/_<rhdh_repo_name>_:${RHDH_DIGEST} |
| 65 | +
|
| 66 | +skopeo copy --all dir:./postgresql docker://_<mirror_registry_name>_/_<postgresql_repo_name>_:${PG_DIGEST} |
| 67 | +---- |
| 68 | ++ |
| 69 | +where |
| 70 | + |
| 71 | +_<mirror_registry_name>_ :: Specifies the name of the target mirror registry that you want to push the images to, for example, `registry.example.com`. |
| 72 | + |
| 73 | +_<rhdh_repo_name>_ :: Specifies the name of the repository where your {product} image is stored, for example, `rhdh/rhdh-hub-rhel9`. This value must match the name of the {product} image that you loaded onto the air-gapped host. |
| 74 | + |
| 75 | +_<postgresql_repo_name>_ :: Specifies the name of the repository where your PostgreSQL image is stored, for example, `rhdh/postgresql-15`. |
| 76 | ++ |
| 77 | +. Create a `values.yaml` file for the Kubernetes platform that you want to use and add the following image references to the file to reflect local use: |
| 78 | ++ |
| 79 | +[source,yaml,subs="+quotes"] |
| 80 | +---- |
| 81 | +upstream: |
| 82 | + backstage: |
| 83 | + image: |
| 84 | + registry: "_<mirror_registry_name>_" |
| 85 | + repository: _<rhdh_repo_name>_ |
| 86 | + tag: "${RHDH_DIGEST}" |
| 87 | +
|
| 88 | + postgresql: |
| 89 | + image: |
| 90 | + registry: "_<mirror_registry_name>_" |
| 91 | + repository: _<postgresql_repo_name>_ |
| 92 | + tag: "${PG_DIGEST}" |
| 93 | +
|
| 94 | +---- |
| 95 | ++ |
| 96 | +where |
| 97 | + |
| 98 | +_<mirror_registry_name>_ :: Specifies the name of the target mirror registry that you want to push the images to, for example, `registry.example.com`. |
| 99 | + |
| 100 | +_<rhdh_repo_name>_ :: Specifies the name of the repository where your {product} image is stored, for example, `rhdh/rhdh-hub-rhel9`. This value must match the name of the {product} image that you loaded onto the air-gapped host. |
| 101 | + |
| 102 | +_<postgresql_repo_name>_ :: Specifies the name of the repository where your PostgreSQL image is stored, for example, `rhdh/postgresql-15`. |
| 103 | ++ |
| 104 | +* For {aks-short}, use the following `values.yaml` file template: |
| 105 | ++ |
| 106 | +[source,yaml,subs="+quotes"] |
| 107 | +---- |
| 108 | +global: |
| 109 | + host: <app_address> |
| 110 | +route: |
| 111 | + enabled: false |
| 112 | +upstream: |
| 113 | + ingress: |
| 114 | + enabled: true |
| 115 | + className: webapprouting.kubernetes.azure.com |
| 116 | + host: |
| 117 | + backstage: |
| 118 | + image: |
| 119 | + pullSecrets: |
| 120 | + - rhdh-pull-secret |
| 121 | + podSecurityContext: |
| 122 | + fsGroup: 3000 |
| 123 | + postgresql: |
| 124 | + image: |
| 125 | + pullSecrets: |
| 126 | + - rhdh-pull-secret |
| 127 | + primary: |
| 128 | + podSecurityContext: |
| 129 | + enabled: true |
| 130 | + fsGroup: 3000 |
| 131 | + volumePermissions: |
| 132 | + enabled: true |
| 133 | +---- |
| 134 | ++ |
| 135 | +* For {eks-short}, use the following `values.yaml` file template: |
| 136 | ++ |
| 137 | +[source,yaml,subs="+quotes"] |
| 138 | +---- |
| 139 | +global: |
| 140 | + # TODO: Set your application domain name. |
| 141 | + host: <your Developer Hub domain name> |
| 142 | +
|
| 143 | +route: |
| 144 | + enabled: false |
| 145 | +
|
| 146 | +upstream: |
| 147 | + service: |
| 148 | + # NodePort is required for the ALB to route to the Service |
| 149 | + type: NodePort |
| 150 | +
|
| 151 | + ingress: |
| 152 | + enabled: true |
| 153 | + annotations: |
| 154 | + kubernetes.io/ingress.class: alb |
| 155 | +
|
| 156 | + alb.ingress.kubernetes.io/scheme: internet-facing |
| 157 | +
|
| 158 | + # TODO: Using an ALB HTTPS Listener requires a certificate for your own domain. Fill in the ARN of your certificate, e.g.: |
| 159 | + alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:xxx:xxxx:certificate/xxxxxx |
| 160 | +
|
| 161 | + alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]' |
| 162 | +
|
| 163 | + alb.ingress.kubernetes.io/ssl-redirect: '443' |
| 164 | +
|
| 165 | + # TODO: Set your application domain name. |
| 166 | + external-dns.alpha.kubernetes.io/hostname: <your rhdh domain name> |
| 167 | +
|
| 168 | + backstage: |
| 169 | + image: |
| 170 | + pullSecrets: |
| 171 | + - rhdh-pull-secret |
| 172 | + podSecurityContext: |
| 173 | + # you can assign any random value as fsGroup |
| 174 | + fsGroup: 2000 |
| 175 | + postgresql: |
| 176 | + image: |
| 177 | + pullSecrets: |
| 178 | + - rhdh-pull-secret |
| 179 | + primary: |
| 180 | + podSecurityContext: |
| 181 | + enabled: true |
| 182 | + # you can assign any random value as fsGroup |
| 183 | + fsGroup: 3000 |
| 184 | + volumePermissions: |
| 185 | + enabled: true |
| 186 | +---- |
| 187 | ++ |
| 188 | +* For {gke-short}, use the following `values.yaml` file template: |
| 189 | ++ |
| 190 | +[source,yaml,subs="+quotes"] |
| 191 | +---- |
| 192 | +global: |
| 193 | + host: <rhdh_domain_name> |
| 194 | +route: |
| 195 | + enabled: false |
| 196 | +upstream: |
| 197 | + service: |
| 198 | + type: NodePort |
| 199 | + ingress: |
| 200 | + enabled: true |
| 201 | + annotations: |
| 202 | + kubernetes.io/ingress.class: gce |
| 203 | + kubernetes.io/ingress.global-static-ip-name: <ADDRESS_NAME> |
| 204 | + networking.gke.io/managed-certificates: <rhdh_certificate_name> |
| 205 | + networking.gke.io/v1beta1.FrontendConfig: <ingress_security_config> |
| 206 | + className: gce |
| 207 | + backstage: |
| 208 | + image: |
| 209 | + pullSecrets: |
| 210 | + - rhdh-pull-secret |
| 211 | + podSecurityContext: |
| 212 | + fsGroup: 2000 |
| 213 | + postgresql: |
| 214 | + image: |
| 215 | + pullSecrets: |
| 216 | + - rhdh-pull-secret |
| 217 | + primary: |
| 218 | + podSecurityContext: |
| 219 | + enabled: true |
| 220 | + fsGroup: 3000 |
| 221 | + volumePermissions: |
| 222 | + enabled: true |
| 223 | +---- |
| 224 | ++ |
| 225 | +. Install the Helm chart in the current namespace by running the following command: |
| 226 | ++ |
| 227 | +[source,terminal,subs="+quotes"] |
| 228 | +---- |
| 229 | +helm install rhdh ./_<helm_chart_archive_file_name>_ -f values.yaml |
| 230 | +---- |
| 231 | ++ |
| 232 | +where |
| 233 | + |
| 234 | +_<helm_chart_archive_file_name>_ :: Specifies the name of the Helm chart archive file, for example, `redhat-developer-hub-1.4.0.tgz`. |
0 commit comments