Chapter 2. Installing Red Hat Developer Hub in an air-gapped 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 the OpenShift Container Platform cluster. You can use a helper script that mirrors the necessary images and provides the necessary configuration to ensure those images will be used when installing the Red Hat Developer Hub Operator and creating Developer Hub instances. Note This script requires a target mirror registry which you should already have installed if your OpenShift Container Platform cluster is ready to operate on a restricted network. However, if you are preparing your cluster for disconnected usage, you can use the script to deploy a mirror registry in the cluster and use it for the mirroring process. Prerequisites You have an active OpenShift CLI ( oc ) session with administrative permissions to the OpenShift Container Platform cluster. See Getting started with the OpenShift CLI . You have an active oc registry session to the registry.redhat.io Red Hat Ecosystem Catalog. See Red Hat Container Registry Authentication . The opm CLI tool is installed. See Installing the opm CLI . The jq package is installed. See Download jq . Podman is installed. See Podman Installation Instructions . Skopeo version 1.14 or higher is installed. See Installing Skopeo . If you already have a mirror registry for your cluster, an active Skopeo session with administrative access to this registry is required. See Authenticating to a registry and Mirroring images for a disconnected installation . Note The internal OpenShift Container Platform cluster image registry cannot be used as a target mirror registry. See About the mirror registry . If you prefer to create your own mirror registry, see Creating a mirror registry with mirror registry for Red Hat OpenShift . If you do not already have a mirror registry, you can use the helper script to create one for you and you need the following additional prerequisites: The cURL package is installed. For Red Hat Enterprise Linux, the curl command is available by installing the curl package. To use curl for other platforms, see the cURL website . The htpasswd command is available. For Red Hat Enterprise Linux, the htpasswd command is available by installing the httpd-tools package. Procedure Download and run the mirroring script to install a custom Operator catalog and mirror the related images: prepare-restricted-environment.sh ( source ). curl -sSLO https://raw.githubusercontent.com/redhat-developer/rhdh-operator/release-1.3/.rhdh/scripts/prepare-restricted-environment.sh # if you do not already have a target mirror registry # and want the script to create one for you # use the following example: bash prepare-restricted-environment.sh \ --prod_operator_index "registry.redhat.io/redhat/redhat-operator-index:v4.17" \ --prod_operator_package_name "rhdh" \ --prod_operator_bundle_name "rhdh-operator" \ --prod_operator_version "v1.3.5" # if you already have a target mirror registry # use the following example: bash prepare-restricted-environment.sh \ --prod_operator_index "registry.redhat.io/redhat/redhat-operator-index:v4.17" \ --prod_operator_package_name "rhdh" \ --prod_operator_bundle_name "rhdh-operator" \ --prod_operator_version "v1.3.5" \ --use_existing_mirror_registry "my_registry" Note The script can take several minutes to complete as it copies multiple images to the mirror registry.

Commands:
curl -sSLO https://raw.githubusercontent.com/redhat-developer/rhdh-operator/release-1.3/.rhdh/scripts/prepare-restricted-environment.sh if you do not already have a target mirror registry and want the script to create one for you use the following example: bash prepare-restricted-environment.sh --prod_operator_index "registry.redhat.io/redhat/redhat-operator-index:v4.17" --prod_operator_package_name "rhdh" --prod_operator_bundle_name "rhdh-operator" --prod_operator_version "v1.3.5" if you already have a target mirror registry use the following example: bash prepare-restricted-environment.sh --prod_operator_index "registry.redhat.io/redhat/redhat-operator-index:v4.17" --prod_operator_package_name "rhdh" --prod_operator_bundle_name "rhdh-operator" --prod_operator_version "v1.3.5" --use_existing_mirror_registry "my_registry"