-
Notifications
You must be signed in to change notification settings - Fork 52
RHIDP-7560 - Install and configure plugins from Extensions page #1281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 17 commits
9a45a7a
0f0f1bf
b301f27
2b81b9b
28c89b5
f46871d
1af13c9
f1a3e6b
7830783
aaa24ed
5952f10
f563253
833f54a
eab1528
acba8c7
973d63c
3c7488d
ce7b59b
88ffca1
eadb251
0a802e6
413b32d
77b1997
a235c5f
bcee247
a7beabd
855eee8
9572991
f9e29bf
e1e7ae5
2819eef
da8371f
298e27a
27dd5b4
7c42ba5
aaf0d32
c4e1d28
7465fb6
ac54524
e5b3317
fae3409
a0c912d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[id="con-extensions-managing-plugins_{context}"] | ||
= Managing plugins by using Extensions | ||
|
||
You can install and configure plugins by using Extensions. | ||
|
||
[WARNING] | ||
Installation and configuration of plugins by using Extensions will only work in development environments. This feature is not supported in production environments. | ||
|
||
In a production environment, users will be notified that plugin installation is not permitted. | ||
|
||
image::rhdh/extensions-restart-plugin-1.png[] | ||
|
||
In a development environment: | ||
|
||
* Administrators can install a plugin using the default configuration preloaded in the editor, or modify the configuration before installing. Upon successful installation, users will be notified that a backend restart is required to complete the installation process. | ||
* When a plugin is installed, administrators can access the Actions drop-down in the plugin’s side panel. Available actions include: | ||
** Editing the configuration used during installation | ||
** Disabling or enabling the plugin | ||
** After performing any of these actions, users will be notified that a backend restart is required for the changes to take effect. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[id="proc-extensions-configuring-plugins_{context}"] | ||
= Enabling and disabling plugins by using Extensions | ||
|
||
.Prerequisites | ||
* You have configured {product-very-short} 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. | ||
+ | ||
image::rhdh/extensions-enable-plugin-1.png[] | ||
. To view the plugins that require a restart, click *View plugins* in the alert message. | ||
+ | ||
image::rhdh/extensions-install-plugin-3.png[] | ||
. Restart your {product-very-short} application. | ||
|
||
.Verification | ||
. After you restart your {product-very-short} application, navigate to *Extensions*. | ||
. Select the plugin that you have installed. | ||
. The Enable/Disable slider is updated. | ||
|
||
|
||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
[id="proc-extensions-enabling-plugins-installation_{context}"] | ||
= Configuring {product-very-short} to install plugins by using Extensions | ||
|
||
When you install a plugin, the configuration that you use is saved to a dynamic plugins cache to ensure that the same configuration is available when you edit, or re-enable the plugin. | ||
|
||
You must create a persistent volume cache (PVC) to ensure that the cache persists when you restart the {product-very-short} application. For more information about using the dynamic plugins cache, see link:https://docs.redhat.com/en/documentation/red_hat_developer_hub/{product-version}/html-single/configuring_red_hat_developer_hub/index#using-the-dynamic-plugins-cache_running-behind-a-proxy[Using the dynamic plugins cache]. | ||
|
||
.Prequisites | ||
Gerry-Forde marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* You have created a persistent volume claim (PVC) for the dynamic plugins cache with the name *dynamic-plugins-route*. | ||
Gerry-Forde marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* You have installed Red Hat Developer Hub using the Helm chart. | ||
* You have installed the OpenShift CLI (`oc`). | ||
|
||
.Procedure | ||
. Create the marketplace configuration file and save it as `dynamic-plugins.marketplace.yaml`. For example: | ||
+ | ||
[source,yaml] | ||
---- | ||
plugins: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is missing the frontend configuration, see: #1281 (review) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, okay I see we have it as a next step. I would suggest to simplify the setup and have it already in the default config file instead of updating it again. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dzemanov I've updated the code example in for creating the Operator update instructions have also been added to this section. Could you please review again and let me know if the content is technically accurate. |
||
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-marketplace-backend-dynamic | ||
disabled: false | ||
pluginConfig: | ||
extensions: | ||
installation: | ||
enabled: true | ||
saveToSingleFile: | ||
file: /opt/app-root/src/dynamic-plugins-root/dynamic-plugins.marketplace.yaml | ||
---- | ||
. Copy the file to your cluster by running the following commands: | ||
+ | ||
[source,yaml] | ||
---- | ||
oc get pods -n <your-namespace> | ||
|
||
oc cp ./dynamic-plugins.marketplace.yaml <your-namespace>/<pod-name>:/opt/app-root/src/dynamic-plugins-root/dynamic-plugins.marketplace.yaml | ||
---- | ||
. Upgrade the Helm release to use this file and update environment variable to development: | ||
+ | ||
[source,yaml] | ||
---- | ||
global: | ||
auth: | ||
backend: | ||
enabled: true | ||
clusterRouterBase: apps.rosa.iuosa-vcqyd-ek4.jryo.p3.openshiftapps.com | ||
dynamic: | ||
includes: | ||
- dynamic-plugins.default.yaml | ||
- /dynamic-plugins-root/dynamic-plugins.marketplace.yaml | ||
upstream: | ||
backstage: | ||
extraEnvVars: | ||
- name: NODE_ENV | ||
value: development | ||
---- | ||
. Click *Upgrade* | ||
|
||
. Add the following configuration for the Extensions UI package in your `redhat-developer-hub-dynamic-plugins` config map, to include the newly added mount point: | ||
+ | ||
[source,yaml,subs="+attributes"] | ||
---- | ||
data: | ||
dynamic-plugins.yaml: | | ||
includes: | ||
- dynamic-plugins.default.yaml | ||
- /dynamic-plugins-root/dynamic-plugins.marketplace.yaml | ||
plugins: | ||
- package: ./dynamic-plugins/dist/backstage-community-plugin-rbac | ||
dzemanov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-marketplace | ||
disabled: false | ||
pluginConfig: | ||
dynamicPlugins: | ||
frontend: | ||
red-hat-developer-hub.backstage-plugin-marketplace: | ||
appIcons: | ||
- name: marketplace | ||
importName: MarketplaceIcon | ||
dynamicRoutes: | ||
- path: /extensions/catalog | ||
importName: DynamicMarketplacePluginRouter | ||
mountPoints: | ||
- mountPoint: application/provider | ||
importName: InstallationContextProvider | ||
- mountPoint: internal.plugins/tab | ||
importName: DynamicMarketplacePluginContent | ||
config: | ||
path: marketplace | ||
title: Catalog | ||
Gerry-Forde marked this conversation as resolved.
Show resolved
Hide resolved
|
||
---- | ||
. Click *Save* | ||
|
||
|
||
// .Validation |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[id="rhdh-extensions-plugins-enabling_{context}"] | ||
= Enabling plugins installation by using Extensions | ||
Using the extensions UI, the extensions backend now requires additional configuration in the app config, users must explicitly enable the installation and specify the file path from which the plug-in configuration should be read if the file path is missing or invalid installation will be disabled. | ||
|
||
[NOTE] | ||
When you visit *Extensions*, before you enable extensions plugin installation, you will see an information message saying that the plugin installation is disabled. | ||
|
||
.Prerequisites | ||
* You added a custom Developer Hub application configuration, and have sufficient permissions to modify it. | ||
* You are in development mode. | ||
* You have created the plugin configuration file and added the file path in your `app-config.yaml` file. | ||
* You have the correct RBAC permissions. | ||
// * You have installed the `oc` CLI [TBC]. | ||
|
||
//// | ||
ISSUES | ||
I dont't see a warning message when I access RHDH in production mode - Is this the latest version? | ||
Configure RBAC | ||
Add PVC | ||
//// | ||
|
||
.Procedure | ||
. Switch to *development* mode by editing your app-config.yaml file as follows: | ||
+ | ||
.`app-config.yaml` fragment | ||
[source,yaml] | ||
---- | ||
auth: | ||
environment: development # Set to 'development' for development mode | ||
providers: | ||
# ... your providers configured for development mode ... | ||
guest: # Example: Guest provider often has specific settings for dev | ||
dangerouslyAllowOutsideDevelopment: true # Allows guest login outside of dev mode only if explicitly enabled | ||
---- | ||
. Create a plugin configuration file to store plugin configuration data when you enable a plugin by using Extensions. | ||
// dynamic-plugins-test.yaml as configmap | ||
|
||
. To enable extensions plugin installation, you must update your `app-config.yaml` file as follows: | ||
+ | ||
.`app-config.yaml` fragment | ||
[source,yaml] | ||
---- | ||
extensions: | ||
installation: | ||
enabled: true | ||
saveToSingleFile: | ||
file: /<path-to>/dynamic-plugins.yaml | ||
---- | ||
|
||
[NOTE] | ||
If a specific plug-in configuration is not found in the provided file, it will fall back to fetching it from the dynamic artifacts. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[id="proc-extensions-installing-plugins_{context}"] | ||
= Installing plugins by using Extensions | ||
You can install and configure plugins by using Extensions. | ||
|
||
.Prequisites | ||
Gerry-Forde marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* You have configured {product-very-short} to allow plugins installation from *Extensions*. | ||
// * You have configured RBAC to allow the current user to manage plugin configuration. | ||
Gerry-Forde marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
.Procedure | ||
. Navigate to *Extensions*. | ||
. Select a plugin to install. | ||
. Click on the *Install* button. | ||
+ | ||
image::rhdh/extensions-install-plugin-1.png[] | ||
The code editor is displayed which displays the plugin default configuration. | ||
. Update the plugin configuration, if necessary. | ||
+ | ||
image::rhdh/extensions-install-plugin-2.png[] | ||
. Click *Install* | ||
. To view the plugins that require a restart, click *View plugins* in the alert message. | ||
+ | ||
image::rhdh/extensions-install-plugin-3.png[] | ||
. Restart your {product-very-short} application. | ||
|
||
.Verification | ||
. After you restart your {product-very-short} application, navigate to *Extensions*. | ||
. Select the plugin that you have installed. | ||
. The *Actions* button is displayed. | ||
// . Click on *Edit* to view the configuration that you used to install the plugin. | ||
|
||
|
||
|
||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.