The idea is to have a master config file which will be either in TOML or ini configuration format. This file will be used by the
configgenerator module to generate the configuration files for all the modules. The output of
configgenerator can be in json format.
Consider the following libraries for Config Parser and Generator.
- node-convict - a configuration management library from Mozilla. The code quality seems good. (npm install convict)
- node-config - another popular configuration manager; a bit outdated software development model. (npm install config)
- dotenv - configuration manager. The code quality seems good. (npm install dotenv)
- nconf - a hierarchical configuration manager. (npm install nconf)
- rc - a barebones configuration loader. This library can be used for reading the output of the config parser(npm install rc)
- A small article
Another useful pattern is to provide administrative interface for performing run-time injection of configuration to running components. The administrative interface can be using autolabcli or using a REST API. The interface must check for proper authorization. Some examples of run-time injection are: ceph admin sockets used for run-time config changes. If complete dynamic ask and update of configuration proves too difficult, we can at least try the dynamic reload of config the way nginx does.