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

OOD Customizations Deployment - Individual folder support #3916

Open
abujeda opened this issue Oct 30, 2024 · 3 comments
Open

OOD Customizations Deployment - Individual folder support #3916

abujeda opened this issue Oct 30, 2024 · 3 comments

Comments

@abujeda
Copy link
Contributor

abujeda commented Oct 30, 2024

Currently, Open OnDemand allows customizations and extensions using three primary external folders:

  • /etc/ood/config/apps/dashboard/initializers
  • /etc/ood/config/apps/dashboard/lib
  • /etc/ood/config/apps/dashboard/views

This structure enables developers to create and integrate custom widgets, utilities, and other modifications to enhance Open OnDemand’s functionality and user experience. However, as more customizations are added, managing these additions becomes challenging.

To address this, we propose an enhancement to Open OnDemand that would support independent folders for each customization, each with its own initializers, lib, and views subdirectories. This modular approach would allow each customization to reside in its own self-contained structure, making it easier to add, remove, or share specific features.

We believe that this deployment enhancement will better support sharing customizations among institutions in the Open OnDemand community.

Proposed Structure

This structure would allow customizations to be packaged and shared as independent units:

/etc/ood/config/dashboard/add-ons
├── customization_1
│   ├── initializers
│   ├── lib
│   └── views
├── customization_2
│   ├── initializers
│   ├── lib
│   └── views
└── customization_3
    ├── initializers
    ├── lib
    └── views

Possible implementation pseudocode:

# dashboard/config/application.rb
# plugin_directory = '/var/www/ood/apps/plugins'
...
    # Enable installed plugins
    if ::Configuration.plugin_directory.directory?
      ::Configuration.plugin_directory.children.select(&:directory?).each do |installed_plugin|
        config.paths["config/initializers"] << installed_plugin.join("initializers").to_s
        config.autoload_paths << installed_plugin.join("lib").to_s
        config.paths["app/views"].unshift installed_plugin.join("views").to_s
      end
    end
...
@johrstrom
Copy link
Contributor

Don't they already have access to all three of these?

@johrstrom
Copy link
Contributor

Just meant to comment, didn't mean to close.

@johrstrom johrstrom reopened this Oct 31, 2024
@abujeda
Copy link
Contributor Author

abujeda commented Oct 31, 2024

Yes, customizations are already possible, we are proposing a way of installing them that is easier to manage and share. More so when you want to test/try/install a third party customization in your system.

Similar to how interactive apps are installed, dropping "plugin" folder to the "plugins" location will install the plugin.
removing the folder will remove the code. Adding multiple customizations will be easier to manage as the admin only needs to deal with the "plugin" top level folder, instead of having to manage the individual files in the current location that is common to all customizations.

@abujeda abujeda changed the title OOD Customizations Deployment - Basic plugin support OOD Customizations Deployment - Basic individual folder support Nov 6, 2024
@abujeda abujeda changed the title OOD Customizations Deployment - Basic individual folder support OOD Customizations Deployment - Individual folder support Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants