Skip to content
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

Post-Installation script for installation, enable and disable plugins in admin-ui frontend #302

Closed
duttarnab opened this issue Jan 10, 2022 · 3 comments
Labels
comp-jans-linux-setup Component affected by issue or PR ready-for-triage Issue or PR has sufficient details and it is ready for triage review

Comments

@duttarnab
Copy link
Contributor

Description

To install, enable and disable plugins in the admin-ui frontend we need a post-installation script.

  • Install Plugin - Users can develop frontend plugins for Admin UI. The newly developed frontend plugin can be installed in Admin UI application.

  • Enable Plugins - The plugins installed in Admin UI need to be enabled so that they are included when the project is built.

  • Disable Plugins - The plugins in Admin UI can be disabled so that they are not included when the project is built.

Steps to install, enable and disable plugins in admin-ui frontend using post-installation script :

a. Extract /opt/dist/jans/gluu-admin-ui.zip
b. Change directory to extracted gluu-admin-ui
c. The post-installation script will show the following message

Select option
1. Install new Admin-UI Plugin
2. Enable plugins (include them in built)
3. Disable plugins (do not include in built)

Install Plugin
d. If the user selects 1 then the script will display the following message

Enter the path of the plugin directory (from disk)

e. After the path is entered script should check if the path is preset. Then execute the following command to install the plugin

npm run plugin:install <path_of_the_plugin_directory_on_disk>

Enable Plugin
f. If the user selects 2 then the script will first execute below command to display a list of all available disabled plugins.

npm run plugin:showDisabled

g. Then it will display the following message

Enter the plugin keys from the above list separated by _, delimiter. (eg: admin_,schema_,services)

h. After the user enters plugin keys, the script should run below command

npm run plugin:enable <plugin_keys_separated_by_delimeter>

i. Then script should run npm run build:prod and copy the built from <gluu-admin-ui_home>/dist and overwrite to /var/www/html/admin.

Disable Plugin
j. If the user selects 3 then the script will first execute the below command to display a list of all available enabled plugins.

npm run plugin:showEnabled

k. Then it will display the following message

Enter the plugin keys from the above list separated by _, delimiter. (eg: admin_,schema_,services)

l. After the user enters plugin keys, the script should run below command

npm run plugin:disable <plugin_keys_separated_by_delimeter>

m. Then script should run npm run build:prod and copy the built from <gluu-admin-ui_home>/dist and overwrite to /var/www/html/admin.

Finally

n. The script should zip back the extracted contents of /opt/dist/jans/gluu-admin-ui.zip.

@duttarnab duttarnab changed the title Jan 11, 2022
@duttarnab duttarnab reopened this Jan 11, 2022
@ghost ghost assigned duttarnab and devrimyatar Jan 11, 2022
@ossdhaval ossdhaval transferred this issue from another repository Jan 13, 2022
@ossdhaval ossdhaval added comp-jans-linux-setup Component affected by issue or PR needs-triage Issue or PR yet to be triaged. Add more labels or details that will help during triage review. labels Jan 13, 2022
moabu pushed a commit that referenced this issue Jan 13, 2022
feat: made UpdateToken scripts run only if it's bound to client
moabu pushed a commit that referenced this issue Jan 13, 2022
feat: made UpdateToken scripts run only if it's bound to client
@duttarnab
Copy link
Contributor Author

Overview

There will be only following commands in post-install script

  1. Add Plugin - Users can develop frontend plugin for Admin UI. The newly developed frontend plugin can be added to Admin UI application.

  2. Remove Plugin - Users can remove a plugin from admin-ui .

Steps to add/remove plugin

Initial Installation

  1. If user selects yes for Admin UI installation during jans-auth-server set-up then run below command before executing npm run build:prod.
npm run plugin:clean

Add Plugin

  1. To add plugin user should execute below command.
npm run plugin:add <path_of_the_plugin_directory_on_disk>
  1. Then script should execute npm run build:prod and copy the built from <gluu-admin-ui_home>/dist and overwrite to /var/www/html/admin.

Remove Plugin

  1. To remove plugin user should execute below command.
npm run plugin:remove <plugin_key>
  1. Then script should execute npm run build:prod and copy the built from <gluu-admin-ui_home>/dist and overwrite to /var/www/html/admin.

Finally

n. The script should zip back the extracted contents of /opt/dist/jans/gluu-admin-ui.zip.

@devrimyatar
Copy link
Contributor

@duttarnab Do you think we can close this issue?

@devrimyatar devrimyatar added ready-for-triage Issue or PR has sufficient details and it is ready for triage review and removed needs-triage Issue or PR yet to be triaged. Add more labels or details that will help during triage review. labels Jan 19, 2022
@duttarnab
Copy link
Contributor Author

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-linux-setup Component affected by issue or PR ready-for-triage Issue or PR has sufficient details and it is ready for triage review
Projects
None yet
Development

No branches or pull requests

3 participants