Streamline software development and management in Red Hat Developer Hub
Automating the development lifecycle, improving code quality, monitoring deployments, and managing services by using tools and plugins in Red Hat Developer Hub (RHDH)
Abstract
- 1. Importing your team’s codebase from Git
- 2. Centralizing your software components in the Red Hat Developer Hub catalog for easier access
- 2.1. Adding new components to your Red Hat Developer Hub instance to expand your catalog
- 2.2. Updating existing component in your Red Hat Developer Hub catalog
- 2.3. Finding the right components quickly in the Red Hat Developer Hub catalog by Kind
- 2.4. Finding the right component quickly in the Red Hat Developer Hub catalog by using the Filter field
- 2.5. Reviewing the YAML configuration of your Red Hat Developer Hub Software Catalog
- 2.6. Starring key components in the Software Catalog
- 3. Importing and using an existing Software Template for faster development
- 3.1. Creating a Software Template by using the Template Editor
- 3.2. Creating a Software Template as a YAML file
- 3.3. Creating a new software component using Software Templates
- 3.4. Searching and filtering Software Templates in your Red Hat Developer Hub instance
- 3.5. Importing an existing Software Template to Red Hat Developer Hub
1. Importing your team’s codebase from Git
These features are for Technology Preview only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs), might not be functionally complete, and Red Hat does not recommend using them for production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information on Red Hat Technology Preview features, see Technology Preview Features Scope.
Red Hat Developer Hub can automate GitHub repositories onboarding and track their import status.
1.1. Enabling and authorizing Bulk Import capabilities in Red Hat Developer Hub
You can enable the Bulk Import feature for users and give them the necessary permissions to access it.
Prerequisites
- You have enabled GitHub repository discovery.
Procedure
The Bulk Import plugins are installed but disabled by default. To enable the
./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-bulk-import-backend-dynamicand./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-bulk-importplugins, edit yourdynamic-plugins.yamlwith the following content:dynamic-plugins.yamlfragmentplugins: - package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-bulk-import-backend-dynamic disabled: false - package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-bulk-import disabled: falseSee Installing and viewing plugins in Red Hat Developer Hub.
Configure the required
bulk.importRBAC permission for the users who are not administrators as follows:rbac-policy.csvfragmentp, role:default/bulk-import, bulk.import, use, allow g, user:default/<your_user>, role:default/bulk-importNote that only Developer Hub administrators or users with the
bulk.importpermission can use the Bulk Import feature. See Permission policies in Red Hat Developer Hub.
Verification
- The sidebar displays a Bulk Import option.
- The Bulk Import page shows a list of Added Repositories.
1.2. Importing multiple GitHub repositories
In Red Hat Developer Hub, you can select your GitHub repositories and automate their onboarding to the Developer Hub catalog.
Prerequisites
Procedure
- Click Bulk Import in the left sidebar.
Click the Add button in the top-right corner to see the list of all repositories accessible from the configured GitHub integrations.
-
From the Repositories view, you can select any repository, or search for any accessible repositories. For each repository selected, a
catalog-info.yamlis generated. - From the Organizations view, you can select any organization by clicking Select in the third column. This option allows you to select one or more repositories from the selected organization.
-
From the Repositories view, you can select any repository, or search for any accessible repositories. For each repository selected, a
Click Preview file to view or edit the details of the pull request for each repository.
-
Review the pull request description and the
catalog-info.yamlfile content. -
Optional: when the repository has a
.github/CODEOWNERSfile, you can select the Use CODEOWNERS file as Entity Owner checkbox to use it, rather than having thecontent-info.yamlcontain a specific entity owner. - Click Save.
-
Review the pull request description and the
Click Create pull requests. At this point, a set of dry-run checks runs against the selected repositories to ensure they meet the requirements for import, such as:
-
Verifying that there is no entity in the Developer Hub catalog with the name specified in the repository
catalog-info.yaml - Verifying that the repository is not empty
Verifying that the repository contains a
.github/CODEOWNERSfile if the Use CODEOWNERS file as Entity Owner checkbox is selected for that repository- If any errors occur, the pull requests are not created, and you see a Failed to create PR error message detailing the issues. To view more details about the reasons, click Edit.
- If there are no errors, the pull requests are created, and you are redirected to the list of added repositories.
-
Verifying that there is no entity in the Developer Hub catalog with the name specified in the repository
-
Review and merge each pull request that creates a
catalog-info.ymlfile.
Verification
- The Added repositories list displays the repositories you imported, each with an appropriate status: either Waiting for approval or Added.
-
For each Waiting for approval import job listed, there is a corresponding pull request adding the
catalog-info.yamlfile in the corresponding repository.
1.3. Managing repositories after import to stay organized
You can oversee and manage the repositories that are imported to the Developer Hub.
Prerequisites
- You have imported GitHub repositories.
Procedure
Click Bulk Import in the left sidebar to display all the current repositories that are being tracked as Import jobs, along with their status.
- Added
-
The repository is added to the Developer Hub catalog after the import pull request is merged or if the repository already contained a
catalog-info.yamlfile during the bulk import. Note that it may take a few minutes for the entities to be available in the catalog. - Waiting for approval
There is an open pull request adding a
catalog-info.yamlfile to the repository. You can:- Click the pencil icon on the right to see details about the pull request or edit the pull request content right from Developer Hub.
- Delete the Import job, this action closes the import PR as well.
- To transition the Import job to the Added state, merge the import pull request from the Git repository.
- Empty
-
Developer Hub is unable to determine the import job status because the repository is imported from other sources but does not have a
catalog-info.yamlfile and lacks any import pull request adding it.
- After an import pull request is merged, the import status is marked as Added in the list of Added Repositories, but it might take a few seconds for the corresponding entities to appear in the Developer Hub Catalog.
A location added through other sources (like statically in an
app-config.yamlfile, dynamically when enabling GitHub discovery, or registered manually using the "Register an existing component" page) might show up in the Bulk Import list of Added Repositories if the following conditions are met:- The target repository is accessible from the configured GitHub integrations.
-
The location URL points to a
catalog-info.yamlfile at the root of the repository default branch.
1.4. Monitoring Bulk Import actions using audit logs
The Bulk Import backend plugin adds the following events to the Developer Hub audit logs. See Audit logs in Red Hat Developer Hub for more information on how to configure and view audit logs.
Bulk Import Events:
BulkImportUnknownEndpoint- Tracks requests to unknown endpoints.
BulkImportPing-
Tracks
GETrequests to the/pingendpoint, which allows us to make sure the bulk import backend is up and running. BulkImportFindAllOrganizations-
Tracks
GETrequests to the/organizationsendpoint, which returns the list of organizations accessible from all configured GitHub Integrations. BulkImportFindRepositoriesByOrganization-
Tracks
GETrequests to the/organizations/:orgName/repositoriesendpoint, which returns the list of repositories for the specified organization (accessible from any of the configured GitHub Integrations). BulkImportFindAllRepositories-
Tracks GET requests to the
/repositoriesendpoint, which returns the list of repositories accessible from all configured GitHub Integrations. BulkImportFindAllImports-
Tracks
GETrequests to the/importsendpoint, which returns the list of existing import jobs along with their statuses. BulkImportCreateImportJobs-
Tracks
POSTrequests to the/importsendpoint, which allows to submit requests to bulk-import one or many repositories into the Developer Hub catalog, by eventually creating import pull requests in the target repositories. BulkImportFindImportStatusByRepo-
Tracks
GETrequests to the/import/by-repoendpoint, which fetches details about the import job for the specified repository. BulkImportDeleteImportByRepo-
Tracks
DELETErequests to the/import/by-repoendpoint, which deletes any existing import job for the specified repository, by closing any open import pull request that could have been created.
Example bulk import audit logs
{
"actor": {
"actorId": "user:default/myuser",
"hostname": "localhost",
"ip": "::1",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"
},
"eventName": "BulkImportFindAllOrganizations",
"isAuditLog": true,
"level": "info",
"message": "'get /organizations' endpoint hit by user:default/myuser",
"meta": {},
"plugin": "bulk-import",
"request": {
"body": {},
"method": "GET",
"params": {},
"query": {
"pagePerIntegration": "1",
"sizePerIntegration": "5"
},
"url": "/api/bulk-import/organizations?pagePerIntegration=1&sizePerIntegration=5"
},
"response": {
"status": 200
},
"service": "backstage",
"stage": "completion",
"status": "succeeded",
"timestamp": "2024-08-26 16:41:02"
}
2. Centralizing your software components in the Red Hat Developer Hub catalog for easier access
The Red Hat Developer Hub Software Catalog is a centralized system that gives you visibility into all the software across your ecosystem, including services, websites, libraries, and data pipelines. You can use it to view ownership details and metadata for each component in one place.
The metadata for the components in your Software Catalog is stored as YAML files that live alongside your code in your version control system. The version control repositories can include one or many metadata files. Software Catalog organizes items as entities, which include Components, Resources, and APIs, and other related types. Each entity includes associated metadata such as its owner, type, and other relevant details.
By storing metadata in YAML files alongside the code, you allow Red Hat Developer Hub to process and display this information through a clear, visual interface. With the Software Catalog, you can manage and maintain your software, stay aware of all software available in your ecosystem, and take ownership of your services and tools.
The Overview page for a component provides key information such as links to the source code, documentation, dependencies, and ownership details. You can customize this page with plugins to suit specific needs.
2.1. Adding new components to your Red Hat Developer Hub instance to expand your catalog
Prerequisites
- You have installed and configured the Red Hat Developer Hub instance.
- You have the required permissions. See Authorization in Red Hat Developer Hub.
Procedure
You can add components to your RHDH instance using the following methods:
-
Register components manually using the GUI or by using your
app-config.yamlwith the required permissions. - Create new components by using Software Templates.
- Use the bulk import plugin with the required permissions. For more information, see Bulk importing GitHub repositories.
2.1.1. Creating new components in your Red Hat Developer Hub instance
You can create new components in the Software Catalog in your RHDH instance. Red Hat Developer Hub automatically registers all components that developers or platform engineers create using Templates in the Software Catalog.
Prerequisites
- You have installed and configured the Red Hat Developer Hub instance.
- You have the required permissions. See Authorization in Red Hat Developer Hub.
Procedure
- In your Red Hat Developer Hub navigation menu, click Catalog.
- On the Catalog page, click Self-service.
2.1.2. Registering components manually in your RHDH instance
To manually register components in your RHDH instance, create a catalog-info.yaml file and register it with your Red Hat Developer Hub instance. The catalog-info.yaml file contains the metadata you wish to register for your software component.
Prerequisites
- You have installed and configured the Red Hat Developer Hub instance.
- You have the required permissions. See Authorization in Red Hat Developer Hub.
Procedure
In the root directory of your software project, create a file named
catalog-info.yaml.apiVersion: backstage.io/v1alpha1 kind: Component metadata: name: _<your_software_component>_ description: _<software_component_brief_description>_ tags: - example - service annotations: github.com/project-slug: _<repo_link_of_your_component_to_register>_ spec: type: _<your_service>_ owner: _<your_team_name>_ lifecycle: _<your_lifecycle>_-
Commit the
catalog-info.yamlfile to the root of your project source code repository. - In your Red Hat Developer Hub navigation menu, go to Catalog > Self-service.
- On the Self-service page, click Register Existing Component.
-
On the Register an existing component page, enter the full URL of the
catalog-info.yamlfile in your repository. For example: Artist lookup component. - Complete the wizard instructions.
Verification
- Your software component is listed in the Software Catalog. You can view its details and ensure all the metadata is accurate.
2.2. Updating existing component in your Red Hat Developer Hub catalog
You can update components in the Software Catalog in your Red Hat Developer Hub instance.
Prerequisites
- You have installed and configured the Red Hat Developer Hub instance.
- You have the required permissions. See Authorization in Red Hat Developer Hub.
Procedure
To update components in the Software Catalog in your Red Hat Developer Hub instance, complete the following steps:
- In your Red Hat Developer Hub navigation menu, click Catalog.
Find the software component that you want to edit, under Actions, click the Edit icon.
NoteThis action redirects you to the YAML file on GitHub.
On your remote repository UI, update your YAML file.
NoteAfter you merge your changes, the updated metadata in the Software Catalog appears after some time.
2.3. Finding the right components quickly in the Red Hat Developer Hub catalog by Kind
Procedure
- In your Red Hat Developer Hub navigation menu, click Catalog.
- On the Catalog page, click the Kind drop-down list.
Select the type of Kind you want to filter.
NoteThe available filter dropdowns vary based on the Kind you select, displaying options relevant to that specific entity type.
2.4. Finding the right component quickly in the Red Hat Developer Hub catalog by using the Filter field
Procedure
- In your Red Hat Developer Hub navigation menu, click Catalog.
- In the Search box, enter the text you want to use to filter the components.
2.5. Reviewing the YAML configuration of your Red Hat Developer Hub Software Catalog
You can view the Software Catalog YAML file in your Red Hat Developer Hub instance. The YAML file displays the metadata for the components in your Software Catalog.
Procedure
To view the Software Catalog YAML file in your Red Hat Developer Hub instance, complete the following steps:
- In your Red Hat Developer Hub navigation menu, click Catalog.
Find the software component that you want to view, under Actions, click the View icon.
NoteThese steps redirect you to the YAML file on your remote repository.
2.6. Starring key components in the Software Catalog
You can use the Add to favorites icon to add the software catalogs that you visit regularly to the Starred category.
Procedure
To quickly access the Software Catalogs that you visit regularly, complete the following steps:
- In your Red Hat Developer Hub navigation menu, click Catalog.
- Find the software component that you want to add as a favorite, under Actions, click the Add to favorites icon.
Verification
- The starred component is listed under Your Starred Entities on your Home page.
3. Importing and using an existing Software Template for faster development
You can configure Software Templates to create software components and publish these components to Git repositories. Once the components are published to Git repositories, register these components in the Software Catalog.
A template is a form composed of different UI fields that is defined in a YAML file. Software Templates include actions, which are steps that are executed in sequential order and can be executed conditionally.
3.1. Creating a Software Template by using the Template Editor
Use the Red Hat Developer Hub Template Editor to create a Software Template.
Alternately, you can use the Template Editor to do any of the following actions:
- File > Open template directory
- File > Create template directory
- File > Close template editor
-
Use the Custom Fields Explorer button to test custom fields in your
templates.yamlfile - View Installed Actions Documentation
Procedure
To create a Software Template by using the Template Editor templates, complete the following steps:
- In your Red Hat Developer Hub navigation menu, click Catalog > Self-service. Alternatively, to go to Self-service page, in your header menu, click the (+) icon.
Click the More options icon and select Manage Templates.
NoteThe following options on the Managed Templates page do not create a software component in your Red Hat Developer Hub instance:
-
Template Form Playground: Use to create and test the
templates.yamlfile - Custom Field Explorer: Use to test custom fields
-
Template Form Playground: Use to create and test the
On the Managed Templates page, select any of the following options:
Load Template Directory: Use to load an existing
templates.yamlfile-
In your local file manager, navigate to the folder where your
templates.yamlfile is stored and click Select.
-
In your local file manager, navigate to the folder where your
Create New Template: Use to create a
templates.yamlfile-
In your local file manager, navigate to the folder where you want the Template Editor to create a
templates.yamlfile and click Select. -
On the Template Editor page, select the
templates.yamlfile. (Optional) You can preview and test your template specifications.
- On the Fill in some steps tab, enter text into the required fields and click Next.
- On the Repository Location tab, enter text into the required fields and click Review.
- Modify the YAML definition for the parameters of your template. For more information about these parameters, see Section 3.2, “Creating a Software Template as a YAML file”.
- Review the information for accuracy, then click Create.
- After the Software Template is created, import your Software Template in your RHDH instance.
-
In your local file manager, navigate to the folder where you want the Template Editor to create a
Verification
- Click the Catalog tab in the navigation panel.
- In the Kind drop-down menu, select Template.
- Confirm that your template is shown in the list of existing templates.
3.2. Creating a Software Template as a YAML file
You can create a Software Template by defining a Template object as a YAML file.
The Template object describes the Software Template and its metadata. It also contains required input variables and a list of actions that are executed by the scaffolding service.
Template object example
apiVersion: scaffolder.backstage.io/v1beta3 kind: Template metadata: name: template-name 1 title: Example template 2 description: An example template for v1beta3 scaffolder. 3 spec: owner: backstage/techdocs-core 4 type: service 5 parameters: 6 - title: Fill in some steps required: - name properties: name: title: Name type: string description: Unique name of the component owner: title: Owner type: string description: Owner of the component - title: Choose a location required: - repoUrl properties: repoUrl: title: Repository Location type: string steps: 7 - id: fetch-base name: Fetch Base action: fetch:template # ... output: 8 links: - title: Repository 9 url: ${{ steps['publish'].output.remoteUrl }} - title: Open in catalog 10 icon: catalog entityRef: ${{ steps['register'].output.entityRef }} # ...
- 1
- Specify a name for the Software Template.
- 2
- Specify a title for the Software Template. This is the title that is visible on the Software Template tile in the Self-service view.
- 3
- Specify a description for the Software Template. This is the description that is visible on the Software Template tile in the Self-service view.
- 4
- Specify the ownership of the Software Template. The
ownerfield provides information about who is responsible for maintaining or overseeing the Software Template within the system or organization. In the provided example, theownerfield is set tobackstage/techdocs-core. This means that this Software Template belongs to thetechdocs-coreproject in thebackstagenamespace. - 5
- Specify the component type. Any string value is accepted for this required field, but your organization should establish a proper taxonomy for these. Red Hat Developer Hub instances may read this field and behave differently depending on its value. For example, a
websitetype component may present tooling in the Red Hat Developer Hub interface that is specific to just websites.The following values are common for this field:
service- A backend service, typically exposing an API.
website- A website.
library- A software library, such as an npm module or a Java library.
- 6
- Use the
parameterssection to specify parameters for user input that are shown in a form view when a user creates a component by using the Software Template in the Red Hat Developer Hub console. Eachparameterssubsection, defined by a title and properties, creates a new form page with that definition. - 7
- Use the
stepssection to specify steps that are executed in the backend. These steps must be defined by using a unique step ID, a name, and an action. You can view actions that are available on your Red Hat Developer Hub instance by visiting the URLhttps://<rhdh_url>/create/actions. - 8
- Use the
outputsection to specify the structure of output data that is created when the template is used. Theoutputsection, particularly thelinkssubsection, provides valuable references and URLs that users can utilize to access and interact with components that are created from the template. - 9
- Provides a reference or URL to the repository associated with the generated component.
- 10
- Provides a reference or URL that allows users to open the generated component in a catalog or directory where various components are listed.
3.3. Creating a new software component using Software Templates
You can create a new software component using the standard Software Templates that the platform engineers have created. The scaffolding process runs in your Red Hat Developer Hub instance.
Procedure
- In your Red Hat Developer Hub navigation menu, click Catalog > Self-service.
- On the Self-service page, click Choose on the Templates tile to initiate the scaffolding process for a template.
Follow the wizard instructions as you enter the required details. You can choose parameters from a set of pre-defined options.
Optional: In the Deployment Information step, you have an option to Create Workbench for OpenShift AI.
NoteThis step is available only for a few templates.
In the Review step, verify the parameters you have entered and click Create.
Note- You can click Cancel to abort the software component creation during the template running step only if the current step supports the abort. The abort signal is then sent to a task and none of the following steps are executed.
- During the creation of the software component, click Show Logs to view the log information.
Verification
- If your software component is not created successfully, you can review the logs on the error page. To return to the Self-service page with the same template form and your previously entered values, click Start Over.

