2.2. Installing Red Hat Developer Hub in a partially disconnected environment with the Operator
On an OpenShift Container Platform cluster operating on a restricted network, public resources are not available. However, deploying the Red Hat Developer Hub Operator and running Developer Hub requires the following public resources:
- Operator images (bundle, operator, catalog)
- Operands images (RHDH, PostgreSQL)
To make these resources available, replace them with their equivalent resources in a mirror registry accessible to your cluster.
You can use a helper script that mirrors the necessary images and provides the necessary configuration to ensure those images are used when installing the Red Hat Developer Hub Operator and creating Developer Hub instances. This script requires a target mirror registry. You likely have a target mirror registry if your cluster is already operating on a disconnected network. If you do not already have a target registry, and if you have an OpenShift Container Platform cluster, you might want to expose and leverage the internal cluster registry.
When connected to a OpenShift Container Platform cluster, the helper script detects it and automatically exposes the cluster registry. If connected to a Kubernetes cluster, you can manually specify the target registry to mirror the images.
Prerequisites
- You have installed Podman 5.3 or later. For more information, see Podman Installation Instructions.
- You have installed Skopeo 1.17 or later.
-
You have installed
yq4.44 or later. -
You have installed the GNU
sedcommand line text editor. -
You have installed
umociCLI tool. -
You have an active
oc registry,podman, orSkopeosession to theregistry.redhat.ioRed Hat Ecosystem Catalog. For more information, see link:Red Hat Container Registry Authentication. -
You have an active
Skopeosession with administrative access to the target mirror registry. For more information, see Authenticating to a registry. -
You have installed the
opmCLI tool. For more information, see Installing the opm CLI. If you are using an OpenShift Container Platform cluster, you have the following prerequisites:
-
Recommended: You have installed the
oc-mirrortool, with a version corresponding to the version of your OpenShift Container Platform cluster.
-
Recommended: You have installed the
If you are using a supported Kubernetes cluster, you have the following prerequisites:
- You have installed the Operator Lifecycle Manager (OLM) on the disconnected cluster.
- You have a mirror registry that is reachable from the disconnected cluster.
- Make sure that your system meets the minimum sizing requirements. See Sizing requirements for Red Hat Developer Hub.
Procedure
- In your terminal, navigate to the directory where you want to save the mirroring script.
Download the mirroring script by running the following command:
curl -sSLO https://raw.githubusercontent.com/redhat-developer/rhdh-operator/refs/heads/release-1.7/.rhdh/scripts/prepare-restricted-environment.shRun the mirroring script by using the
bashcommand with the appropriate set of options:bash prepare-restricted-environment.sh \ --filter-versions "1.7" \ [--to-registry <my.registry.example.com>] \ [--use-oc-mirror true]where:
--to-registry _<my.registry.example.com>- Enter the URL for the target mirror registry where you want to mirror the images.
--use-oc-mirror trueOptional: Use the
oc-mirrorOpenShift Container Platform CLI plugin to mirror images.注意The script can take several minutes to complete as it copies multiple images to the mirror registry.
Verification
- If you are using Red Hat OpenShift Container Platform, the Red Hat Developer Hub Operator is in the Installed Operators list in the web console.
If you are using a supported Kubernetes platform, you can check the list of pods running in the
rhdh-operatornamespace by running the following command in your terminal:kubectl -n rhdh-operator get pods
Next steps
Use the Operator to create a Red Hat Developer Hub instance on a supported platform. For more information, see the following documentation for the platform that you want to use: