redhat-rhaap-portal

by joaquinito2051

Helm chartv2.3.2App 2.3.2Apache-2.0

A Helm chart to deploy Ansible automation portal.

About this chart

Ansible automation portal Helm Chart

A Helm chart for deploying Ansible automation portal.

Introduction

This chart deploys Ansible automation portal using the Helm chart packaging format. This chart is designed for use alongside an Ansible Automation Platform (AAP) instance, so you can authenticate with AAP.

The telemetry data collection feature is enabled by default. For more information, see the Telemetry capturing section.

Usage

This chart is available in the following formats:

Installing from OpenShift Helm Catalog

Note: The install name must be unique for each deployment to avoid conflicts with existing releases. If a release with the same name already exists, the installation will fail.

Prerequisites

The following prerequisites are needed before installation:

  • Kubernetes 1.25+ (OpenShift 4.12+)
  • Helm 3.10+ or latest release
  • PersistentVolume provisioner support in the underlying infrastructure is available (see Custom Storage Class if your cluster has no default storage class)
  • Backstage container image
  • A plugin registry containing the required plugins deployed in the OpenShift environment (see the Create plugin registry section below for details)
  • Secrets containing AAP authentication values and SCM tokens created as shown in the Create OpenShift secrets section below.

Procedure

  1. Ensure you have completed all prerequistes listed above.

  2. Click the "Create" button at the top of the modal dialog on the chart page.

  3. Update the values shown below in the "Create Helm Release" YAML view.

    • To get proper connection between frontend and backend of Backstage, update the clusterRouterBase key to match your cluster host URL:

      redhat-developer-hub:
      global:
          clusterRouterBase: apps.example.com
      
    • (Optional) Update the Support link URL in the header to point to your customer support portal. By default, it points to https://access.redhat.com/support:

      redhat-developer-hub:
        upstream:
          backstage:
            extraEnvVars:
              - name: CUSTOMER_SUPPORT_URL
                value: https://your-support-portal.example.com
      
  4. Click "Create" at the bottom of the page to launch the deployment.

Plugin Deployment Options

There are two options for deploying the Ansible plugins:

  1. Container Image (Recommended): Pull plugins directly from the Red Hat container registry as OCI artifacts. See Using Container Image from registry.redhat.io.
  2. Plugin Registry (Deprecated): Deploy a local plugin registry with downloaded tarball files. See Create plugin registry.

Using Container Image from registry.redhat.io

The recommended approach is to consume plugins directly from the registry.redhat.io/ansible-automation-platform/automation-portal container image as OCI artifacts.

Prerequisites for registry.redhat.io

To pull OCI plugin artifacts from registry.redhat.io, you must configure authentication for the dynamic plugin installer.

  1. Create a Red Hat account: If you don't have one, register at Red Hat Customer Portal.

  2. Create a registry service account (recommended for production):

    • Navigate to Registry Service Accounts
    • Create a new service account token
    • Note the generated username (format: <random-string>|<your-token-name>) and token
  3. Create the dynamic-plugins-registry-auth secret:

    This secret is used by the dynamic plugin installer to authenticate when downloading plugins from the OCI registry.

    First, create an auth.json file with your credentials:

    {
      "auths": {
        "registry.redhat.io": {
          "auth": "<base64-encoded-username:password>"
        }
      }
    }
    

    To generate the base64-encoded auth value:

    echo -n '<username>:<password>' | base64 -w0
    

    Then create the secret. The secret name must follow the pattern <release-name>-dynamic-plugins-registry-auth:

    • OpenShift Catalog installation: The default release name is redhat-rhaap-portal, so create:

      oc create secret generic redhat-rhaap-portal-dynamic-plugins-registry-auth \
        --from-file=auth.json=./auth.json
      
    • Manual Helm installation: Use the release name you specify during helm install <release-name> ...:

      oc create secret generic <release-name>-dynamic-plugins-registry-auth \
        --from-file=auth.json=./auth.json
      

    Note: The secret must be created in the same namespace as the Helm release and before installing/upgrading the chart.

    Alternatively, if you already have podman/docker credentials configured locally:

    oc create secret generic redhat-rhaap-portal-dynamic-plugins-registry-auth \
      --from-file=auth.json=${XDG_RUNTIME_DIR}/containers/auth.json
    

Configuring the Helm Chart for Container Image

The chart uses pluginMode to control how plugins are loaded in production. By default, it is set to tarball. To switch to oci (recommended), update your values.yaml:

redhat-developer-hub:
  global:
    # Plugin installation mode for production environment:
    # - oci: (Recommended) Pull plugins from registry.redhat.io as OCI artifacts
    # - tarball: (Deprecated) Use local plugin registry with downloaded tarball files
    pluginMode: oci
    imageTagInfo: "2.2"  # Specify the plugin version tag

When using OCI mode, the plugins are automatically pulled from registry.redhat.io/ansible-automation-platform/automation-portal using the version specified in imageTagInfo.


Create plugin registry

DEPRECATION WARNING: The plugin registry approach using tarball files is deprecated and will be removed in a future release. Please migrate to using the Container Image from registry.redhat.io approach described above.

To use the deprecated tarball mode, set pluginMode to tarball in your values.yaml:

redhat-developer-hub:
  global:
    pluginMode: tarball

Log into OpenShift CLI

To deploy a plugin registry or to manually install the Helm chart, follow the instructions for installing OpenShift CLI (oc) locally, then follow the instructions to log in.

Use the following command to create a new OpenShift project:

oc new-project <project-name>

Or, switch to an existing project with the following command:

oc project <project-name>

Download plugins and push to the registry

First, create a local directory to store the plugin .tar files.

mkdir /path/to/<ansible-backstage-plugins-local-dir-changeme>

Set an environment variable DYNAMIC_PLUGIN_ROOT_DIR to represent the directory path.

export DYNAMIC_PLUGIN_ROOT_DIR=/path/to/<ansible-backstage-plugins-local-dir-changeme>

Download the the latest .tar file for the plugins from the Red Hat Ansible Automation Platform Product Software downloads page to the DYNAMIC_PLUGIN_ROOT_DIR path. The format of the filename is ansible-backstage-rhaap-bundle-x.y.z.tar.gz. Substitute the Ansible plugins release version, for example 1.0.0, for x.y.z. Extract the contents inside the directory and run ls to ensure the plugin .tar and integrity files are present.

Next, create an httpd service as part of your OpenShift project. Ensure you're using the correct OpenShift project before deploying the service (verify using oc projects).

oc new-build httpd --name=plugin-registry --binary
oc start-build plugin-registry --from-dir=$DYNAMIC_PLUGIN_ROOT_DIR --wait
oc new-app --image-stream=plugin-registry

Create OpenShift secrets

Before installing the chart, you must create a set of secrets in your OpenShift project.

In the OpenShift console, ensure your project is selected. Navigate to "Secrets" on the sidebar panel, and click on the blue "Create" dropdown on the page. Select the "Key/value secret" option and add the keys and values as indicated below.

NOTE: The secrets must have the exact name and key names shown below to work properly!

AAP authentication secrets

Create a secret named secrets-rhaap-portal. Add the following keys with the appropriate values to the secret:

  1. Key: aap-host-url

    Value needed: AAP instance URL

  2. Key: oauth-client-id

    Value needed: AAP OAuth client ID

  3. Key: oauth-client-secret

    Value needed: AAP OAuth client secret value

  4. Key: aap-token

    Value needed: Token for AAP user authentication (must have write access)

Github and Gitlab secrets

Create a secret named secrets-scm. Add the following key/value pairs to the secret:

  1. Key: github-token

    Value needed: Github Personal Access Token (PAT)

  2. Key: gitlab-token

    Value needed: Gitlab Personal Access Token (PAT)

For details on generating a token and setting up integrations for Github and Gitlab, refer to GitHub Integration Guide or GitLab Integration Guide.

Self-signed or internal CA certificate for GitHub/GitLab (optional)

If your GitHub or GitLab instance uses a self-signed certificate, or one issued by an internal/private CA, Backstage's built-in integrations (unlike this chart's AAP connection) have no config option to skip TLS verification. Trust must instead be established at the Node.js runtime level.

Note: this trust is applied process-wide. The CA you add here is trusted for all outbound TLS connections made by the Backstage backend (including the AAP connection and any OAuth/OIDC providers), not only GitHub/GitLab. Only add a CA (or chain) you are willing to trust for every outbound connection this pod makes.

The CA certificate is public information (it contains no private key), so it is provided via an optional ConfigMap rather than a Secret, consistent with the registry-ca-crt ConfigMap used for air-gapped registry CA trust.

To add the CA, create an optional ConfigMap named extra-ca-certs with a single key:

  1. Key: ca-bundle.pem

    Value needed: The CA certificate (or intermediate/root chain) that signed your GitHub/GitLab server's TLS certificate, in PEM format. This must be the issuing CA certificate, not the server's own leaf certificate.

    openssl s_client -showcerts prints the server's full chain in order (leaf certificate first, then any intermediate and root CA certificates). Piping that directly through openssl x509 only extracts the first certificate in the chain, which is the leaf, not the CA, so skip it and keep the rest:

    openssl s_client -connect <your-gitlab-host>:443 -showcerts </dev/null 2>/dev/null \
      | awk '/BEGIN CERTIFICATE/{n++} n>1' > ca-bundle.pem
    

    If your server presents only a single, self-signed certificate (no separate issuing CA), that certificate itself is the trust anchor. In that case the chain has only one entry, so the command above produces an empty file; instead extract it directly:

    openssl s_client -connect <your-gitlab-host>:443 -showcerts </dev/null 2>/dev/null | openssl x509 -outform PEM > ca-bundle.pem
    

    Enterprise environments often have separate CAs for different services (for example GitLab, AAP, and an artifact registry). Combine those PEM files into a single bundle before creating the ConfigMap. Node.js trusts any certificate in the PEM file, so this works for both proper CA chains and self-signed leaf certificates:

    cat gitlab-ca.pem aap-ca.pem registry-ca.pem > ca-bundle.pem
    

    Then create the ConfigMap:

    oc create configmap extra-ca-certs --from-file=ca-bundle.pem=./ca-bundle.pem -n <namespace>
    

If this ConfigMap is not created, the deployment behaves exactly as before, this is a no-op unless the ConfigMap is populated.

Manual Installation from the chart repository

Prerequisites

  • See the Installation prerequisites section above
  • Log into OpenShift CLI and create a new project (see the Log into OpenShift CLI section)

Procedure

  1. Ensure you have completed all prerequisites.

  2. Create your own values.yaml file and populate the keys below.

    • To get proper connection between frontend and backend of Backstage, update the clusterRouterBase key to match your cluster host URL:

      redhat-developer-hub:
        global:
          clusterRouterBase: apps.example.com
      
  3. (Optional) Update the Support link URL in the header to point to your customer support portal:

     ```yaml
     redhat-developer-hub:
       upstream:
         backstage:
           extraEnvVars:
             - name: CUSTOMER_SUPPORT_URL
               value: https://your-support-portal.example.com
     ```
    
  4. Add the chart repository using the

Deploy redhat-rhaap-portal with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has redhat-rhaap-portal on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartredhat-rhaap-portal is pinned at v2.3.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply