Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 4. Installing Red Hat Developer Hub on a supported Kubernetes platform in an air-gapped environment with the Helm chart
If you are using a supported Kubernetes platform in a fully disconnected or partially disconnected environment, you can install Red Hat Developer Hub by using the Helm chart. Supported Kubernetes platforms include the following:
- Microsoft Azure Kubernetes Service
- Amazon Elastic Kubernetes Service
- Google Kubernetes Engine
4.1. Installing Red Hat Developer Hub on a supported Kubernetes platform in a fully disconnected environment with the Helm chart Copier lienLien copié sur presse-papiers!
In environments without internet access, a fully disconnected installation ensures that Red Hat Developer Hub can run reliably without external dependencies. This approach involves mirroring images and transferring them manually to the air-gapped environment.
Prerequisites
- You have installed Skopeo 1.17 or later
- You have installed Yq 4.4 or later
-
You authenticated to registry.redhat.io for pulling images by using the
skopeo login
command. -
You have access to the Kubernetes cluster with
kubectl
configured - You have installed Helm 3.13 or later on the air-gapped host
Procedure
On the mirroring host, in a terminal, fetch the Helm charts values by running the following commands:
helm repo add <helm_chart_repo_name> https://charts.openshift.io/ helm repo update helm show values <helm_chart_repo_name>/redhat-developer-hub --version <rhdh_version> values.default.yaml helm pull <helm_chart_repo_name>/redhat-developer-hub --version <rhdh_version>
helm repo add <helm_chart_repo_name> https://charts.openshift.io/ helm repo update helm show values <helm_chart_repo_name>/redhat-developer-hub --version <rhdh_version> values.default.yaml helm pull <helm_chart_repo_name>/redhat-developer-hub --version <rhdh_version>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow where
- <helm_chart_repo_name>
-
Specifies the name of the Helm chart repository, for example,
openshift-helm-charts
. - <rhdh_version>
Specifies the Red Hat Developer Hub version that you want to use, for example,
1.6.5
.NoteThe
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.
Extract the image digests by running the following commands:
RHDH_IMAGE=$(yq '.upstream.backstage.image | .registry + "/" + .repository' values.default.yaml) RHDH_DIGEST=$(yq '.upstream.backstage.image.tag' values.default.yaml) PG_IMAGE=$(yq '.upstream.postgresql.image | .registry + "/" + .repository' values.default.yaml) PG_DIGEST=$(yq '.upstream.postgresql.image.tag' values.default.yaml)
RHDH_IMAGE=$(yq '.upstream.backstage.image | .registry + "/" + .repository' values.default.yaml) RHDH_DIGEST=$(yq '.upstream.backstage.image.tag' values.default.yaml) PG_IMAGE=$(yq '.upstream.postgresql.image | .registry + "/" + .repository' values.default.yaml) PG_DIGEST=$(yq '.upstream.postgresql.image.tag' values.default.yaml)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Mirror the images to your local archive by running the following commands:
skopeo login registry.redhat.io skopeo copy --all docker://${RHDH_IMAGE}:${RHDH_DIGEST} dir:./rhdh-hub skopeo copy --all docker://${PG_IMAGE}:${PG_DIGEST} dir:./postgresql
skopeo login registry.redhat.io skopeo copy --all docker://${RHDH_IMAGE}:${RHDH_DIGEST} dir:./rhdh-hub skopeo copy --all docker://${PG_IMAGE}:${PG_DIGEST} dir:./postgresql
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Transfer the following files and directories to your air-gapped environment:
- rhdh-hub
- postgresql
-
Helm chart archive file, for example,
redhat-developer-hub-1.6.5.tgz
Load the images onto the air-gapped host by running the following commands:
skopeo copy --all dir:./rhdh-hub docker://<mirror_registry_name>/<rhdh_repo_name>:${RHDH_DIGEST} skopeo copy --all dir:./postgresql docker://<mirror_registry_name>/<postgresql_repo_name>:${PG_DIGEST}
skopeo copy --all dir:./rhdh-hub docker://<mirror_registry_name>/<rhdh_repo_name>:${RHDH_DIGEST} skopeo copy --all dir:./postgresql docker://<mirror_registry_name>/<postgresql_repo_name>:${PG_DIGEST}
Copy to Clipboard Copied! Toggle word wrap Toggle overflow where
- <mirror_registry_name>
-
Specifies the name of the target mirror registry that you want to push the images to, for example,
registry.example.com
. - <rhdh_repo_name>
-
Specifies the name of the repository where your Red Hat Developer Hub image is stored, for example,
rhdh/rhdh-hub-rhel9
. This value must match the name of the Red Hat Developer Hub image that you loaded onto the air-gapped host. - <postgresql_repo_name>
-
Specifies the name of the repository where your PostgreSQL image is stored, for example,
rhdh/postgresql-15
.
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:Copy to Clipboard Copied! Toggle word wrap Toggle overflow where
- <mirror_registry_name>
-
Specifies the name of the target mirror registry that you want to push the images to, for example,
registry.example.com
. - <rhdh_repo_name>
-
Specifies the name of the repository where your Red Hat Developer Hub image is stored, for example,
rhdh/rhdh-hub-rhel9
. This value must match the name of the Red Hat Developer Hub image that you loaded onto the air-gapped host. - <postgresql_repo_name>
Specifies the name of the repository where your PostgreSQL image is stored, for example,
rhdh/postgresql-15
.For AKS, use the following
values.yaml
file template:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For EKS, use the following
values.yaml
file template:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For GKE, use the following
values.yaml
file template:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Install the Helm chart in the current namespace by running the following command:
helm install rhdh ./<helm_chart_archive_file_name> -f values.yaml
helm install rhdh ./<helm_chart_archive_file_name> -f values.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow where
- <helm_chart_archive_file_name>
-
Specifies the name of the Helm chart archive file, for example,
redhat-developer-hub-1.4.0.tgz
.
4.2. Installing Red Hat Developer Hub on a supported Kubernetes platform in a partially disconnected environment with the Helm chart Copier lienLien copié sur presse-papiers!
In a partially disconnected environment, the cluster cannot access external registries, for example, registry.redhat.io, but it can access an internal mirror registry. This method requires direct access to an internal mirror registry from the cluster.
Prerequisites
You have set up your workstation.
- You have installed Skopeo 1.17 or later
- You have installed Yq 4.4 or later
- You have installed Helm 3.13 or later
- You have an active Skopeo session against registry.redhat.io
-
You have an active Skopeo session against your target mirror registry, for example,
registry.internal.example.com
-
You have access to the Kubernetes cluster with
kubectl
configured
Procedure
In a terminal, download and extract the Helm chart by running the following commands:
helm repo add _<helm_chart_repo_name>_ https://charts.openshift.io/ helm repo update helm pull _<helm_chart_repo_name>_/redhat-developer-hub --version _<rhdh_version>_ helm show values _<helm_chart_repo_name>_/redhat-developer-hub --version _<rhdh_version>_ > values.default.yaml
helm repo add _<helm_chart_repo_name>_ https://charts.openshift.io/ helm repo update helm pull _<helm_chart_repo_name>_/redhat-developer-hub --version _<rhdh_version>_ helm show values _<helm_chart_repo_name>_/redhat-developer-hub --version _<rhdh_version>_ > values.default.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow where
- <helm_chart_repo_name>
-
Specifies the name of the Helm chart repository, for example,
openshift-helm-charts
. - <rhdh_version>
-
Specifies the Red Hat Developer Hub version that you want to use, for example,
1.6.5
.
Use
yq
to extract the image digests by running the following commands:RHDH_IMAGE=$(yq '.upstream.backstage.image | .registry + "/" + .repository' values.default.yaml) RHDH_DIGEST=$(yq '.upstream.backstage.image.tag' values.default.yaml) PG_IMAGE=$(yq '.upstream.postgresql.image | .registry + "/" + .repository' values.default.yaml) PG_DIGEST=$(yq '.upstream.postgresql.image.tag' values.default.yaml)
RHDH_IMAGE=$(yq '.upstream.backstage.image | .registry + "/" + .repository' values.default.yaml) RHDH_DIGEST=$(yq '.upstream.backstage.image.tag' values.default.yaml) PG_IMAGE=$(yq '.upstream.postgresql.image | .registry + "/" + .repository' values.default.yaml) PG_DIGEST=$(yq '.upstream.postgresql.image.tag' values.default.yaml)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Mirror the images to the internal mirror registry by entering the following commands:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow where
- <mirror_registry_name>
-
Specifies the name of the internal mirror registry, for example,
registry.internal.example.com
. - <postgresql_repo_name>
-
Specifies the name of the PostgreSQL repository, for example,
rhdh/postgresql-15
. - <rhdh_repo_name>
-
Specifies the name of the Red Hat Developer Hub repository, for example,
rhdh/rhdh-hub-rhel9
.
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:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For AKS, use the following
values.yaml
file template:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For EKS, use the following
values.yaml
file template:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For GKE, use the following
values.yaml
file template:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Install the Helm chart in the current namespace by running the following command:
helm install rhdh ./_<helm_chart_archive_file_name>_ -f values.yaml
helm install rhdh ./_<helm_chart_archive_file_name>_ -f values.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow where
- <helm_chart_archive_file_name>
-
Specifies the name of the Helm chart archive file, for example,
redhat-developer-hub-1.6.5.tgz
.