Install and configure Red Hat Developer Hub and explore templating basics

Development teams today face a huge amount of cognitive overload due to the many frameworks, new technologies, and new approaches that make writing software a lot harder than it used to be. 

In this learning path, created by Uth Lawson, you will learn how to install the Red Hat Developer Hub internal developer platform and learn the concepts and skills you need to install your IDP, configure simple GitHub authorization, and explore templating basics.

This lesson will walk you through a simple installation of Red Hat Developer Hub (Developer Hub) on the Developer Sandbox for Red Hat OpenShift.

In this lesson, you will:

  • Set up your Developer Sandbox.
  • Install Developer Hub on the Developer Sandbox.

Set up your Developer Sandbox

The Developer Sandbox is a 30-day, no-cost OpenShift cluster. To prepare your instance for this lesson:

  1. Go to the Developer Sandbox page:
  2. If you are not logged in, you will reach the Log in to your Red Hat account screen. 
  3. Do you have a Red Hat account?
    • Yes - Follow the prompts to log in with your method of choice.
    • No - Click Register for a Red Hat account and follow the process, then log in. You can use this account for many things throughout Red Hat.
  4. Once you reach, click the Get started button to create or launch your Developer Sandbox.
  5. When you reach the "Congratulations, you're ready to get started!" dialog box, click Got it.
  6. Go to the Red Hat OpenShift tile and click Launch.
  7. When you reach the "Log in with..." screen, click DevSandbox. Follow the prompts to enter the Developer Sandbox.
  8. When you see "Welcome to the Developer Perspective!", you are in Red Hat OpenShift within the Developer Sandbox. To proceed, click Skip Tour.

You can launch the guided tour later at any time by going to the question mark icon in the upper-right corner next to your account name.

Info alert: Note: While the Developer Sandbox gives you 30 days of access, it hibernates applications when you’re not using it. If you perform the installation and then come back to it after a day or more, you will find the pods that run Red Hat Developer Hub and the composite database have been scaled down to zero. Scale them back up to one, then allow them some time to settle. We cover scaling your pods in Install Red Hat Developer Hub on Developer Sandbox for Red Hat OpenShift.

Install Red Hat Developer Hub in your Developer Sandbox

As of the time of publishing, when installing Developer Hub via the Developer Sandbox for Red Hat OpenShift, you need to use a Helm chart. In future releases, this process will be changed to use a dedicated Operator, which will make setting up and configuring the system easier. 

Now that you are in your Developer Sandbox account:

  1. Start in the Developer viewpoint by selecting </> Developer in the upper left corner.
  2. Select Administrator to change to the Administrator viewpoint. You will see a screen that shows your single allowed project on the Developer Sandbox (Figure 4).
The OpenShift Administrator view showing your existing OpenShift projects.
Figure 4: Directly view your OpenShift projects in the Developer Sandbox.
  1. Switch back to the Developer viewpoint to begin installing Developer Hub.
  2. Select your project name to enter that project and go to the Add screen (Figure 5). 
The OpenShift project Add screen gives you access to the developer catalog, Git repository, and more.
Figure 5: The OpenShift project Add screen lets you choose what components you need.
  1. Now it’s time to install the Developer Hub components using the Helm chart. Under Developer Catalog, select Helm chart and type developer hub into the search box (Figure 6).
OpenShift inside the Developer Sandbox offers two Helm charts by default, one of which is Red Hat Developer Hub.
Figure 6: The OpenShift Helm Charts screen inside the Developer Sandbox.
  1. Click on the Red Hat Developer Hub Helm chart (Figure 7).
The Helm chart dialog offers information about the chart, plus the ability to create it.
Figure 7: Click Create to install Red Hat Developer Hub via this Helm chart.
  1. Click Create to reach the Create Helm Release screen (Figure 8). 

    For the sake of initial simplicity, you will install Developer Hub with all of the defaults, then add additional features (including GitHub authorization) after installation. The advantage of installing Developer Hub onto OpenShift is that we can change the configuration parameters via injected Secrets after we have a running version. Doing this restarts the pods with the new configuration injected as components using appropriately named Secrets, which simplifies customizing and configuring Developer Hub.

    When we have an Operator, installation will be even simpler, with configuration options injected directly as components in the Custom Resource.
  2. In the Create Helm Release screen, you can configure your Helm chart before creating it.
    Figure 8: In the Create Helm Release screen, you can configure your Helm chart before creating it.
  3. Navigate to Root Schema -> global. Then under Enable service authentication within Backstage instance, enter the required shorthand in the format apps.{your_sandbox_url} (see the URL bar at the top of Figure 8 to see where to find this information in your Developer Sandbox URL).
  4. Click Create.

The Helm chart installs the pre-configured components needed for the Red Hat Developer Hub application. In our case, it installs a StatefulSet for the database. Developer Hub uses Postgres as its storage mechanism, and the Helm chart installs and configures the database for you as well as an instance of the Developer Hub application. This application is the controller that serves the UI that the end users consume. 

You, as the platform engineer, control the configuration of this application, which stores its objects and state in the Postgres database. If you leave it for a couple of minutes, the application will install and stabilize (Figure 9).

Postgres and Developer Hub shown running in OpenShift's Topology view, within the Developer Sandbox.
Figure 9: In the Developer viewpoint's Topology screen, you can see what pods are running in your project.

Info alert: Note: An OpenShift project is effectively a grouping of objects that are accessed and interacted with together.

The roundels (the round edges of the icons) for both the StatefulSet (database) and the application should be blue. There are 3 shades of blue as a pod is launched, each getting darker until the required pods are running and healthy. You can verify that launch is complete by clicking the developer-hub circle to see more details. The circle will show "1 Pod" when you're ready to proceed.

You have now installed a version of Developer Hub, albeit one that needs more configuration so your users can consume it. 

For now, select the Route icon in the top-right of the roundel for the developer-hub application, and the screen in Figure 10 will appear in a separate tab. Make note of your route URL, you will need it later.

The Podman Desktop developer tool and the CI/CD tools Argo CD, SonarQube, and are pre-installed.
Figure 10: The initial Developer Hub welcome screen as installed through the Developer Sandbox.

Info alert: Note: If you see a screen prompting you to log in as Guest or via GitHub, select Guest.

Because you haven’t set up authentication yet, what you see is the guest viewpoint. By default, Developer Hub and Backstage allow a guest user, which the system defaults to in the absence of an authentication method being added. 

If you want a small tour, click on the various left-hand navigation items in this viewpoint. For example, select Learning Paths. You will see that Developer Hub is pre-installed with a set of useful learning paths for various technologies around the cloud-native development space.

Your application is now running with its default configuration.

Previous resource
Backstage and Red Hat Developer Hub basics
Next resource
Configure GitHub Access to Red Hat Developer Hub