rcarver/config — pull request #27 by rcarver (2012-08-06 02:39:45+00:00)
Title: Configuration

This branch refactors and aims to clarify the configuration system. Specifically, it defines how multiple levels of configuration are merged.

Ultimately there will be three levels of configuration:

* **Global** Set in `config.rb`
* **Cluster** Set in `clusters/.rb`
* **Node** Set in `nodes/.rb`

When a blueprint is executed, the three levels of configuration are merged. You may override any configuration group or add/modify keys within that group at any level.

### Logging

When a configuration value is accessed during blueprint execution, the logging system clearly shows from which level the value came, and if the key is defined in multiple levels, the override stack.

When a key is only defined at the Cluster level, the log shows:

Read sample.hello => "Hello" from Cluster[vagrant]

When a key is defined at the Global level and overridden at the Cluster level the log shows this

Read sample.hello
Skip "hello world" from Global
Use "Hello" from Cluster[prod]