Chapter 6. Extensions in Red Hat Developer Hub
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 (RHDH) includes the Extensions feature which is preinstalled and enabled by default. Extensions provides users with a centralized interface to browse and manage available plugins
You can use Extensions to discover plugins that extend RHDH functionality, streamline development workflows, and improve the developer experience.
6.1. Viewing available plugins Copy linkLink copied to clipboard!
You can view available plugins for your Red Hat Developer Hub application on the Extensions page.
Procedure
- Open your RHDH application and click Administration > Extensions.
Go to the Catalog tab to view a list of available plugins and related information.
6.2. Viewing installed plugins Copy linkLink copied to clipboard!
Using the Dynamic Plugins Info front-end plugin, you can view plugins that are currently installed in your Red Hat Developer Hub application. This plugin is enabled by default.
Procedure
- Open your Developer Hub application and click Administration > Extensions.
- Go to the Installed tab to view a list of installed plugins and related information.
6.3. Searching for plugins by name Copy linkLink copied to clipboard!
You can use the search bar in the header to filter the Extensions plugin cards by name. For example, if you type “A” into the search bar, Extensions shows only the plugins that contain the letter “A” in the Name field.
Procedure
In the header search bar, enter a plugin name, such as "Dynatrace".
Optional: Refine your search by selecting one of the following filters:
- Category
- Author
- Support type
Verification
- The Extensions list updates to display only the plugins that match your search text and selected filters.
6.4. Disabling the Extensions interface Copy linkLink copied to clipboard!
The Extensions feature is enabled by default. To remove the Extensions interface (Marketplace) from your instance, you must disable the relevant plugins.
Procedure
Edit your
dynamic-plugins.yamlwith the following content.plugins: - package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-extensions disabled: true - package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-catalog-backend-module-extensions-dynamic disabled: true - package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-extensions-backend-dynamic disabled: true
Disabling these plugins removes the Catalog and Installed tabs. You can still view a basic list of installed plugins by selecting Administration > Extensions.
6.5. Managing plugins by using Extensions Copy linkLink copied to clipboard!
Administrators can install and configure plugins directly through the Extensions interface.
This feature is supported in development environments only. In a production environment, the interface prevents plugin installation and is not supported.
Procedure
- Navigate to Administration > Extensions.
- On the Catalog tab, select a plugin to install. You can use the default configuration or modify it.
On the Installed tab, use the Actions menu on a plugin card to:
- Edit the configuration.
- Disable or enable the plugin.
- Restart the backend to apply your changes.
6.5.1. Configuring RBAC to manage Extensions Copy linkLink copied to clipboard!
You can add Extensions permissions by creating or updating and existing RBAC role. For more information about using RBAC to manage role-based controls, see Managing role-based access controls (RBAC) using the Red Hat Developer Hub Web UI.
6.5.1.1. Creating a role in the Developer Hub UI to manage Extensions Copy linkLink copied to clipboard!
Prerequisites
- You have enabled RBAC, have a policy administrator role in Developer Hub, and have added plugins with permission.
Procedure
Go to Administration at the bottom of the sidebar in the Developer Hub.
The RBAC tab appears, displaying all the created roles in the Developer Hub.
- Click Create to create a role.
- Enter the user name and description (optional) of role in the given fields and click Next.
- In Add users and groups, select the user name, and click Next.
- In Add permission policies, select Extensions from the plugins dropdown.
- Expand Extensions, select both the Create and Read permissions for the Extensions plugin and click Next.
Click Create to create the role.
Verification
After you refresh the RHDH application, when you select a plugin, the Actions drop-down is active. When you click the Actions drop-down, you can edit the the plugin configuration, and enable or disable the plugin.
6.5.2. Configuring RHDH to install plugins by using Extensions Copy linkLink copied to clipboard!
When you install a plugin using Extensions UI, the configuration that you use is saved to a dynamic-plugins.extensions.yaml file within the dynamic-plugins-root persistent volume. This ensures the configuration is available when you restart the application, allowing you to edit or re-enable the plugin.
You must create a persistent volume claim (PVC) to ensure that the cache persists when you restart the RHDH application. For more information about using the dynamic plugins cache, see Using the dynamic plugins cache.
Prerequisites
- You have created a persistent volume claim (PVC) for the dynamic plugins cache with the name dynamic-plugins-root.
- You have installed Red Hat Developer Hub using the Helm chart or the Operator.
-
You have installed the OpenShift CLI (
oc).
Procedure
Create the extensions configuration file and save it as
dynamic-plugins.extensions.yaml. For example:includes: - dynamic-plugins.default.yaml plugins: - package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-extensions disabled: false pluginConfig: dynamicPlugins: frontend: red-hat-developer-hub.backstage-plugin-marketplace: translationResources: - importName: marketplaceTranslations ref: marketplaceTranslationRef module: Alpha appIcons: - name: pluginsIcon importName: PluginsIcon dynamicRoutes: - path: /extensions importName: DynamicMarketplacePluginRouter menuItem: icon: pluginsIcon text: Extensions textKey: menuItem.extensions menuItems: extensions: parent: default.admin - package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-extensions-backend-dynamic disabled: false pluginConfig: extensions: installation: enabled: true saveToSingleFile: file: /opt/app-root/src/dynamic-plugins-root/dynamic-plugins.extensions.yamlwhere:
translationResources- Sets the extension point for localization.
Copy the file to your cluster by running the following commands:
oc get pods -n <your-namespace> oc cp ./dynamic-plugins.extensions.yaml <your-namespace>/<pod-name>:/opt/app-root/src/dynamic-plugins-root/dynamic-plugins.extensions.yamlUpdate your RHDH application to use this file:
For operator-based installations:
Update your Backstage CR to update the
NODE_ENVenvironment variable todevelopment, as follows:apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: developer-hub namespace: rhdh spec: application: dynamicPluginsConfigMapName: dynamic-plugins-rhdh extraEnvs: envs: - name: NODE_ENV value: "development" secrets: - name: secrets-rhdh extraFiles: mountPath: /opt/app-root/src route: enabled: true database: enableLocalDb: trueUpdate your
dynamic-plugins-rhdhconfig map to include your extensions configuration file, as follows:kind: ConfigMap apiVersion: v1 metadata: name: dynamic-plugins-rhdh namespace: rhdh data: dynamic-plugins.yaml: | includes: - dynamic-plugins.default.yaml - /dynamic-plugins-root/dynamic-plugins.extensions.yaml plugins: []
For Helm chart installations:
Upgrade the Helm release to include your extensions configuration file and update the
NODE_ENVenvironment variable todevelopment:global: auth: backend: enabled: true clusterRouterBase: apps.<clusterName>.com dynamic: includes: - dynamic-plugins.default.yaml - /dynamic-plugins-root/dynamic-plugins.extensions.yaml upstream: backstage: extraEnvVars: - name: NODE_ENV value: development- Click Upgrade
Verification
Enable a plugin by using the Extensions UI, restart your RHDH application and refresh the UI to confirm that the plugin is enabled.
6.5.3. Configuring RHDH Local to install plugins by using Extensions Copy linkLink copied to clipboard!
You can use RHDH Local to test installing plugins by using Extensions.
RHDH Local is maintained as an open-source project by Red Hat, but is not supported or subject to any service level agreement (SLA).
Prerequisites
- You have installed RHDH Local. For more information about setting up RHDH Local, see Test locally with Red Hat Developer Hub.
Procedure
Update your
dynamic-plugins.override.yamlfile:includes: - dynamic-plugins.default.yaml plugins: - package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-extensions disabled: false pluginConfig: dynamicPlugins: frontend: red-hat-developer-hub.backstage-plugin-marketplace: translationResources: - importName: marketplaceTranslations ref: marketplaceTranslationRef module: Alpha appIcons: - name: pluginsIcon importName: PluginsIcon dynamicRoutes: - path: /extensions importName: DynamicMarketplacePluginRouter menuItem: icon: pluginsIcon text: Extensions textKey: menuItem.extensions menuItems: extensions: parent: default.admin - package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-extensions-backend-dynamic disabled: false pluginConfig: extensions: installation: enabled: true saveToSingleFile: file: /opt/app-root/src/configs/dynamic-plugins/dynamic-plugins.override.yamlwhere:
translationResources- Sets the extension point for localization.
Update your
compose.yamlfile:rhdh: container_name: rhdh environment: NODE_OPTIONS: "--inspect=0.0.0.0:9229" NODE_ENV: "development"
Verification
Enable a plugin by using the Extensions UI, restart your RHDH application and refresh the UI to confirm that the plugin is enabled.
6.5.4. Installing plugins by using Extensions Copy linkLink copied to clipboard!
You can install and configure plugins by using Extensions.
Prerequisites
- You have configured RHDH to allow plugins installation from Extensions.
- You have configured RBAC to allow the current user to manage plugin configuration.
Procedure
- Navigate to Extensions.
- Select a plugin to install.
Click the Install button.
The code editor is displayed which displays the plugin default configuration.
Update the plugin configuration, if necessary.
- Click Install
To view the plugins that require a restart, click View plugins in the alert message.
- Restart your RHDH application.
Verification
- After you restart your RHDH application, navigate to Extensions.
- Select the plugin that you have installed.
- The Actions button is displayed.
6.5.5. Enabling and disabling plugins by using Extensions Copy linkLink copied to clipboard!
Prerequisites
- You have configured RHDH to allow plugins installation from Extensions.
- You have configured RBAC to allow the current user to access to manage plugin configuration.
Procedure
- Navigate to Extensions.
- Select a plugin to enable or disable.
Click on the Enable/Disable slider.
To view the plugins that require a restart, click View plugins in the alert message.
- Restart your RHDH application.
Verification
- After you restart your RHDH application, navigate to Extensions.
- Select the plugin that you have installed.
- The Enable/Disable slider is updated.