Configuration management is one of those things nobody really likes to think about.  It often results in a lot of work and overhead, as companies and teams stumble about trying to get their software to work on different environments.  How do you go from development, to test, to stage and then production with each environment having a different set of paths, urls, and other configuration parameters?

There’s a lot of bad ways to do it.  For instance, different copies of configurations, which are unwieldy and difficult to maintain.  Or using some scheme where all the configuration files are baked together and the environment itself has to somehow pick which set of variables to extract.  Both of these schemes are common and problematic; they are difficult to test, brittle, and are a lot of overhead on the development team.

This is where Leroy saves the day.

Using Leroy’s configuration management, you basically turn your configuration files into source code.  Instead of having different sets of configuration files, you produce a template.  So a file like this one:






Now, we can use Leroy’s properties and its concept of different environments to use this one template to generate configuration artifacts for each environment as part of your workflow.

You can also use Leroy’s property inheritance structure to allow common properties to be placed in a global property file, and then only put environment-specific properties in environment-specific files.

Additionally, Leroy will tell you when there is a problem. If you try to use a variable that is not set, for instance, it will tell you right off. This way, if you add a parameter to your configuration template and fail to add it as a property for all your environments, you will get an error. This reduces the “hidden problems” that can crop up when environment configurations fall out of sync.

All of this makes for easily revision-controlled, automatically error-detecting configuration files that are easy to maintain and take the burden of developing a “home grown” solution off the backs of the development team.

A full write-up with examples can be found at the Leroy Deploy Wiki.