This documentation is for a release that is no longer maintained
See documentation for the latest supported version.Getting started with Red Hat Developer Hub
Abstract
Preface Copy linkLink copied to clipboard!
As a developer, you can use Red Hat Developer Hub to experience a streamlined development environment. Red Hat Developer Hub is driven by a centralized software catalog, providing efficiency to your microservices and infrastructure. It enables your product team to deliver quality code without any compromises.
Chapter 1. Supported configurations for Red Hat Developer Hub Copy linkLink copied to clipboard!
This section describes the configurations that are required to access the Red Hat Developer Hub, including:
- Custom applications configuration
- Source control configuration for Developer Hub Catalog
1.1. Adding a custom application configuration file to Red Hat OpenShift Container Platform Copy linkLink copied to clipboard!
To access the Red Hat Developer Hub, you must add a custom application configuration file to Red Hat OpenShift Container Platform. In OpenShift Container Platform, you can use the following content as a base template to create a ConfigMap named app-config-rhdh:
You can add the custom application configuration file to OpenShift Container Platform in one of the following ways:
- The Red Hat Developer Hub Operator
- The Red Hat Developer Hub Helm chart
1.1.1. Adding a custom application configuration file to OpenShift Container Platform using the Helm chart Copy linkLink copied to clipboard!
You can use the Red Hat Developer Hub Helm chart to add a custom application configuration file to your OpenShift Container Platform instance.
Prerequisites
- You have created an Red Hat OpenShift Container Platform account.
Procedure
- From the OpenShift Container Platform web console, select the ConfigMaps tab.
- Click Create ConfigMap.
- From Create ConfigMap page, select the YAML view option in Configure via and make changes to the file, if needed.
- Click Create.
- Go to the Helm tab to see the list of Helm releases.
- Click the overflow menu on the Helm release that you want to use and select Upgrade.
Use either the Form view or YAML view to edit the Helm configuration.
Using Form view
- Expand Root Schema → Backstage chart schema → Backstage parameters → Extra app configuration files to inline into command arguments.
- Click the Add Extra app configuration files to inline into command arguments link.
Enter the value in the following fields:
-
configMapRef:
app-config-rhdh -
filename:
app-config-rhdh.yaml
-
configMapRef:
- Click Upgrade.
Using YAML view
Set the value of the
upstream.backstage.extraAppConfig.configMapRefandupstream.backstage.extraAppConfig.filenameparameters as follows:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Click Upgrade.
1.1.2. Adding a custom application configuration file to OpenShift Container Platform using the Operator Copy linkLink copied to clipboard!
A custom application configuration file is a ConfigMap object that you can use to change the configuration of your Red Hat Developer Hub instance. If you are deploying your Developer Hub instance on Red Hat OpenShift Container Platform, you can use the Red Hat Developer Hub Operator to add a custom application configuration file to your OpenShift Container Platform instance by creating the ConfigMap object and referencing it in the Developer Hub custom resource (CR).
The custom application configuration file contains a sensitive environment variable, named BACKEND_SECRET. This variable contains a mandatory backend authentication key that Developer Hub uses to reference an environment variable defined in an OpenShift Container Platform secret. You must create a secret, named 'secrets-rhdh', and reference it in the Developer Hub CR.
You are responsible for protecting your Red Hat Developer Hub installation from external and unauthorized access. Manage the backend authentication key like any other secret. Meet strong password requirements, do not expose it in any configuration files, and only inject it into configuration files as an environment variable.
Prerequisites
- You have an active Red Hat OpenShift Container Platform account.
- Your administrator has installed the Red Hat Developer Hub Operator in OpenShift Container Platform. For more information, see Installing the Red Hat Developer Hub Operator.
- You have created the Red Hat Developer Hub CR in OpenShift Container Platform.
Procedure
- From the Developer perspective in the OpenShift Container Platform web console, select the Topology view, and click the Open URL icon on the Developer Hub pod to identify your Developer Hub external URL: <RHDH_URL>.
- From the Developer perspective in the OpenShift Container Platform web console, select the ConfigMaps view.
- Click Create ConfigMap.
Select the YAML view option in Configure via and use the following example as a base template to create a
ConfigMapobject, such asapp-config-rhdh.yaml:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- Set the external URL of your Red Hat Developer Hub instance.
- 2
- Use an environment variable exposing an OpenShift Container Platform secret to define the mandatory Developer Hub backend authentication key.
- 3
- Set the external URL of your Red Hat Developer Hub instance.
- 4
- Set the external URL of your Red Hat Developer Hub instance.
- Click Create.
- Select the Secrets view.
- Click Create Key/value Secret.
-
Create a secret named
secrets-rhdh. Add a key named
BACKEND_SECRETand a base64 encoded string as a value. Use a unique value for each Red Hat Developer Hub instance. For example, you can use the following command to generate a key from your terminal:node -p 'require("crypto").randomBytes(24).toString("base64")'node -p 'require("crypto").randomBytes(24).toString("base64")'Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Click Create.
- Select the Topology view.
Click the overflow menu for the Red Hat Developer Hub instance that you want to use and select Edit Backstage to load the YAML view of the Red Hat Developer Hub instance.
In the CR, enter the name of the custom application configuration config map as the value for the
spec.application.appConfig.configMapsfield, and enter the name of your secret as the value for thespec.application.extraEnvs.secretsfield. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Click Save.
- Navigate back to the Topology view and wait for the Red Hat Developer Hub pod to start.
- Click the Open URL icon to use the Red Hat Developer Hub platform with the configuration changes.
Additional resources
- For more information about roles and responsibilities in Developer Hub, see Role-Based Access Control (RBAC) in Red Hat Developer Hub.
Chapter 2. Bulk importing GitHub repositories Copy linkLink copied to clipboard!
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.
2.1. Enabling and giving access to the Bulk Import feature Copy linkLink copied to clipboard!
You can enable the Bulk Import feature for users and give them the necessary permissions to access it.
Prerequisites
- You have configured GitHub integration.
Procedure
The Bulk Import plugins are installed but disabled by default. To enable the
./dynamic-plugins/dist/janus-idp-backstage-plugin-bulk-import-backend-dynamicand./dynamic-plugins/dist/janus-idp-backstage-plugin-bulk-importplugins, edit yourdynamic-plugins.yamlwith the following content:dynamic-plugins.yamlfragmentplugins: - package: ./dynamic-plugins/dist/janus-idp-backstage-plugin-bulk-import-backend-dynamic disabled: false - package: ./dynamic-plugins/dist/janus-idp-backstage-plugin-bulk-import disabled: falseplugins: - package: ./dynamic-plugins/dist/janus-idp-backstage-plugin-bulk-import-backend-dynamic disabled: false - package: ./dynamic-plugins/dist/janus-idp-backstage-plugin-bulk-import disabled: falseCopy to Clipboard Copied! Toggle word wrap Toggle overflow 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-import
p, role:default/bulk-import, bulk.import, use, allow g, user:default/<your_user>, role:default/bulk-importCopy to Clipboard Copied! Toggle word wrap Toggle overflow Note 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.
2.2. Importing multiple GitHub repositories Copy linkLink copied to clipboard!
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.
2.3. Managing the added repositories Copy linkLink copied to clipboard!
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.
2.4. Understanding the Bulk Import audit Logs Copy linkLink copied to clipboard!
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
Chapter 3. Customizing the Home page in Red Hat Developer Hub Copy linkLink copied to clipboard!
When using the app-config, you can do the following:
- Customize and extend the default Home page layout with additional cards that appear based on the plugins you have installed and enabled.
- Change quick access links.
Add, reorganize, and remove the following available cards:
- Search bar
- Quick access
- Headline
- Markdown
- Placeholder
- Catalog starred entities
- Featured docs
3.1. Customizing the Home page cards Copy linkLink copied to clipboard!
Administrators can change the fixed height of cards that are in a 12-column grid.
The default Home page is as shown in the following app-config file configuration:
Prerequisites
-
You have administrative access and can modify the
app-config.yamlfile for dynamic plugin configurations.
Procedure
Configure different cards for your Home page in Red Hat Developer Hub as follows:
- Search
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Expand Table 3.1. Available props Prop Default Description path/searchOverride the linked search path if needed
queryParamqueryOverride the search query parameter name if needed
- Quick access
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Expand Table 3.2. Available props Prop Default Description titleQuick AccessOverride the linked search path if needed
pathnone
Override the search query parameter name if needed
- Headline
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Expand Table 3.3. Available props Prop Default Description titlenone
Title
- Markdown
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Placeholder
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Catalog starred entities
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Featured docs
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.2. Defining the layout of the Red Hat Developer Hub Home page Copy linkLink copied to clipboard!
Prerequisites
Include the following optimal parameters in each of your breakpoints:
- width (w)
- height (h)
- position (x and y)
Procedure
Configure your Developer Hub
app-config.yamlconfiguration file by choosing one of the following options:- Use the full space on smaller windows and half of the space on larger windows as follows:
-
Show the cards side by side by defining the
xparameter as follows:
However, you can see a second card below this card by default.
-
Show the cards in three columns by defining the
xparameter as follows:
Chapter 4. Customizing the Quick access card in Red Hat Developer Hub Copy linkLink copied to clipboard!
To access the Home page in Red Hat Developer Hub, the base URL must include the /developer-hub proxy. You can configure the Home page by passing the data into the app-config.yaml file as a proxy. You can provide data to the Home page from the following sources:
- JSON files hosted on GitHub or GitLab.
- A dedicated service that provides the Home page data in JSON format using an API.
4.1. Using hosted JSON files to provide data to the Quick access card Copy linkLink copied to clipboard!
Prerequisites
- You have installed Red Hat Developer Hub by using either the Operator or Helm chart. See Installing Red Hat Developer Hub on OpenShift Container Platform.
Procedure
-
To access the data from the JSON files, add the following code to the Developer Hub
app-config.yamlconfiguration file: Add the following code to the
app-config.yamlfile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.2. Using a dedicated service to provide data to the Quick access card Copy linkLink copied to clipboard!
When using a dedicated service, you can do the following:
- Use the same service to provide the data to all configurable Developer Hub pages or use a different service for each page.
-
Use the
red-hat-developer-hub-customization-provideras an example service, which provides data for both the Home and Tech Radar pages. Thered-hat-developer-hub-customization-providerservice provides the same data as default Developer Hub data. You can fork thered-hat-developer-hub-customization-providerservice repository from GitHub and modify it with your own data, if required. -
Deploy the
red-hat-developer-hub-customization-providerservice and the Developer Hub Helm chart on the same cluster.
Prerequisites
- You have installed the Red Hat Developer Hub using Helm Chart.
For more information, see Installing Red Hat Developer Hub on OpenShift Container Platform with the Helm chart.
Procedure
To use a separate service to provide the Home page data, complete the following steps:
- From the Developer perspective in the Red Hat OpenShift Container Platform web console, click +Add > Import from Git.
Enter the URL of your Git repository into the Git Repo URL field.
To use the
red-hat-developer-hub-customization-providerservice, add the URL for the red-hat-developer-hub-customization-provider repository or your fork of the repository containing your customizations.- On the General tab, enter red-hat-developer-hub-customization-provider in the Name field and click Create.
On the Advanced Options tab, copy the value from the Target Port.
NoteThe Target Port automatically generates a Kubernetes or OpenShift Container Platform service to communicate with.
Add the following code to the
app-config-rhdh.yamlfile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow where
HOMEPAGE_DATA_URLis defined ashttp://<SERVICE_NAME>:8080, for example,http://rhdh-customization-provider:8080.NoteThe
red-hat-developer-hub-customization-providerservice contains the 8080 port by default. If you are using a custom port, you can specify it with the 'PORT' environmental variable in theapp-config-rhdh.yamlfile.-
Replace the
HOMEPAGE_DATA_URLby adding the URL torhdh-secretsor by directly replacing it in your custom ConfigMap. - Delete the Developer Hub pod to ensure that the new configurations are loaded correctly.
Verification
To view the service, navigate to the Administrator perspective in the OpenShift Container Platform web console and click Networking > Service.
NoteYou can also view the Service Resources in the Topology view.
Ensure that the provided API URL for the Home page returns the data in JSON format as shown in the following example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteIf the request call fails or is not configured, the Developer Hub instance falls back to the default local data.
-
If the images or icons do not load, then allowlist them by adding your image or icon host URLs to the content security policy’s (csp)
img-srcin your custom ConfigMap as follows:
Chapter 5. Customizing the Tech Radar page in Red Hat Developer Hub Copy linkLink copied to clipboard!
In Red Hat Developer Hub, the Tech Radar page is provided by the tech-radar dynamic plugin, which is disabled by default. For information about enabling dynamic plugins in Red Hat Developer Hub see Configuring plugins in Red Hat Developer Hub.
In Red Hat Developer Hub, you can configure Learning Paths by passing the data into the app-config.yaml file as a proxy. The base Tech Radar URL must include the /developer-hub/tech-radar proxy.
Due to the use of overlapping pathRewrites for both the tech-radar and homepage quick access proxies, you must create the tech-radar configuration (^api/proxy/developer-hub/tech-radar) before you create the homepage configuration (^/api/proxy/developer-hub).
For more information about customizing the Home page in Red Hat Developer Hub, see Customizing the Home page in Red Hat Developer Hub.
You can provide data to the Tech Radar page from the following sources:
- JSON files hosted on GitHub or GitLab.
- A dedicated service that provides the Tech Radar data in JSON format using an API.
5.1. Using hosted JSON files to provide data to the Tech Radar page Copy linkLink copied to clipboard!
Prerequisites
You have installed Red Hat Developer Hub by using either the Operator or Helm chart.
For more information, see Installing Red Hat Developer Hub on OpenShift Container Platform.
Procedure
To access the data from the JSON files, complete the following step:
Add the following code to the
app-config.yamlfile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.2. Using a dedicated service to provide data to the Tech Radar page Copy linkLink copied to clipboard!
When using a dedicated service, you can do the following:
- Use the same service to provide the data to all configurable Developer Hub pages or use a different service for each page.
-
Use the
red-hat-developer-hub-customization-provideras an example service, which provides data for both the Home and Tech Radar pages. Thered-hat-developer-hub-customization-providerservice provides the same data as default Developer Hub data. You can fork thered-hat-developer-hub-customization-providerservice repository from GitHub and modify it with your own data, if required. -
Deploy the
red-hat-developer-hub-customization-providerservice and the Developer Hub Helm chart on the same cluster.
Prerequisites
- You have installed the Red Hat Developer Hub using Helm Chart.
For more information, see Installing Red Hat Developer Hub on OpenShift Container Platform with the Helm chart.
Procedure
To use a separate service to provide the Tech Radar data, complete the following steps:
Add the following code to the
app-config-rhdh.yamlfile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow where the
TECHRADAR_DATA_URLis defined ashttp://<SERVICE_NAME>/tech-radar, for example,http://rhdh-customization-provider/tech-radar.NoteYou can define the
TECHRADAR_DATA_URLby adding it torhdh-secretsor by directly replacing it with its value in your custom ConfigMap.- Delete the Developer Hub pod to ensure that the new configurations are loaded correctly.
Chapter 6. Customizing the Learning Paths in Red Hat Developer Hub Copy linkLink copied to clipboard!
In Red Hat Developer Hub, you can configure Learning Paths by passing the data into the app-config.yaml file as a proxy. The base URL must include the /developer-hub/learning-paths proxy.
Due to the use of overlapping pathRewrites for both the learning-path and homepage quick access proxies, you must create the learning-paths configuration (^api/proxy/developer-hub/learning-paths) before you create the homepage configuration (^/api/proxy/developer-hub).
For more information about customizing the Home page in Red Hat Developer Hub, see Customizing the Home page in Red Hat Developer Hub.
You can provide data to the Learning Path from the following sources:
- JSON files hosted on GitHub or GitLab.
- A dedicated service that provides the Learning Path data in JSON format using an API.
6.1. Using hosted JSON files to provide data to the Learning Paths Copy linkLink copied to clipboard!
Prerequisites
You have installed Red Hat Developer Hub by using either the Operator or Helm chart.
For more information, see Installing Red Hat Developer Hub on OpenShift Container Platform.
Procedure
To access the data from the JSON files, complete the following step:
Add the following code to the
app-config.yamlfile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
6.2. Using a dedicated service to provide data to the Learning Paths Copy linkLink copied to clipboard!
When using a dedicated service, you can do the following:
- Use the same service to provide the data to all configurable Developer Hub pages or use a different service for each page.
-
Use the
red-hat-developer-hub-customization-provideras an example service, which provides data for both the Home and Tech Radar pages. Thered-hat-developer-hub-customization-providerservice provides the same data as default Developer Hub data. You can fork thered-hat-developer-hub-customization-providerservice repository from GitHub and modify it with your own data, if required. -
Deploy the
red-hat-developer-hub-customization-providerservice and the Developer Hub Helm chart on the same cluster.
Prerequisites
- You have installed the Red Hat Developer Hub using Helm chart.
For more information, see Installing Red Hat Developer Hub on OpenShift Container Platform.
Procedure
To use a dedicated service to provide the Learning Path data, complete the following steps:
Add the following code to the
app-config-rhdh.yamlfile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow where the
LEARNING_PATH_DATA_URLis defined ashttp://<SERVICE_NAME>/learning-paths, for example,http://rhdh-customization-provider/learning-paths.NoteYou can define the
LEARNING_PATH_DATA_URLby adding it torhdh-secretsor by directly replacing it with its value in your custom ConfigMap.- Delete the Developer Hub pod to ensure that the new configurations are loaded correctly.
Chapter 7. Customizing the appearance of your Red Hat Developer Hub instance Copy linkLink copied to clipboard!
The following default theme configurations are available for Red Hat Developer Hub:
- The Red Hat Developer Hub theme
- Default theme configurations to make your developer portal look like a standard Red Hat Developer Hub instance. For more information, see Section 7.8, “Default Red Hat Developer Hub theme”
- The Backstage theme
- Default theme configurations to make your developer portal look like a standard Backstage instance. For more information, see Section 7.9, “Default Backstage theme”
You can change or disable particular parameters in a default theme or create a fully customized theme by modifying the app-config-rhdh.yaml file. From the the app-config-rhdh.yaml file, you can customize common theme components, including the following:
- Company name and logo
- Font color, size, and style of text in paragraphs, headings, headers, and buttons
- Header color, gradient, and shape
- Button color
- Navigation indicator color
You can also customize some components from the Developer Hub GUI, such as the theme mode (Light Theme, Dark Theme, or Auto).
7.1. Customizing the theme mode for your Developer Hub instance Copy linkLink copied to clipboard!
In Developer Hub, theme configurations are used to change the look and feel of different UI components. So, you might notice changes in different UI components, such as buttons, tabs, sidebars, cards, and tables along with some changes in background color and font used on the RHDH pages.
You can choose one of the following theme modes for your Developer Hub instance:
- Light theme
- Dark theme
- Auto
The default theme mode is Auto, which automatically sets the light or dark theme based on your system preferences.
Prerequisites
- You are logged in to the Developer Hub web console.
Procedure
- From the Developer Hub web console, click Settings.
From the Appearance panel, click LIGHT THEME, DARK THEME, or AUTO to change the theme mode.
7.2. Customizing the branding logo of your Developer Hub instance Copy linkLink copied to clipboard!
You can customize the branding logo of your Developer Hub instance by configuring the branding section the app-config-rhdh.yaml file, as shown in the following example:
app:
branding:
fullLogo: ${BASE64_EMBEDDED_FULL_LOGO}
iconLogo: ${BASE64_EMBEDDED_ICON_LOGO}
app:
branding:
fullLogo: ${BASE64_EMBEDDED_FULL_LOGO}
iconLogo: ${BASE64_EMBEDDED_ICON_LOGO}
where:
You can also customize the width of the branding logo by setting a value for the fullLogoWidth field in the branding section, as shown in the following example:
app:
branding:
fullLogoWidth: 110px
# ...
app:
branding:
fullLogoWidth: 110px
# ...
- 1
- The default value for the logo width is
110px. The following units are supported:integer,px,em,rem, percentage.
7.4. Customizing the application title for your Developer Hub instance Copy linkLink copied to clipboard!
You can customize the app title text by setting a value for the title field, as shown in the following example:
app: title: My custom developer hub # ...
app:
title: My custom developer hub
# ...
7.5. Customizing the theme mode color palettes for your Developer Hub instance Copy linkLink copied to clipboard!
You can customize the color palettes of the light and dark theme modes in your Developer Hub instance by configuring the light.palette and dark.palette parameters in the branding.theme section of the app-config-rhdh.yaml file, as shown in the following example:
- 1
- The main primary color for the light color palette, for example,
#fffffforwhite - 2
- The color of the navigation indicator for the light color palette, which is a vertical bar that indicates the selected tab in the navigation panel, for example,
#FF0000orred - 3
- The background color for the default page theme for the light color palette, for example,
#fffffforwhite - 4
- The main primary color for the dark color palette, for example,
#000000orblack - 5
- The color of the navigation indicator for the dark color palette, which is a vertical bar that indicates the selected tab in the navigation panel, for example,
#FF0000orred - 6
- The background color for the default page theme for the dark color palette, for example,
#000000orblack
Additional resources
7.6. Customizing the page theme header for your Developer Hub instance Copy linkLink copied to clipboard!
You can customize the header color for the light and dark theme modes in your Developer Hub instance by modifying the branding.theme section of the app-config-rhdh.yaml file. You can also customize the page headers for additional Developer Hub pages, such as the Home, Catalog, and APIs pages.
- 1
- The theme mode, for example,
lightordark - 2
- The
yamlheader for the default page theme configuration - 3
- The color of the page header background, for example,
#fffffforwhite - 4
- The color of the text in the page header, for example,
#000000orblack - 5
- The pattern on the page header, for example,
wave,round, ornone - 6
- The
yamlheader for a specific page theme configuration, for example,apis,home
7.7. Customizing the font for your Developer Hub instance Copy linkLink copied to clipboard!
You can configure the typography section of the app-config-rhdh.yaml file to change the default font family and size of the page text, as well as the font family and size of each heading level, as shown in the following example:
7.8. Default Red Hat Developer Hub theme Copy linkLink copied to clipboard!
You can use the default Red Hat Developer Hub theme configurations to make your Developer Hub instance look like a standard Red Hat Developer Hub instance. You can also modify the app-config-rhdh.yaml file to customize or disable particular parameters.
7.8.1. Default Red Hat Developer Hub theme color palette Copy linkLink copied to clipboard!
The app-config-rhdh.yaml file uses the following configurations for the default Red Hat Developer Hub color palette:
Alternatively, you can use the following variant and mode values in the app-config-rhdh.yaml file to apply the previous default configuration:
7.8.2. Default Red Hat Developer Hub page themes Copy linkLink copied to clipboard!
The default Developer Hub header color is white in light mode and black in dark mode, as shown in the following app-config-rhdh.yaml file configuration:
7.9. Default Backstage theme Copy linkLink copied to clipboard!
You can use the default Backstage theme configurations to make your Developer Hub instance look like a standard Backstage instance. You can also modify the app-config-rhdh.yaml file to customize or disable particular parameters.
7.9.1. Default Backstage theme color palette Copy linkLink copied to clipboard!
The app-config-rhdh.yaml file uses the following configurations for the default Backstage color palette:
Alternatively, you can use the following variant and mode values in the app-config-rhdh.yaml file to apply the previous default configuration:
7.9.2. Default Backstage page themes Copy linkLink copied to clipboard!
The default Backstage header color is white in light mode and black in dark mode, as shown in the following app-config-rhdh.yaml file configuration:
7.10. Custom component options for your Developer Hub instance Copy linkLink copied to clipboard!
There are two component variants that you can use to customize various components of your Developer Hub theme:
- Patternfly
- MUI
In addition to assigning a component variant to each parameter in the light or dark theme mode configurations, you can toggle the rippleEffect on or off.
The following code shows the options that you can use in the app-config-rhdh.yaml file to configure the theme components for your Developer Hub instance:
Chapter 8. ServiceNow Custom actions in Red Hat Developer Hub Copy linkLink copied to clipboard!
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.
In Red Hat Developer Hub, you can access ServiceNow custom actions (custom actions) for fetching and registering resources in the catalog.
The custom actions in Developer Hub enable you to facilitate and automate the management of records. Using the custom actions, you can perform the following actions:
- Create, update, or delete a record
- Retrieve information about a single record or multiple records
8.1. Enabling ServiceNow custom actions plugin in Red Hat Developer Hub Copy linkLink copied to clipboard!
In Red Hat Developer Hub, the ServiceNow custom actions are provided as a pre-loaded plugin, which is disabled by default. You can enable the custom actions plugin using the following procedure.
Prerequisites
- Red Hat Developer Hub is installed and running.
For more information about installing the Developer Hub, see Installing Red Hat Developer Hub on OpenShift Container Platform with the Helm chart.
- You have created a project in the Developer Hub.
Procedure
To activate the custom actions plugin, add a
packagewith plugin name and update thedisabledfield in your Helm Chart as follows:Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThe default configuration for a plugin is extracted from the
dynamic-plugins.default.yamlfile, however, you can use apluginConfigentry to override the default configuration.Set the following variables in the Helm Chart to access the custom actions:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
8.2. Supported ServiceNow custom actions in Red Hat Developer Hub Copy linkLink copied to clipboard!
The ServiceNow custom actions enable you to manage records in the Red Hat Developer Hub. The custom actions support the following HTTP methods for API requests:
-
GET: Retrieves specified information from a specified resource endpoint -
POST: Creates or updates a resource -
PUT: Modify a resource -
PATCH: Updates a resource -
DELETE: Deletes a resource
8.2.1. ServiceNow custom actions Copy linkLink copied to clipboard!
- [GET] servicenow:now:table:retrieveRecord
Retrieves information of a specified record from a table in the Developer Hub.
Expand Table 8.1. Input parameters Name Type Requirement Description tableNamestringRequired
Name of the table to retrieve the record from
sysIdstringRequired
Unique identifier of the record to retrieve
sysparmDisplayValueenum("true", "false", "all")Optional
Returns field display values such as
true, actual values asfalse, or both. The default value isfalse.sysparmExcludeReferenceLinkbooleanOptional
Set as
trueto exclude Table API links for reference fields. The default value isfalse.sysparmFieldsstring[]Optional
Array of fields to return in the response
sysparmViewstringOptional
Renders the response according to the specified UI view. You can override this parameter using
sysparm_fields.sysparmQueryNoDomainbooleanOptional
Set as
trueto access data across domains if authorized. The default value isfalse.Expand Table 8.2. Output parameters Name Type Description resultRecord<PropertyKey, unknown>The response body of the request
- [GET] servicenow:now:table:retrieveRecords
Retrieves information about multiple records from a table in the Developer Hub.
Expand Table 8.3. Input parameters Name Type Requirement Description tableNamestringRequired
Name of the table to retrieve the records from
sysparamQuerystringOptional
Encoded query string used to filter the results
sysparmDisplayValueenum("true", "false", "all")Optional
Returns field display values such as
true, actual values asfalse, or both. The default value isfalse.sysparmExcludeReferenceLinkbooleanOptional
Set as
trueto exclude Table API links for reference fields. The default value isfalse.sysparmSuppressPaginationHeaderbooleanOptional
Set as
trueto suppress pagination header. The default value isfalse.sysparmFieldsstring[]Optional
Array of fields to return in the response
sysparmLimitintOptional
Maximum number of results returned per page. The default value is
10,000.sysparmViewstringOptional
Renders the response according to the specified UI view. You can override this parameter using
sysparm_fields.sysparmQueryCategorystringOptional
Name of the query category to use for queries
sysparmQueryNoDomainbooleanOptional
Set as
trueto access data across domains if authorized. The default value isfalse.sysparmNoCountbooleanOptional
Does not execute a select count(*) on the table. The default value is
false.Expand Table 8.4. Output parameters Name Type Description resultRecord<PropertyKey, unknown>The response body of the request
- [POST] servicenow:now:table:createRecord
Creates a record in a table in the Developer Hub.
Expand Table 8.5. Input parameters Name Type Requirement Description tableNamestringRequired
Name of the table to save the record in
requestBodyRecord<PropertyKey, unknown>Optional
Field name and associated value for each parameter to define in the specified record
sysparmDisplayValueenum("true", "false", "all")Optional
Returns field display values such as
true, actual values asfalse, or both. The default value isfalse.sysparmExcludeReferenceLinkbooleanOptional
Set as
trueto exclude Table API links for reference fields. The default value isfalse.sysparmFieldsstring[]Optional
Array of fields to return in the response
sysparmInputDisplayValuebooleanOptional
Set field values using their display value such as
trueor actual value asfalse. The default value isfalse.sysparmSuppressAutoSysFieldbooleanOptional
Set as
trueto suppress auto-generation of system fields. The default value isfalse.sysparmViewstringOptional
Renders the response according to the specified UI view. You can override this parameter using
sysparm_fields.Expand Table 8.6. Output parameters Name Type Description resultRecord<PropertyKey, unknown>The response body of the request
- [PUT] servicenow:now:table:modifyRecord
Modifies a record in a table in the Developer Hub.
Expand Table 8.7. Input parameters Name Type Requirement Description tableNamestringRequired
Name of the table to modify the record from
sysIdstringRequired
Unique identifier of the record to modify
requestBodyRecord<PropertyKey, unknown>Optional
Field name and associated value for each parameter to define in the specified record
sysparmDisplayValueenum("true", "false", "all")Optional
Returns field display values such as
true, actual values asfalse, or both. The default value isfalse.sysparmExcludeReferenceLinkbooleanOptional
Set as
trueto exclude Table API links for reference fields. The default value isfalse.sysparmFieldsstring[]Optional
Array of fields to return in the response
sysparmInputDisplayValuebooleanOptional
Set field values using their display value such as
trueor actual value asfalse. The default value isfalse.sysparmSuppressAutoSysFieldbooleanOptional
Set as
trueto suppress auto-generation of system fields. The default value isfalse.sysparmViewstringOptional
Renders the response according to the specified UI view. You can override this parameter using
sysparm_fields.sysparmQueryNoDomainbooleanOptional
Set as
trueto access data across domains if authorized. The default value isfalse.Expand Table 8.8. Output parameters Name Type Description resultRecord<PropertyKey, unknown>The response body of the request
- [PATCH] servicenow:now:table:updateRecord
Updates a record in a table in the Developer Hub.
Expand Table 8.9. Input parameters Name Type Requirement Description tableNamestringRequired
Name of the table to update the record in
sysIdstringRequired
Unique identifier of the record to update
requestBodyRecord<PropertyKey, unknown>Optional
Field name and associated value for each parameter to define in the specified record
sysparmDisplayValueenum("true", "false", "all")Optional
Returns field display values such as
true, actual values asfalse, or both. The default value isfalse.sysparmExcludeReferenceLinkbooleanOptional
Set as
trueto exclude Table API links for reference fields. The default value isfalse.sysparmFieldsstring[]Optional
Array of fields to return in the response
sysparmInputDisplayValuebooleanOptional
Set field values using their display value such as
trueor actual value asfalse. The default value isfalse.sysparmSuppressAutoSysFieldbooleanOptional
Set as
trueto suppress auto-generation of system fields. The default value isfalse.sysparmViewstringOptional
Renders the response according to the specified UI view. You can override this parameter using
sysparm_fields.sysparmQueryNoDomainbooleanOptional
Set as
trueto access data across domains if authorized. The default value isfalse.Expand Table 8.10. Output parameters Name Type Description resultRecord<PropertyKey, unknown>The response body of the request
- [DELETE] servicenow:now:table:deleteRecord
Deletes a record from a table in the Developer Hub.
Expand Table 8.11. Input parameters Name Type Requirement Description tableNamestringRequired
Name of the table to delete the record from
sysIdstringRequired
Unique identifier of the record to delete
sysparmQueryNoDomainbooleanOptional
Set as
trueto access data across domains if authorized. The default value isfalse.