[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-7871: -- Attachment: SOLR-7871.patch > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl >Priority: Major > Labels: bin/solr > Attachments: SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-7871: -- Attachment: SOLR-7871.patch I've updated the config file names to {{solr.properties}} and {{solr-default.properties}} in the attached patch. This doesn't preclude a veto from Jan or anyone else that has a good reason for the .conf extension. If we end up sticking with .conf, we can just ignore the latest patch. > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Attachments: SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-7871: -- Attachment: SOLR-7871.patch Slightly updated patch. Still a little shaky on the install_solr_service.sh changes. I'll be taking a look at those more today, though I _think_ they're what Shawn suggested in his comment above. The script will now error out instead of overwriting these files if they exist (unless a new "overwrite" flag {{-o}} is provided) > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Attachments: SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-7871: -- Attachment: SOLR-7871.patch Updates patch to apply cleanly against latest {{master}}. Would appreciate any feedback that anyone can offer. > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Attachments: SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-7871: -- Attachment: SOLR-7871.patch Resolves a few merge conflicts so patch can be applied to latest master. [~janhoy] do you have any time this week to provide some feedback on this? > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Attachments: SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-7871: -- Attachment: SOLR-7871.patch This patch finished all the work that remained to be done on this (AFAIK). Added in this patch: - additional Windows (solr.cmd) bugfixes. - install_solr_service.sh now looks for and installs solr.conf files, as well as existing solr.in.sh files - Updates the config-manipulation code in {{bin/solr auth}} to be able to write the new configuration format. - pulls out a lot more default values into "solr-defaults.conf", including GC logging and tuning options. - updates asciidoc documentation to refer to the new config file format, and mention that the platform-dependent config files are still usable but deprecated. Tests and precommit all pass. AFAIK this is fully ready for review. Would appreciate any feedback anyone has. > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Attachments: SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-7871: -- Attachment: SOLR-7871.patch Updated patch improves Windows support, catching a few solr.cmd bugs in the earlier patch. The main remaining step is actually something that hasn't been mentioned here yet: the {{AuthTool}} (i.e {{bin/solr auth}} ) makes edits to the configuration file as a part of enabling/disabling cluster auth. The config-appending logic in that class will have to be revised to handle the new configuration format when the "INCLUDE FILE" has a "*.conf" extension. > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Attachments: SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-7871: -- Attachment: SOLR-7871.patch Updated patch moves this along quite a bit. - Replaced the use of Java 7 Properties, with [PropertiesConfiguration|https://commons.apache.org/proper/commons-configuration/javadocs/v1.10/apidocs/index.html?org/apache/commons/configuration/PropertiesConfiguration.html] from Apache's commons-configuration (already used as a dependency). This gets us property expansion "for free", as Jan suggested in his previous comment. - Added more tests ensuring that our file-parsing can handle strings/numeric values/weird characters/whitespace, etc. - Adds a first pass at {{bin/solr.cmd}} support. Still need some testing on this though. Anyway, this isn't ready for review yet, but it should be ready soon. > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Attachments: SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-7871: -- Attachment: SOLR-7871.patch Adds tests for the configuration precedence and the toBashScript/toCmdScript functionality. Next steps are: - Windows support - pulling out more default values, separate GC options file maybe(?). But this is getting pretty close to being ready. [~janhoy] do you have any opinions on my question earlier about the format/location we keep the defaults in? I made a point earlier that it _might_ make sense to keep them in Java as static constants. Though I also might just be being crazy. Anyway, feedback appreciated. > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Attachments: SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-7871: -- Attachment: SOLR-7871.patch Attached patch adds in the Java code to read in a {{solr/server/solr-defaults.conf}} file. Turned out nicely. As I started to move values from {{bin/solr}} etc into the defaults file though, I noticed that many values _could_ be in the defaults file if not for tiny bits of logic involved in their initialization. Examples: - {{SOLR_PORT}}, {{STOP_PORT}}, and {{RMI_PORT}} could all be set in a properties file, but they are supposed to track together. (Usually, STOP_PORT is SOLR_PORT - 1000; RMI_PORT is SOLR_PORT + 1000) - {{SOLR_URL_SCHEME}} relies on {{SOLR_SSL_ENABLED}}, as do many of the other SSL options. - {{SOLR_PID_DIR}}, {{SOLR_LOGS_DIR}}, {{DEFAULT_SERVER_DIR}} all rely on the value of {{SOLR_TIP}}. Anyway, I guess the point I'm working up to is that we might be able to pull out more "defaults" if they live in a Java constants file. It's less standard, but has some advantages. I could go either way on it, just wanted to get some opinions. (If we still go with a properties/conf file, there _are_ other defaults I can pull out. I just stopped for the night when I ran into the pattern described above.) > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Attachments: SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-7871: -- Attachment: SOLR-7871.patch Attached patch adds in support for environment-variable overriding of solr.conf files. One question this patch raises is how we want to treat the environment-variable-overrides when no config-file is present/specified. If a user uses the {{solr.conf}} format, I think it's clear that env-var overrides should be in place. When a user uses {{solr.in.sh}} then back-compatibility dictates that we probably shouldn't provide env-var overrides. But when no configuration file is present, it's unclear whether we should choose the old behavior (no env-overrides) or the new behavior (env-var-overrides). This patch chooses to provide env-var overrides when no configuration file can be found. That seemed like a relatively safe decision, since chances are low that users have environment-variables with matching names in their scope that they DON'T want passed to Solr. But I'm not attached to this decision at all. I'm happy to change it if others disagree. Any thoughts [~janhoy]. I'm going to do the default values next, and then move on writing unit tests (pending any suggestions/change-requests from others). Is there anywhere specific I should look for defaults to these configuration values? I can use the values that are commented out in the solr.conf/solr.in.sh/solr.in.cmd files currently, but I wasn't sure that was right... > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Attachments: SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch, SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-7871: -- Attachment: SOLR-7871.patch Ah good. In that case, I've attached my initial stab at the 2-step approach you laid out above. I left out the unit-tests that you included in your patch, but I'm just doing that for now. I didn't want to spend time on unit tests that would change drastically if we decided we didn't like this design. IMO it turned out pretty nicely. Really simplified a lot of the related Java code. If people are ok with this approach, next steps include: - re-write unit tests. - env-var precedence/overriding - default values - Windows support > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Attachments: SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, > SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gerlowski updated SOLR-7871: -- Attachment: SOLR-7871.patch Trivially updated patch resolves a few conflicts on master. bq. Welcoming feedback from others about the overall approach taken here, or if there is a better path Happy to chime in on a few specific aspects: - +1 for keeping property file format, at least for now. - +1 for keeping UPPERCASE_UNDERSCORE_DELIMITED key values - +1 for having env vars take precedence/override solr.conf values - +1 for exiting-in-error for unknown keys: less trappy for users. This change would stand alone pretty well as its own JIRA though. bq. The solr.conf file is currently parsed by same code as solr.in.sh, could perhaps look into using some standard properties / config parser from some lib The Java [Properties|https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html] class looks like it'd get us pretty far on its own. It's got parsing, getters for props, etc. [Archaius|https://github.com/Netflix/archaius] offers built in support for "cascading" configuration sources (e.g. use ENV-VARS if present, if not use config-file values, if those aren't present, ... Though that might bring in a little more than we're looking for. That said, neither of those libraries are well-equipped to parse the sorts of entries we've got in bin/solr.in.cmd, so until we drop support for the old format s, we're going to see limited value from a library. At least as I see things; could be missing something. I've got some free time in the next two weeks, so I'd like to take this forward if there's enough consensus on what the next steps look like. As I understand it, the next few things are: - add more tests - Port the {{bin/solr}} changes over to {{bin/solr.cmd}} - Switch the precedence/override-order on environment-variables/config-file values. Does that cover most of the consensus reached so far? Is there anything that you'd prefer to be handled in a sub-issue [~janhoy]? > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Attachments: SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jan Høydahl updated SOLR-7871: -- Fix Version/s: (was: 7.0) > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Attachments: SOLR-7871.patch, SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jan Høydahl updated SOLR-7871: -- Attachment: SOLR-7871.patch New version of patch * Tests back compat * Removes {{bin/solr.in.sh}} and {{solr.in.cmd}}, adds {{bin/solr.conf.sample}} * Integrated into {{bin/solr}}, instead of searching for and sourcing {{solr.in.sh}}, we do a call to {{SolrCliConfig.java}} which does it all in pure Java, returning a long string which are {{eval}}'ed in bin/solr. Todo: * Integrate into {{bin/solr.cmd}}, test on Windows * More testing of quoting and corner cases, this may be a bit fragile * Currently still values in {{solr.conf}} will override existing env in shell, need to do it other way around * Decide name of file (solr.conf, solr.properties, solr.in.conf)? * The {{solr.conf}} file is currently parsed by same code as {{solr.in.sh}}, could perhaps look into using some standard properties / config parser from some lib? * Documentation > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Fix For: master (7.0) > > Attachments: SOLR-7871.patch, SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jan Høydahl updated SOLR-7871: -- Fix Version/s: (was: 6.0) master (7.0) > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Fix For: master (7.0) > > Attachments: SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7871) Platform independent config file instead of solr.in.sh and solr.in.cmd
[ https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jan Høydahl updated SOLR-7871: -- Attachment: SOLR-7871.patch Attaching a work in progress patch which is able to resolve correct config file from the usual folders and parse both .sh and .cmd correctly (tested with current default files). A bunch of unit tests already written. The parser throws an exception if complex solr.in.* script is detected, then user needs to edit it first. Next step would be to add all the defaults to a central place, and then find a way to replace large chunks of variable magic from bin/solr.* I won't be able to continue on this during the summer, but will pick it up again in August... > Platform independent config file instead of solr.in.sh and solr.in.cmd > -- > > Key: SOLR-7871 > URL: https://issues.apache.org/jira/browse/SOLR-7871 > Project: Solr > Issue Type: Improvement > Components: scripts and tools >Affects Versions: 5.2.1 >Reporter: Jan Høydahl >Assignee: Jan Høydahl > Labels: bin/solr > Fix For: 6.0 > > Attachments: SOLR-7871.patch > > > Spinoff from SOLR-7043 > The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable > batch files, but all they do is to set environment variables for the start > scripts on the format {{key=value}} > Suggest to instead have one central platform independent config file e.g. > {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by > {{SolrCLI.java}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org