Skip to content

Instantly share code, notes, and snippets.

@ryanj
Last active January 28, 2024 18:30
Show Gist options
  • Save ryanj/9903f562b4451c9b66c4462b81b9ef75 to your computer and use it in GitHub Desktop.
Save ryanj/9903f562b4451c9b66c4462b81b9ef75 to your computer and use it in GitHub Desktop.
RHDH config for Red Hat Developer Sandbox

RHDH Sandbox quickstart

Set up a User Access Token

Visit https://github.com/settings/tokens/new to generate a new "classic" token.

Select the "Repo" checkbox to enable "Full control of private repositories", then click "Generate Token".

Save your resulting personal access token for later use

Register new GitHub App

Visit https://github.com/settings/apps/new to register a new GitHub App.

  1. Enter "rhdh-sandbox" into the GitHub App name input.
  2. Enter your rhdh application route url in the Homepage URL input.
  3. In the Callback URL input, enter your rhdh application url plus "/api/auth/github/handler/frame"
  4. Deactivate webhooks
  5. Click on the "Create GitHub App" button at the bottom of the page

Note the resulting "Client ID", then click on the "Generate New Client Secret" button.

Update your ConfigMap

  1. Return to your Sandbox environment and select ConfigMaps from the side nav menu or from the Search interface
  2. Select app-config-rhdh to open your backstage config
  3. Select the YAML tab
  4. Update the configuration as follows:
data:
  app-config-rhdh.yaml: |
    app:
      title: Red Hat Developer Hub
      baseUrl: ${RHDH_HTTPS_ROUTE_URL}
    integrations:
      github:
        - host: github.com
          token: ${GITHUB_USER_ACCESS_TOKEN}
    auth:
      allowGuestAccess: true
      environment: development
      providers:
        github:
          development:
            clientId: ${GITHUB_APP_CLIENT_ID}
            clientSecret: ${GITHUB_APP_CLIENT_SECRET}
    enabled:
      github: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment