parent
8be8141060
commit
e603aedbfe
43
README.md
43
README.md
|
@ -1,4 +1,45 @@
|
|||
cornfig
|
||||
=======
|
||||
|
||||
Apply configuration from cloud metadata
|
||||
Apply configuration from cloud metadata.
|
||||
|
||||
|
||||
## What does it do?
|
||||
|
||||
it turns a cloud-metdata file like this:
|
||||
```
|
||||
{"config": {"keystone": {"database": {"host": "127.0.0.1", "user": "keystone", "password": "foobar"}}}}
|
||||
```
|
||||
into service config files like this:
|
||||
```
|
||||
[sql]
|
||||
connection = mysql://keystone:foobar@127.0.0.1/keystone
|
||||
...other settings...
|
||||
```
|
||||
|
||||
## But HOW??
|
||||
|
||||
Just pass it the path to a directory tree of templates:
|
||||
```
|
||||
cornfig /home/me/my_templates
|
||||
```
|
||||
|
||||
## Templates?
|
||||
|
||||
The template directory structure should mimic a root filesystem, and contain templates for only those files you want cornfig-ed.
|
||||
|
||||
e.g.
|
||||
```
|
||||
~/my_templates$ tree
|
||||
.
|
||||
└── etc
|
||||
├── keystone
|
||||
│ └── keystone.conf
|
||||
└── mysql
|
||||
└── mysql.conf
|
||||
```
|
||||
|
||||
If a template is executable it will be treated as an *executable template*.
|
||||
Otherwise, it will be treated as a *moustache template*.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue