Serge Huber created UNOMI-216:
---------------------------------

             Summary: Configure Unomi by editing one configuration file & read 
env variables for Docker compatibility
                 Key: UNOMI-216
                 URL: https://issues.apache.org/jira/browse/UNOMI-216
             Project: Apache Unomi
          Issue Type: Improvement
          Components: core
    Affects Versions: 1.3.0-incubating, 1.2.0-incubating, 1.1.0-incubating, 
1.0.0-incubating, 1.4.0-incubating
            Reporter: Serge Huber
            Assignee: Serge Huber
             Fix For: 1.4.0-incubating


The idea here is to make it easy to "override" common configuration properties 
in Apache Unomi by modifying a single configuration file. Of course this type 
of deployment is focused on "static" deployments, not deployment where the 
configuration admin is used to dynamically update configuration. Also this will 
address the need of Docker containers that pass configuration through 
environment variables.

As a consequence, default Unomi properties should be "placeholdered", with 
default values

Here is the section in the Karaf documentation about configuration, including 
environment variables references : 
[http://karaf.apache.org/manual/latest/#_configuration_3]

"Properties can be referenced inside configuration files using the syntax 
{{$\{<name>}}}. Default and alternate values can be specified using 
{{$\{<name>:-<default_value>}}} and {{$\{<name>:+<alternate_value>}}} syntaxes 
respectively."

"Environment variables can be referenced inside configuration files using the 
syntax {{$\{env:<name>}}} (e.g.{{property=$\{env:FOO}}} will set "property" to 
the value of the enviroment variable "FOO"). Default and alternate values can 
be defined for them as well using the same syntax as above." 

Some difficulty might come from configuration files such as the Hazelcast XML 
configuration file that can only reference system properties, so we might have 
to setup the placeholders in the custom.system.properties file.

This story includes modifications to the documentation to use this centralized 
file, both on the Unomi website.

Migration will be handle through documentation as well, indicating where the 
properties must be moved.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to