If your Software Template is created successfully, a success page similar to the example in the following image is displayed:

3.4. Searching and filtering Software Templates in your Red Hat Developer Hub instance
You can search and filter for the Software Template that you want to use to create a new software component.
Procedure
To search and filter for a Software Template, complete the following steps:
- In the Red Hat Developer Hub navigation menu, click Catalog > Self-service.
Type the name of the template you are looking for in the Search box.
- If you are looking for templates in a certain category, you can use the Categories dropdown.
3.5. Importing an existing Software Template to Red Hat Developer Hub
You can add an existing Software Template to your Red Hat Developer Hub instance by using the Catalog Processor.
Prerequisites
- You have created a directory or repository that contains at least one template YAML file.
- Optional: To use a template stored in a GitHub repository, you have configured Developer Hub integration with GitHub.
Procedure
In the
app-config.yamlconfiguration file, modify thecatalog.rulessection to include a rule for Software Templates, and configure thecatalog.locationssection to point to the Software Template that you want to add, as shown in the following example:# ... catalog: rules: - allow: [Template] 1 locations: - type: url 2 target: https://<repository_url>/example-template.yaml 3 # ...
Verification
- Click the Catalog tab in the navigation panel.
- In the Kind drop-down menu, select Template.
- Confirm that your template is shown in the list of existing templates.