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

Enhanced Plugin Directory Management in RESTHeart #495

Closed
ujibang opened this issue Dec 13, 2023 · 1 comment
Closed

Enhanced Plugin Directory Management in RESTHeart #495

ujibang opened this issue Dec 13, 2023 · 1 comment
Assignees
Milestone

Comments

@ujibang
Copy link
Contributor

ujibang commented Dec 13, 2023

Objective:
To enable RESTHeart to load plugins recursively from subdirectories of the plugins-directory.

Current Limitation:
At present, RESTHeart is configured to search for plugins in the directory specified by the plugins-directory configuration option. By default, this is set to ./plugins. It just searches jar files in the directory and won't look into subdirectories. This limitation poses challenges, especially when deploying custom plugins in a Docker environment.

Proposed Solution:
RESTHeart will search for plugins in the plugins-directory and recursively in its subdirectories (up to two levels deep).

Use Case Scenario:
In a Docker deployment scenario, users often need to deploy custom plugins. The current system requires the use of Docker volume mappings for each custom plugin or its dependencies, like this:

$ docker run -rm -p 8080:8080 -v custom-plugins.jar:/opt/restheart/plugins/custom-plugins.jar softinstigate/restheart

However, remapping the /opt/restheart/plugins directory to include custom plugins risks overwriting the standard plugin JARs (e.g., restheart-graphql.jar) that come with RESTHeart. The challenge is amplified when a plugin has several dependencies, necessitating multiple Docker volume mappings.

Benefits of the Proposed Change:

  1. Flexibility: Allows separation of custom and standard plugins into different directories.
  2. Simplified Deployment: Reduces the complexity in Docker environments by minimizing the need for multiple volume mappings.
  3. Maintainability: Eases the process of updating and managing custom and standard plugins independently.

Implementation Considerations:

  • Ensure backward compatibility, where the system can still function with a single directory specified.
  • The plugin loader should gracefully handle any conflicts or issues arising from plugins in different directories (e.g., duplicate plugins, version conflicts).
  • Update relevant documentation to reflect these changes and provide examples for new and existing users.

Detailed Documentation:
To be developed, detailing the technical implementation, configuration changes, and examples of usage in different deployment scenarios.

@ujibang ujibang self-assigned this Dec 13, 2023
@ujibang ujibang added this to the 7.6 milestone Dec 13, 2023
ujibang added a commit that referenced this issue Dec 13, 2023
@ujibang ujibang modified the milestones: 7.6, 7.7 Dec 15, 2023
@ujibang
Copy link
Contributor Author

ujibang commented Jan 12, 2024

done, available in v7.7.0

@ujibang ujibang closed this as completed Jan 12, 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

1 participant