Skip to content

Instantly share code, notes, and snippets.

@durandom
Created November 19, 2024 10:44
Show Gist options
  • Save durandom/5cfe02263c4aa8f88d6b41eb68ece635 to your computer and use it in GitHub Desktop.
Save durandom/5cfe02263c4aa8f88d6b41eb68ece635 to your computer and use it in GitHub Desktop.
RHDH Builds

Understanding RHDH Build Types and Components

Introduction

To deploy Red Hat Developer Hub (RHDH) on OpenShift, multiple container images work together through the OpenShift Operator Lifecycle Manager (OLM). This document explains the different types of builds available and how they are distributed through various container registries.

Three main components are involved in a RHDH deployment:

  • The RHDH application itself (the developer portal)
  • The RHDH operator (manages the lifecycle of RHDH instances)
  • The Index Image Builder (IIB - a catalog of available operator versions)

These components are available in different variants to support development, testing, and production deployments:

  • Community builds: Available at quay.io/rhdh-community
  • Downstream builds: Available at quay.io/rhdh and mirrored to Red Hat registry
  • Release builds: Published to registry.redhat.io

Infrastructure Components

Core Components

  1. RHDH Application Image

    • Image: registry.redhat.io/rhdh/rhdh-hub-rhel9
    • Contains the Developer Hub application itself
    • Based on Backstage, customized with Red Hat plugins and configurations
    • Runs the actual developer portal interface
  2. RHDH Operator Image

    • Image: registry.redhat.io/rhdh/rhdh-rhel9-operator
    • Kubernetes operator that manages RHDH instances
    • Handles installation, configuration, and lifecycle management
    • Monitors and reconciles RHDH deployments
  3. Index Image Builder (IIB)

    • Image: quay.io/rhdh/iib:<tag>-<ocp-version>-<arch>
    • A specialized catalog source image for OpenShift's Operator Lifecycle Manager (OLM)
    • Contains metadata about operator versions, dependencies, and update paths
    • Used by OLM to deploy and manage the operator
    • Name stands for "Index Image Builder"
    • Examples:
      quay.io/rhdh/iib:latest-v4.14-x86_64  # RC/stable build
      quay.io/rhdh/iib:next-v4.14-x86_64     # CI/development build
      

Component Relationships

graph TB
    IIB[Index Image / IIB] -->|references| OP[Operator Image]
    OP -->|deploys & manages| RHDH[RHDH Application Image]
    OLM[OpenShift OLM] -->|uses| IIB
    OLM -->|deploys| OP
Loading

When installing RHDH:

  1. The IIB image provides the catalog of available operator versions
  2. OLM uses this catalog to deploy the appropriate operator version
  3. The operator then handles deploying and configuring the RHDH application

Build Types

Community Builds

  • Located in quay.io/rhdh-community/operator
  • Built from the upstream open source codebase
  • Suitable for development and community usage
  • No official support
  • Tagged with version numbers (e.g., 0.4.0)

Downstream CI/Next Builds

  • Located in quay.io/rhdh/rhdh-rhel9-operator
  • Built from the main branch
  • Contains newest features and changes
  • Used for testing upcoming releases
  • Not recommended for production use
  • next tag

Release Candidate/Latest Builds

  • Located in quay.io/rhdh/rhdh-rhel9-operator
  • Built from the stable release branch
  • Contains stabilized features targeted for next release
  • Suitable for pre-production validation
  • latest tag

GA Releases

  • Available in registry.redhat.io/rhdh
  • Official supported releases
  • Built from release tags
  • Recommended for production environments
  • Fully tested and validated
  • Include Red Hat support

Installation Methods

This guide focuses on operator-based installations of RHDH. While RHDH can also be installed using Helm charts, those methods are covered in the official documentation. For production environments using GA releases, the recommended approach is to install RHDH through the OpenShift web console, as per the documentation.

Installing OLM managed builds

For testing pre-release versions or contributing to RHDH development, a script is provided to simplify the installation of CI builds at rhdh-operator/.rhdh/docs/installing-ci-builds.adoc at main · redhat-developer/rhdh-operator · GitHub

The script handles:

  • Setting up the CatalogSource for the IIB
  • Installing a release version or the next or latest build of the operator itself

Detailed prerequisites and steps for CI builds are documented in the Installing CI Builds Guide.

Installing standalone operator builds

To install an unmanaged RHDH operator, you can use a Makefile which is part of the RHDH Operator repository.

The Makefile supports several environment variables to control the build and deployment process:

# Version of the operator
VERSION ?= 0.4.0

# Container registry and image path
IMAGE_TAG_BASE ?= quay.io/rhdh-community/operator
IMG ?= $(IMAGE_TAG_BASE):$(VERSION)

# Installation namespace (overlay directory)
PROFILE ?= rhdh
  1. Clone the repository:
git clone https://github.com/redhat-developer/rhdh-operator
cd rhdh-operator
  1. Deploy the operator to your cluster:
# Build and deploy the operator
make deploy

# Verify the operator is running
oc get pods -n backstage-system
  1. Building a specific version:
# Build version 0.4.1
make deploy VERSION=0.4.1

This installation method is primarily used for:

  • Operator development and testing
  • Custom builds of the operator
  • Development environments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment