You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/06/25 11:13:00 UTC

[GitHub] [druid] jp707049 opened a new issue #10078: How to use `environment variables` in runtime.properties?

jp707049 opened a new issue #10078:
URL: https://github.com/apache/druid/issues/10078


   Hello,
   
   - We've have an env variable defined in a node called `DRUID_HOST` which points to the actual hostname of the node.
   - How can we use `DRUID_HOST` in runtime.properties of a druid service?
   
   I tried the below way but didn't work.
   ```
   druid.host={"type":"environment","variable":"DRUID_HOST"}
   ```
   
   Thank you,
   Jeet


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] FrankChen021 commented on issue #10078: How to use environment variables in runtime.properties?

Posted by GitBox <gi...@apache.org>.
FrankChen021 commented on issue #10078:
URL: https://github.com/apache/druid/issues/10078#issuecomment-651454320


   You can try to add `-Ddruid.host=$DRUID_HOST` to the java launch command line in `run-druid` shell file under `bin` directory. Or you could add that property to ` jvm.config` file for each druid node.
   
   I've never tried that, hope it works.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] jp707049 commented on issue #10078: How to use environment variables in runtime.properties?

Posted by GitBox <gi...@apache.org>.
jp707049 commented on issue #10078:
URL: https://github.com/apache/druid/issues/10078#issuecomment-652285832


   Great,
   I will check and update here soon using your first method.
   Thanks :)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] jp707049 commented on issue #10078: How to use environment variables in runtime.properties?

Posted by GitBox <gi...@apache.org>.
jp707049 commented on issue #10078:
URL: https://github.com/apache/druid/issues/10078#issuecomment-651590132


   Hi,
   
   - I tried using `-Ddruid.host=$DRUID_HOST` in jvm.config but it did not work. Instead the service set the `host=$DRUID_HOST` instead of using value.
   - I did a workaround, before running a service, I created a script which will get the value of DRUID_HOST and adds it to `druid.host` property
   - Although it would be good if Druid support using env variables.
   
   Thank you,
   Jeet


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] jp707049 closed issue #10078: How to use environment variables in runtime.properties?

Posted by GitBox <gi...@apache.org>.
jp707049 closed issue #10078:
URL: https://github.com/apache/druid/issues/10078


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] FrankChen021 commented on issue #10078: How to use environment variables in runtime.properties?

Posted by GitBox <gi...@apache.org>.
FrankChen021 commented on issue #10078:
URL: https://github.com/apache/druid/issues/10078#issuecomment-652251590


   I checked the `run-druid` file, putting environment variables in `jvm.config` won't take effect. 
   
   But you can try the first method  I mention above, that is putting `-Ddruid.host=$DRUID_HOST` in [`run-druid`] (https://github.com/apache/druid/blob/d3497a6581c69f810090f5180f1f18328b06c781/examples/bin/run-druid#L45) as below
   
   ````
   exec "$JAVA_BIN"/java -Ddruid.host=$DRUID_HOST ...
   ````


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] jp707049 commented on issue #10078: How to use environment variables in runtime.properties?

Posted by GitBox <gi...@apache.org>.
jp707049 commented on issue #10078:
URL: https://github.com/apache/druid/issues/10078#issuecomment-653775786


   Using `run-druid` example worked :)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org