Manage plugins

Control access to plugin administration, configure persistent storage, and manage the plugin lifecycle through the Extensions UI. Role-based access control restricts who can install, enable, or disable plugins on the platform.

Control plugin administration access

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.

Before you begin

  • If RBAC is enabled, you have a role with the following permissions: policy.entity.create, policy.entity.update, policy.entity.read, catalog.entity.read.

About this task

Important

Developer Preview features are not supported by Red Hat in any way and are not functionally complete or production-ready. Do not use Developer Preview features for production or business-critical workloads. Developer Preview features provide early access to functionality in advance of possible inclusion in a Red Hat product offering. Customers can use these features to test functionality and provide feedback during the development process. Developer Preview features might not have any documentation, are subject to change or removal at any time, and have received limited testing. Red Hat might provide ways to submit feedback on Developer Preview features without an associated SLA.

For more information about the support scope of Red Hat Developer Preview features, see Developer Preview Support Scope.

Procedure

  1. Go to Administration at the bottom of the sidebar in the Developer Hub.

    The RBAC tab is displayed, showing all the created roles in the Developer Hub.

  2. Click Create to create a role.
  3. Enter the user name and description (optional) of role in the given fields and click Next.
  4. In Add users and groups, select the user name, and click Next.
  5. In Add permission policies, select Extensions from the plugins dropdown.
  6. Expand Extensions, select both the Create and Read permissions for the Extensions plugin and click Next.
  7. Click Create to create the role.
    Creating an RBAC role with Extensions permissions

Results

After you refresh the RHDH application and select a plugin, the Actions drop-down becomes active. Use it to:

  • Edit the plugin configuration
  • Enable the plugin
  • Disable the plugin

Configure persistent storage for plugin installations

To retain plugins installed through the Extensions UI across application restarts, configure persistent storage for the dynamic plugin cache. A persistent volume claim (PVC) stores the Extensions configuration file.

Before you begin

  • 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).

About this task

Important

Installing plugins through Extensions is supported only in development environments. The Extensions interface prevents plugin installations in production environments.

For more information about the dynamic plugins cache, see Using the dynamic plugins cache.

Procedure

  1. Create the extensions configuration file and save it as dynamic-plugins.extensions.yaml. For example:
    includes:
      - dynamic-plugins.default.yaml
    
    plugins:
      - package: ref://red-hat-developer-hub-backstage-plugin-extensions-backend
        enabled: true
        pluginConfig:
          extensions:
            installation:
              enabled: true
              saveToSingleFile:
                file: ${RHDH_EXTENSIONS_INSTALL_EXPORT_PATH}

    The Extensions front-end plugin is enabled by default and provides its page, sidebar item, and translations through the new front-end system. You do not need dynamicPlugins.frontend entries for these features. Set RHDH_EXTENSIONS_INSTALL_EXPORT_PATH to the file path used in the following deployment steps.

  2. 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.yaml
  3. Update your RHDH application to use this file:
    1. For operator-based installations:
      1. Update your Backstage CR to update the NODE_ENV environment variable to development, 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"
                - name: "RHDH_EXTENSIONS_INSTALL_EXPORT_PATH"
                  value: /opt/app-root/src/dynamic-plugins-root/dynamic-plugins.extensions.yaml
              secrets:
                - name: secrets-rhdh
            extraFiles:
              mountPath: /opt/app-root/src
            route:
              enabled: true
          database:
            enableLocalDb: true
      2. Update your dynamic-plugins-rhdh config 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: []
    2. For Helm chart installations:
      1. Upgrade the Helm release to include your extensions configuration file and update the NODE_ENV environment variable to development:
        auth:
          backend:
            enabled: true
        openshift:
          clusterRouterBase: apps.<clusterName>.com
        dynamicPlugins:
          includes:
            - dynamic-plugins.default.yaml
            - /dynamic-plugins-root/dynamic-plugins.extensions.yaml
        extraEnv:
          - name: NODE_ENV
            value: development
          - name: "RHDH_EXTENSIONS_INSTALL_EXPORT_PATH"
            value: /opt/app-root/src/dynamic-plugins-root/dynamic-plugins.extensions.yaml
      2. Click Upgrade

Results

Enable a plugin by using the Extensions UI, restart your RHDH application, and refresh the UI to confirm that you enabled the plugin.

View plugins

You can view available plugins for your Red Hat Developer Hub application on the Extensions page.

Procedure

  1. Open your RHDH application and click Administration > Extensions.
  2. Go to the Catalog tab to view a list of available plugins and related information.
    Extensions Catalog

Search for plugins by name

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”.

Procedure

  1. In the header search bar, enter a plugin search string, such as "Dyn".
    Extensions catalog with a Dynatrace search
  2. Optional: Refine your search by selecting one of the following filters:
    1. Category
    2. Author
    3. Support type

Results

  • The Extensions list updates to display only the plugins that match your search text and selected filters.

View installed plugins

Using the Dynamic Plugins Info front-end plugin, you can view plugins that your Red Hat Developer Hub application currently has installed. Red Hat Developer Hub enables the Dynamic Plugins Info plugin by default.

Procedure

  1. Open your Developer Hub application and click Administration > Extensions.
  2. Go to the Installed tab to view a list of installed plugins and related information.

Install and configure portal plugins

You can install and configure plugins by using Extensions.

Before you begin

Procedure

  1. Navigate to Extensions.
  2. Select a plugin to install.
  3. Click the Install button.
    Installing a plugin from the Extensions page

    The code editor is displayed that displays the plugin default configuration.

  4. Update the plugin configuration, if necessary.
    Plugin configuration code editor
  5. Click Install
  6. To view the plugins that require a restart, click View plugins in the alert message.
    Alert showing plugins that require a restart
  7. Restart your RHDH application.

Results

  1. After you restart your RHDH application, navigate to Extensions.
  2. Select the plugin that you have installed.
  3. The Actions button is displayed.

Use RHDH Local to test installing plugins by using Extensions

RHDH Local provides a ready-to-use environment for testing the Extensions feature without additional configuration. Extensions is enabled by default, allowing you to install and test plugins directly from the RHDH web interface.

Important

Red Hat maintains RHDH Local as an open source project, but does not support it or subject it to any service level agreement (SLA). There is no official, or commercial support for RHDH Local. Use RHDH Local at your own risk.

RHDH Local is NOT a substitute for Red Hat Developer Hub. It’s intended use is for development and testing purposes only, not for production use.

RHDH Local is designed for individual developers to try out various RHDH features, not for use by development teams as there is no out-of-the-box RBAC support.

For information about installing and using RHDH Local to manage plugins through the Extensions UI, see Managing plugins from the UI in the RHDH Local documentation.

Enable and disable portal plugins

Use this procedure to enable or disable plugins through the Extensions interface.

Before you begin

Procedure

  1. Navigate to Extensions.
  2. Select a plugin to enable or disable.
  3. Click the Enable/Disable slider.
    Enable and disable slider for a plugin
  4. To view the plugins that require a restart, click View plugins in the alert message.
    Alert showing plugins that require a restart
  5. Restart your RHDH application.

Results

  1. After you restart your RHDH application, navigate to Extensions.
  2. Select the plugin that you have installed.
  3. Verify that the system updated the Enable/Disable slider.

Disable the Extensions UI

The Extensions feature is available by default. To remove the Extensions interface (Marketplace) from your instance, you must disable the relevant plugins.

Procedure

Edit your dynamic-plugins.yaml with the following content.
plugins:
  - package: ref://red-hat-developer-hub-backstage-plugin-extensions
    enabled: false
  - package: ref://red-hat-developer-hub-backstage-plugin-catalog-backend-module-extensions
    enabled: false
  - package: ref://red-hat-developer-hub-backstage-plugin-extensions-backend
    enabled: false
Note

Disabling these plugins removes the Catalog and Installed tabs. You can still view a basic list of installed plugins by selecting Administration > Extensions.