sa-mw-dach / opendj

Apply Open Source principles to the Dance Floor! MOVED TO https://github.com/opendj/opendj
https://github.com/opendj/opendj
GNU General Public License v3.0
6 stars 9 forks source link

Need to decide on Config Mmgt #58

Closed DanielFroehlich closed 5 years ago

DanielFroehlich commented 5 years ago

Need to decide on Config Mmgt. I.e. how to we get config parameters / variables into components.

High Level Requirements: 1: MUST be usable by different component types (nodejs, java, ...) 2: a central config which is common to all components (openDJ domain name, project name, Logo URL, max. event duration etc.) MUST be easily mapped to all components. MIGHT be used as single config file with also component specific values in it. 3: a component specific config file SHOULD be also possible
4: a change of any config file SHOULD be picked up at runtime. 5: Overriding a config parameter at a different stage SHOULD be supported. E.g. in DEV stage config a value is set, and if in PROD stage config that value is not defined, the value from DEV is used. 6: Encryption / Hiding of secrets (e.g. passwords, client secrets) SHOULD be possible.

DanielFroehlich commented 5 years ago

Option A: COnfig File as OpenShift ConfigMap / Secrets

Desc:

Use a ConfigMap to add a properties/json/yml/ini file with key/value pairs. Keys are prefixed with component name or "common". For secrets, OpenShift Secrets are used (need to find out if one could refer to a secret in a ConfigMap - if not, then this config parameters are mapped via env variables from secrets) Reading/parsing of the config file could be done by a language specific config framework.

Pro

  1. Req. 1,2,3,5 are fullfilled
  2. Very easy to use and implement

Con

  1. No Overriding (Req#4)
  2. Update requires probably restart of container (not 100% sure about this - a config map is visible as file for the container, so in theory it could be re-read at runime, need to check/verify this)
DanielFroehlich commented 5 years ago

Option B: Use Netflix/archaius

Desc:

Use archaius framework for java, and additional frameworks that can connect to archaius (like prana for nodejs.

Pro:

  1. I am currently too tired to see any pros here.

Con:

  1. Maybe an addition runtime component (configserver, providing config to all other components) is needed.
  2. netflix stack is not Red Hat
DanielFroehlich commented 5 years ago

Option C: Use HasiCorp / Consul

Desc:

--- needs investigation ----

Pro:

--- needs investigation ----

Con:

--- needs investigation ----

DanielFroehlich commented 5 years ago

Decided by Daniel just be the fact that there is no time to investigate other options, we go with ConfigMap and Secrets.