Chapter 5. Install self-service automation portal in air-gapped OpenShift Container Platform environments
You can install self-service automation portal in a disconnected OpenShift Container Platform environment.
5.1. Prerequisites Copy linkLink copied to clipboard!
Review the mandatory subscriptions, permissions, and platform access required before starting the installation. Fulfilling these needs helps ensure a successful deployment.
- You have a valid subscription to Red Hat Ansible Automation Platform.
- You have access to an instance of Red Hat Ansible Automation Platform 2.6 with the appropriate permissions to create an OAuth application.
- You have access to an OpenShift Container Platform instance with the appropriate permissions within your project to create an application.
-
You have installed
oc, the OpenShift command-line interface (CLI) tool, on your local machine. - You have installed Helm 3.10 or newer.
- You have installed and configured Podman for pulling and pushing container images.
-
You have internet access to pull images and charts from public repositories, including
registry.redhat.io. - A Red Hat pull secret that allows you to pull images from registry.redhat.io.
You have a method to provide the Ansible plug-ins in the disconnected environment:
-
For OCI delivery: A method to mirror the OCI artifacts image referenced by
imageTagInfo. - For HTTP plug-in registry: The ability to host the plug-in tarball files.
-
For OCI delivery: A method to mirror the OCI artifacts image referenced by
- You have registry credentials for the registry endpoint used by the dynamic plug-in installer.
5.2. Prepare for air-gapped installation Copy linkLink copied to clipboard!
Before you can install self-service automation portal in a disconnected OpenShift Container Platform environment, you must complete some processes on a connected bastion host.
5.2.1. Mirror container images Copy linkLink copied to clipboard!
Mirror the required container images from the Red Hat registry to your local disconnected registry. This step prepares the images for installing self-service automation portal in an isolated environment.
If you mirror registry.redhat.io content to a different registry host (or to a registry prefix such as quay.io/<org>), you can set redhat-developer-hub.global.imageRegistry so the Helm chart pulls all of its images from that mirrored location. imageRegistry is a single override that controls the registry for the base application image, PostgreSQL image, OCI plug-in artifacts, and Ansible Dev Tools sidecar.
The dynamic plug-in init container does not use cluster-level image mirror configuration (for example, ImageDigestMirrorSet or ImageTagMirrorSet). You must set imageRegistry even if your cluster redirects registry.redhat.io pulls.
Procedure
Log in to
registry.redhat.io:$ podman login registry.redhat.io- Enter your Red Hat username and password when prompted.
Log in to your disconnected registry:
$ podman login <disconnected_registry_url>Pull the Red Hat Developer Hub image from
registry.redhat.io:$ podman pull registry.redhat.io/rhdh/rhdh-hub-rhel9:x.y.zTag the image for your disconnected registry:
$ podman tag registry.redhat.io/rhdh/rhdh-hub-rhel9:x.y.z <disconnected_registry_url>/<your_namespace>/rhdh/rhdh-hub-rhel9:x.y.zPush the tagged image to your disconnected registry:
$ podman push <disconnected_registry_url>/<your_namespace>/rhdh/rhdh-hub-rhel9:x.y.zIf you use the built-in PostgreSQL database, mirror the PostgreSQL 15 image. An external database is the supported production architecture and does not require this step:
$ podman pull registry.redhat.io/rhel9/postgresql-15:<tag> $ podman tag registry.redhat.io/rhel9/postgresql-15:<tag> <disconnected_registry_url>/<your_namespace>/rhel9/postgresql-15:<tag> $ podman push <disconnected_registry_url>/<your_namespace>/rhel9/postgresql-15:<tag>If you use OCI container delivery, mirror the Ansible plug-ins OCI artifacts image:
$ podman pull registry.redhat.io/ansible-automation-platform/automation-portal:<plugin-version> $ podman tag registry.redhat.io/ansible-automation-platform/automation-portal:<plugin-version> <disconnected_registry_url>/<your_namespace>/ansible-automation-platform/automation-portal:<plugin-version> $ podman push <disconnected_registry_url>/<your_namespace>/ansible-automation-platform/automation-portal:<plugin-version>Mirror the Ansible Dev Tools sidecar image. Use the path that matches your Ansible Automation Platform version:
Ansible Automation Platform 2.5:
$ podman pull registry.redhat.io/ansible-automation-platform-25/ansible-dev-tools-rhel9:latest $ podman tag registry.redhat.io/ansible-automation-platform-25/ansible-dev-tools-rhel9:latest <disconnected_registry_url>/<your_namespace>/ansible-automation-platform-25/ansible-dev-tools-rhel9:latest $ podman push <disconnected_registry_url>/<your_namespace>/ansible-automation-platform-25/ansible-dev-tools-rhel9:latestAnsible Automation Platform 2.6:
$ podman pull registry.redhat.io/ansible-automation-platform-26/ansible-dev-tools-rhel9:latest $ podman tag registry.redhat.io/ansible-automation-platform-26/ansible-dev-tools-rhel9:latest <disconnected_registry_url>/<your_namespace>/ansible-automation-platform-26/ansible-dev-tools-rhel9:latest $ podman push <disconnected_registry_url>/<your_namespace>/ansible-automation-platform-26/ansible-dev-tools-rhel9:latest
5.2.2. Download the helm chart package Copy linkLink copied to clipboard!
Download the Helm chart package and modify the internal image references to point to your disconnected registry. This prepares the installation package for the air-gapped environment.
Procedure
Add the OpenShift Helm charts repository and update your local cache:
helm repo add openshift-helm-charts https://charts.openshift.io/ helm repo updatePull the required version of the chart:
helm pull openshift-helm-charts/redhat-rhaap-portal --version x.y.zThe chart is saved as a
.tgzfile (for example,redhat-rhaap-portal-1.0.1.tgz).Extract the chart files:
tar -xvf redhat-rhaap-portal-x.y.z.tgzThis creates a directory with a name similar to
redhat-rhaap-portal-1.0.1/.-
In the
redhat-rhaap-portal/values.yamlfile, replace allimage:references with the full path to the images in your disconnected registry. Repack the chart with your modifications:
helm package redhat-rhaap-portal-x.y.z- A new .tgz file is created containing your changes.
5.2.3. Transfer assets to the disconnected environment Copy linkLink copied to clipboard!
Transfer the modified Helm chart package from the connected bastion host to a machine inside your disconnected network. This action stages the installation assets for deployment within the isolated OpenShift environment.
Procedure
-
Copy the modified Helm chart
.tgzfile or files (for example,redhat-rhaap-portal-1.0.1.tgz) from your connected bastion host to a machine or jump box within your disconnected OpenShift network. - If you use the HTTP plug-in registry method, transfer the plug-in tarball files to the disconnected environment.
5.3. Installing the Helm chart in the disconnected OpenShift environment Copy linkLink copied to clipboard!
You can install the modified Helm chart using the helm install command in your disconnected OpenShift environment. This deploys the self-service automation portal using the locally available assets.
Continued steps for installing the Helm chart in a disconnected OpenShift environment are detailed in this section.
5.3.1. Accessing the disconnected OpenShift environment Copy linkLink copied to clipboard!
Ensure your disconnected OpenShift cluster is configured to trust the private registry containing the mirrored container images. This step is crucial for successful image pulling during installation.
Prerequisites
- You have the necessary kubeconfig and permissions for setting up image pull secrets or insecure registries.
Procedure
In a terminal, log in to your disconnected OpenShift cluster using the
ocCLI.oc login --token=<your_token> --server=<your_openshift_api_url>Use the following command if you have a kubeconfig:
export KUBECONFIG=/path/to/your/kubeconfig oc login- Ensure that your OpenShift cluster is configured to trust your disconnected registry.
5.3.2. Configure plug-in delivery for disconnected environments Copy linkLink copied to clipboard!
Complete one of the plug-in delivery methods for disconnected environments.
Procedure
-
For OCI delivery: Create the
<release-name>-dynamic-plugins-registry-authsecret with credentials for your disconnected registry that hosts the mirrored Ansible plug-ins OCI artifacts.
Additional resources
5.3.3. Install the Helm chart Copy linkLink copied to clipboard!
Install self-service automation portal by using the helm install command. You must reference the local Helm chart file and include the required configuration using a values file (-f) or --set flags.
Procedure
On the machine within your disconnected environment, navigate to the directory where you placed the transferred Helm chart
.tgzfile:$ cd /path/to/your/transferred/charts/Define your namespace and cluster router base as environment variables:
$ export MY_NAMESPACE="<your_namespace_name>" $ export MY_CLUSTER_ROUTER_BASE="<your_cluster_router_base>"If the namespace does not exist, create it:
$ oc new-project "${MY_NAMESPACE}"Create a custom values file and reuse it for install and upgrade. Choose the example that matches your plug-in delivery method.
OCI delivery (
values-oci.yaml):redhat-developer-hub: global: clusterRouterBase: <your_cluster_router_base> pluginMode: oci imageTagInfo: "<plugin-version>" # Registry host only. Replaces registry.redhat.io for all images. imageRegistry: "<disconnected_registry_url>" # Optional. Full OCI plugin image path for mirrors with non-standard # repository paths. Overrides imageRegistry for OCI plugin artifacts only. # Use when your mirror does not preserve the default repository path # (ansible-automation-platform/automation-portal). # ociPluginImage: "<disconnected_registry_url>/custom-path/automation-portal" upstream: backstage: # The Helm chart pins images by SHA256 digest by default. # When mirroring with podman tag/push, the digest is not preserved. # Override with tag-based references. image: repository: rhdh/rhdh-hub-rhel9 tag: "1.8" appConfig: ansible: rhaap: checkSSL: true # Set to false if using self-signed certificates. catalog: providers: rhaap: '{{- include "catalog.providers.env" . }}': orgs: "<your-aap-organization-name>" # If you use the built-in PostgreSQL database, uncomment the following lines. # An external database is the supported production architecture. # postgresql: # image: # repository: rhel9/postgresql-15 # tag: "latest"HTTP plug-in registry delivery (
values-tarball.yaml):redhat-developer-hub: global: clusterRouterBase: <your_cluster_router_base> pluginMode: tarball # Registry host only. Replaces registry.redhat.io for the images. imageRegistry: "<disconnected_registry_url>" upstream: backstage: image: repository: rhdh/rhdh-hub-rhel9 tag: "1.8" appConfig: ansible: rhaap: checkSSL: true # Set to false if using self-signed certificates. catalog: providers: rhaap: '{{- include "catalog.providers.env" . }}': orgs: "<your-aap-organization-name>" # If you use the built-in PostgreSQL database, uncomment the following lines. # An external database is the supported production architecture. # postgresql: # image: # repository: rhel9/postgresql-15 # tag: "latest"ImportantSet
imageRegistryto the registry host only (for example,mirror.example.com). Do not include repository paths. The chart appends the default repository pathansible-automation-platform/automation-portalautomatically. If your mirror uses a different repository structure, setociPluginImageto the full image path instead.Install the chart using the
helm installcommand:$ helm install redhat-rhaap-portal \ redhat-rhaap-portal-x.y.z.tgz \ --namespace "${MY_NAMESPACE}" \ -f /path/to/values-oci.yamlTo apply changes after deployment, upgrade the Helm release. If you install from the OpenShift web console, use Developer
Helm select the release Actions Upgrade YAML view. To upgrade from the command line:
$ helm upgrade redhat-rhaap-portal \ redhat-rhaap-portal-x.y.z.tgz \ --namespace "${MY_NAMESPACE}" \ -f /path/to/values-oci.yamlAlternatively, you can pass values using
--setflags.OCI delivery:
$ helm install redhat-rhaap-portal \ redhat-rhaap-portal-x.y.z.tgz \ --namespace "${MY_NAMESPACE}" \ --set redhat-developer-hub.global.clusterRouterBase="${MY_CLUSTER_ROUTER_BASE}" \ --set redhat-developer-hub.global.imageRegistry="<disconnected_registry_url>" \ --set redhat-developer-hub.global.pluginMode=ociTo also set
ociPluginImagevia--set:--set redhat-developer-hub.global.ociPluginImage="<disconnected_registry_url>/custom-path/automation-portal"HTTP plug-in registry delivery:
$ helm install redhat-rhaap-portal \ redhat-rhaap-portal-x.y.z.tgz \ --namespace "${MY_NAMESPACE}" \ --set redhat-developer-hub.global.clusterRouterBase="${MY_CLUSTER_ROUTER_BASE}" \ --set redhat-developer-hub.global.imageRegistry="<disconnected_registry_url>" \ --set redhat-developer-hub.global.pluginMode=tarball
5.3.4. Configure CA certificates for private registries Copy linkLink copied to clipboard!
If your private registry uses a certificate signed by an internal or self-signed CA, the install-dynamic-plugins init container fails with x509: certificate signed by unknown authority. Mount the CA certificate into the init container so that skopeo trusts the registry.
Procedure
Obtain the CA certificate chain that signed your mirror registry’s TLS certificate. If the registry uses a certificate chain, include the full chain:
$ cat registry.crt intermediate.crt root.crt > ca-bundle.crtCreate a ConfigMap from the CA certificate:
$ oc create configmap registry-ca-crt \ --from-file=ca.crt=ca-bundle.crt -n <namespace>Add the volume and mount to your values file:
redhat-developer-hub: upstream: backstage: extraVolumes: - name: registry-ca-crt configMap: name: registry-ca-crt initContainers: - name: install-dynamic-plugins volumeMounts: - name: registry-ca-crt mountPath: /etc/containers/certs.d/<registry-host> readOnly: true
The mountPath must be the registry hostname only (for example, /etc/containers/certs.d/mirror.example.com). Do not include repository paths. If the registry uses a non-standard port, include it in the path (for example, /etc/containers/certs.d/mirror.example.com:5000).
5.4. Verify the disconnected installation Copy linkLink copied to clipboard!
Verify the successful installation of the Helm chart in the disconnected environment. Check the Helm release status, monitor the pods, and verify that the application routes are accessible.
Procedure
Check the Helm release status:
$ helm list -n ${MY_NAMESPACE}Monitor the pods in your namespace to ensure they are running:
$ oc get pods -n ${MY_NAMESPACE}Check for
ImagePullBackOffor other errors in pod events:$ oc describe pod <pod_name> -n ${MY_NAMESPACE}If the chart uses routes to expose services, verify that the routes are created and accessible:
$ oc get route -n ${MY_NAMESPACE}
5.5. Troubleshooting disconnected installations Copy linkLink copied to clipboard!
Use this reference to troubleshoot common issues that occur during disconnected self-service automation portal installations.
| Symptom | Cause | Solution |
|---|---|---|
|
|
Auth secret missing or malformed. The init container uses |
Create |
|
Duplicate path in OCI URL (for example, |
|
Set |
|
| Private registry uses a self-signed or internal CA certificate. | Mount the CA certificate into the init container. See Configure CA certificates for private registries. |