[ 
https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16022578#comment-16022578
 ] 

Jan Høydahl commented on SOLR-7871:
-----------------------------------

bq. Perhaps we can generalize that approach for configuration, to look for jndi 
-> system property -> ENV_VAR or default value?

Do you propose such generalization in {{SolrCliConfig}} to prepare a final list 
of configs before starting Solr? Or do you propose to change the way Solr core 
internally looks for all these values, e.g. when substituting 
{{$\{solr.foo.bar:default\}}} and looking up {{System.getProperty()}}, to 
instead look in these locations?

I'm still open to discuss the new file format. If we choose YAML, how would we 
map between key names in ENV, YML and SYSPROP? I would love to have a well 
defined mapping here, e.g.
{noformat}
ENV          YAML        SYSPROP 
SOLR_HOME    solr.home   solr.solr.home
SOLR_PORT    solr.port   jetty.port
RMI_PORT     rmi.port    com.sun.management.jmxremote.port
LOG4J_PROPS  log4j.props log4j.configuration
...
{noformat}

I.e. have some convention that env vars are upper case underscore separated 
while sys props and yaml keys are lowercase dot separated.  Many of the 
sysprops already follow that convention, but as you see from the few examples 
above, there are many exceptions. If we go for YAML, the structure of the 
variables will also be clearer, so instead of rmi.port we might want to say 
{{solr.monitoring.jmx.port}} etc.

> 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

Reply via email to