MkConfig is a python package for generating complex configuration in a composable way with as little coding effort as
possible. Each supported configuration generation comes with a template (defined in mkconfig/templates/); and each
config is highly configurable since each config type comes with a set of meta files. As for currently supported
configuration type, CollectdJmx - each meta file is exclusively specific for each target application to generate
configuration for. For more high level examples, please refer to sample meta file (under mkconfig/examples/).
Internally, the tempalte engine support templating strategy as of this version include
Jinja2. For more information about concept of design or config
generation in technical details, please refer to Sphinx documents (under mkconfig/docs)
0.1
Here are types of configuration supported :
- CollectdJmx - GenericJmx
- CollectdJmx - FastJmx
Please refer to requirements.txt for details
If you have pip installed, run the following to install prerequisite dependencies, which is defined in requirements.txt. You may try
pip install -r requirements.txt
-
Install via setup.py
python setup.py install
A transformation descriptor file defines configuration specific meta information, for instance, CollectdJmx may leverage bin/sample_collectd_jmx_control.yaml
mkconfig
- -i/--transf_desc_file: Path to transformation descriptor yaml file
- -o/--output: path to final output.
- -t/--template: (Optional) configuration type. Default is collectd_genericjmx
After this package is installed, run:
mkconfig -o/tmp/output.conf -tcollectd_genericjmx -ibin/sample_collectd_jmx_control.yaml
A sample output is generated at /tmp/output.conf. In adition, there are more examplified application meta file definition located under mkconfig/examples/
All of the implementation should follow PEP-8 standard. This project is also evaluated with pyLint.
Please make sure virtualenv package is installed, if not, try
pip install virtualenv
Execute the following script command
./simulate clean
./simulate init
./simulate build
./simulate install