You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jarimatti Valkonen (JIRA)" <ji...@apache.org> on 2016/01/12 09:16:39 UTC
[jira] [Comment Edited] (KARAF-2466) make it easy to access
environment variables inside karaf configuration properties files - via
${ENV.foo}?
[ https://issues.apache.org/jira/browse/KARAF-2466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15093504#comment-15093504 ]
Jarimatti Valkonen edited comment on KARAF-2466 at 1/12/16 8:16 AM:
--------------------------------------------------------------------
This seems to be done in KARAF-3434 and can confirm that this works in Karaf 4.0.3.
The following configuration assigns environment variable FOO to configuration key:
{code}
key=${env:FOO}
{code}
was (Author: jarimatti):
This seems to be done in KARAF-3434 and can confirm that this works in Karaf 4.0.3.
> make it easy to access environment variables inside karaf configuration properties files - via ${ENV.foo}?
> ----------------------------------------------------------------------------------------------------------
>
> Key: KARAF-2466
> URL: https://issues.apache.org/jira/browse/KARAF-2466
> Project: Karaf
> Issue Type: Improvement
> Components: karaf-core
> Reporter: james strachan
> Assignee: Jean-Baptiste Onofré
>
> when using karaf in clouds & PaaS infrastructures like OpenShift, Docker, OpenStack et al; its common to use environment variables to pass in environment specific values; then keep a single disk image. It would be nice if there was an easy way to reference environment variables similar to the ${foo.bar} syntax for accessing system properties.
> Maybe karaf should support some kind of environment variable expansion like
> {code}
> # define a property based on an env var
> foo = ${ENV.nameOfEnvVar}
> # e.g. here's the host name
> host = ${ENV.HOSTNAME}
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)