lucene-solr
lucene-solr copied to clipboard
SOLR-14370: Refactor bin/solr to allow external override of Jetty modules
Description
The bin/solr script currently does not allow for externally overriding the modules passed to Jetty on startup.
Solution
This PR adds the ability to override the Jetty modules on startup by setting JETTY_MODULES as an environment variable; when passed, bin/solr will pass through (and not clobber) the string verbatim into SOLR_JETTY_CONFIG. For example, you can now run:
JETTY_MODULES=--module=foo bin/solr start
This PR also allows for external overriding of SOLR_URL_SCHEME and SOLR_SSL_OPTS.
Tests
We have been using this change in our internal fork of Solr. When creating this PR, I started Solr with JETTY_MODULES set, and unset to verify behavior as expected.
Checklist
Please review the following and check all that apply:
- [x] I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
- [x] I have created a Jira issue and added the issue ID to my pull request title.
- [x] I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
- [x] I have developed this patch against the
masterbranch. - [x] I have run
ant precommitand the appropriate test suite. - [ ] I have added tests for my changes.
- [ ] I have added documentation for the Ref Guide (for Solr changes only).
@dsmiley Let me know if I should add documentation for this
@athrog is this still something you'd like to get figured out? I'd be happy to work with you to get this chased down...