Page
Set up a GitHub organization for Red Hat Developer Hub
To configure the GitHub settings for an organization within Developer Hub, it is essential to establish secrets, ConfigMaps, and other necessary configurations within the sandbox environment. The following steps will instruct you on how to achieve this result.
What you need
-
GitHub setup for Developer Hub
-
A Developer Sandbox account
What you will do
- Create a custom ConfigMap for your GitHub organization in the Developer Sandbox.
Create a custom ConfigMap for GitHub organization
- Log into the Developer Sandbox.
- From the left menu, check the
app-config-rhdh
ConfigMap and add the following GitHub configurations to it, as shown in Figure 1:kind: ConfigMap apiVersion: v1 metadata: name: app-config-rhdh data: app-config-rhdh.yaml: | app: title: Red Hat Developer Hub integrations: github: - host: github.com apps: - appId: ${GITHUB_APP_APP_ID} clientId: ${GITHUB_APP_CLIENT_ID} clientSecret: ${GITHUB_APP_CLIENT_SECRET} webhookUrl: ${GITHUB_APP_WEBHOOK_URL} webhookSecret: ${GITHUB_APP_WEBHOOK_SECRET} privateKey: | ${GITHUB_APP_PRIVATE_KEY} auth: environment: development providers: github: development: clientId: ${GITHUB_APP_CLIENT_ID} clientSecret: ${GITHUB_APP_CLIENT_SECRET} enabled: github: true
- Click Save.
- Select Secrets from the left side menu.
- Create a new secret and name it
rhdh-secrets
. - Add the environment variables into secrets (defined in the ConfigMap) in key and value form.
-
Click Create.
-
Log into your GitHub organization on Github.com and ensure that you added your cluster's Callback URL in the format:
https://developer-hub-<namespace>.<openshift-host>/api/auth/github/handler/frame
For example:https://developer-hub-rh-ee-narathod-dev.apps.sandbox-m2.ll9k.p1.openshiftapps.com/api/auth/github/handler/frame
-
Revisit the Developer Sandbox and select Helm.
-
Next to the developer-hub Helm chart, select the vertical dots on the right of the line.
-
Choose Upgrade, as shown in Figure 2.
-
Under Root Schema -> Backstage Chart Schema -> Backstage Parameters -> Backstage container environment variable from Secrets, add
rhdh-secrets
as the value. -
Click Upgrade.