lucene-solr icon indicating copy to clipboard operation
lucene-solr copied to clipboard

SOLR-14370: Refactor bin/solr to allow external override of Jetty modules

Open athrog opened this issue 5 years ago • 2 comments

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 master branch.
  • [x] I have run ant precommit and the appropriate test suite.
  • [ ] I have added tests for my changes.
  • [ ] I have added documentation for the Ref Guide (for Solr changes only).

athrog avatar Mar 28 '20 00:03 athrog

@dsmiley Let me know if I should add documentation for this

athrog avatar Mar 28 '20 00:03 athrog

@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...

epugh avatar Aug 26 '24 11:08 epugh