You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tamaya.apache.org by "Anatole Tresch (JIRA)" <ji...@apache.org> on 2016/04/11 18:48:25 UTC

[jira] [Created] (TAMAYA-145) Adding a complete meta-data schema usable OOTB

Anatole Tresch created TAMAYA-145:
-------------------------------------

             Summary: Adding a complete meta-data schema usable OOTB
                 Key: TAMAYA-145
                 URL: https://issues.apache.org/jira/browse/TAMAYA-145
             Project: Tamaya
          Issue Type: New Feature
          Components: Extensions
            Reporter: Anatole Tresch
            Assignee: Anatole Tresch
             Fix For: 0.3-incubating


Giving my talks about configuration there was repreatedly questions coming if there is a way to using Tamaya OOTB, simply taking it ans using it without hacing the need for writing its property source.

The ides here is to design and implement an according configuration model, that
* supports defaults and stages
* possibly different formats
* classpath and file system configuration
* can be setup by a end or system property (stage) and a classpath based config file (similar to logging.properties)

Proposal:
* Use the (existing) {{META-INF/javaconfiguration.properties}} as global default configuration resource for reading super-configuration entries:
** {{TAMAYA.stages=a, b, c}} defines the stages available.
** {{TAMAYA.stage.a.priority defines the stages priority
** {{TAMAYA.stage.a.xxxx}} may define other values as needed.
** {{TAMAYA.STAGEDEF.DEFAULTS=a}} denotes stages that are always active.
** {{TAMAYA.STAGEDEF.ACTIVE=b}} denotes the default stage being activ, if none is configured, typically the devloper stage.
** With the env/system property {{tamaya.env}} the current stage environment is set, overriding any configured values.

The final configuration provided hereby will filter the configuration given by the default stages and the active stage. It will use the stage prio as default for the individual property source prios. Similarly for each stage corresponding property sources can be defined with a simple syntax. At the end it should possible to do something like

{noformat}
TAMAYA
  STAGEDEF
   - stages=DEFAULTS,DEV,TEST,PTA,PROD
   - defaults=DEFAULTS
   - ACTIVE=DEV
  STAGE
    DEFAULTS
      - prio=0
      - source[1]=classpath:META-INF/defaults/**/*.yaml
      - source[2]=file:${config.dir}/defaults**/*.yaml
    TEST
     - prio=100
...
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)