Update README.md

Update README.
This commit is contained in:
Tim Miller 2013-01-28 22:31:41 -08:00
parent 8be8141060
commit e603aedbfe
1 changed files with 42 additions and 1 deletions

View File

@ -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*.