Installing Red Hat Developer Hub on OpenShift Dedicated on Google Cloud Platform
Running Red Hat Developer Hub on Red Hat OpenShift Dedicated by using either the Operator or Helm chart.
Abstract
You can install Developer Hub on OpenShift Dedicated on Google Cloud Platform (GCP) using one of the following methods:
- The Red Hat Developer Hub Operator
- The Red Hat Developer Hub Helm chart
You must set the baseUrl
in app-config.yaml
to match the external URL of your Developer Hub instance. This value is required for the Red Hat Developer Hub to function correctly. If it is not set, frontend and backend services cannot communicate properly, and features may not work as expected.
1. Installing Red Hat Developer Hub on OpenShift Dedicated on GCP using the Operator
You can install Developer Hub on OpenShift Dedicated on GCP using the Red Hat Developer Hub Operator.
Prerequisites
- You have a valid GCP account.
- Your OpenShift Dedicated cluster is running on GCP. For more information, see Creating a cluster on GCP in Red Hat OpenShift Dedicated documentation.
- You have administrator access to OpenShift Dedicated cluster and GCP project.
Procedure
- In the OpenShift Container Platform web console menu, go to Operators > OperatorHub.
- In the Filter by keyword field, enter Developer Hub and click the Red Hat Developer Hub Operator card.
- On the Red Hat Developer Hub Operator page, click Install.
- After the installation completes, navigate to Installed Operators and select Red Hat Developer Hub Operator.
Provision your custom configuration:
apiVersion: v1 kind: ConfigMap metadata: name: app-config-rhdh data: "app-config-rhdh.yaml": | app: title: Red Hat Developer Hub baseUrl: https://__<my_developer_hub_url>__ backend: auth: externalAccess: - type: legacy options: subject: legacy-default-config secret: "${BACKEND_SECRET}" baseUrl: https://__<my_developer_hub_url>__ cors: origin: https://__<my_developer_hub_url>__
You must create a config map named
app-config-rhdh
and a Kubernetes Secret containing theBACKEND_SECRET
. These resources are used by the Developer Hub instance for authentication and application settings.For further steps, see Provisioning your custom Red Hat Developer Hub configuration.
Create a config map named
app-config-rhdh
that includes yourapp-config.yaml
as shown:apiVersion: v1 kind: ConfigMap metadata: name: app-config-rhdh data: "app-config-rhdh.yaml": | app: title: Red Hat Developer Hub baseUrl: https://__<my_developer_hub_url>__ backend: auth: externalAccess: - type: legacy options: subject: legacy-default-config secret: "${BACKEND_SECRET}" baseUrl: https://__<my_developer_hub_url>__ cors: origin: https://__<my_developer_hub_url>__
Create a secret named
my-rhdh-secrets
and add a key namedBACKEND_SECRET
with aBase64-encoded
string as value:apiVersion: v1 kind: Secret metadata: name: my-rhdh-secrets stringData: # TODO: Add the necessary auth secrets for service-to-service auth setup BACKEND_SECRET: "xxx" # Replace with your
Base64-encoded
secret- Return to the Developer Hub Operator page and click Create New Instance.
- Specify the name and target namespace for the Developer Hub deployment.
- Configure required options such as Git integration, secrets, and user permissions.
- Review the configuration, select deployment options, and click Create.
Verification
- To access the Developer Hub, navigate to the Developer Hub URL provided in the OpenShift Container Platform web console.
Additional resources
2. Installing Red Hat Developer Hub on OpenShift Dedicated on GCP using the Helm Chart
You can install Developer Hub on OpenShift Dedicated on GCP using the Red Hat Developer Hub Helm Chart.
Prerequisites
- You have a valid GCP account.
- Your OpenShift Dedicated cluster is running on GCP. For more information, see Creating a cluster on GCP in Red Hat OpenShift Dedicated documentation.
- You have installed Helm 3 or the latest.
Procedure
- From the Developer perspective on the Developer Hub web console, click +Add.
- From the Developer Catalog panel, click Helm Chart.
- In the Filter by keyword box, enter Developer Hub and click the Red Hat Developer Hub card.
- From the Red Hat Developer Hub page, click Create.
-
From your cluster, copy the OpenShift Container Platform router host (for example:
apps.<clusterName>.com
). Select the radio button to configure the Developer Hub instance with either the form view or YAML view.
ImportantBefore deploying Developer Hub using the Helm chart, you must define custom configuration settings such as the public
baseUrl
for your instance. Without settingbaseUrl
, the application cannot function correctly. You can define this configuration either through the Form view or the YAML view in the Helm install wizard.To configure the
baseUrl
, set the following values in your Helm configuration:global: app: baseUrl: https://<your-developer-hub-url> backend: baseUrl: https://<your-developer-hub-url> cors: origin: https://<your-developer-hub-url>
You can also define additional secrets, plugins, and advanced configuration in your
values.yaml
file. For full instructions, see: Provisioning your custom Red Hat Developer Hub configuration.The Form view is selected by default.
Using Form view
- To configure the instance with the Form view, go to Root Schema → global → Enable service authentication within Backstage instance and paste your OpenShift Container Platform router host into the field on the form.
Using YAML view
To configure the instance with the YAML view, paste your OpenShift Container Platform router hostname in the
global.clusterRouterBase
parameter value as shown in the following example:global: auth: backend: enabled: true clusterRouterBase: apps.<clusterName>.com # other Red Hat Developer Hub Helm Chart configurations
- Edit the other values if needed, then click Create and wait for the database and Developer Hub to start.
Verification
- To access the the Developer Hub, click the Open URL icon.
Additional resources