On 4/29/2013 5:54 AM, Atom Powers wrote:
Building on the "infrastructure as code" idea I have been thinking about how to write tests for the infrastructure. Service monitoring seems like the obvious answer and I am imagining something like a test suite for a "development" version of the configuration management system that would be used in much the same way as a programmer uses a test suite to make sure his program works.

Has anybody done something like this? I imagine the biggest hurdle will be setting up the development environment, complete with scratch hosts and monitoring that can be reconfigured frequently for those hosts, depending on what is being tested.


If you're using Chef, there is an excellent tool called Test Kitchen. Version 1.0.0 is just undergoing Alpha testing at the moment but a release should be fairly soon, 0.7.0 is the current stable and it works really well. Combined with vagrant it spawns up clean instances of the OS and does a chef-solo run with the requested cookbook. Included with it is cucumber, minitest and an integration test tool, which allow you to specify automated tests to carry out on the virtual machine once the cookbook has run giving you a final test score. It's immensely valuable for cookbook work. There has been a substantial effort over the last 6 months or so to add tests to all the Opscode cookbooks, and it's seeing increasing use within the community.

Although I haven't tested it for such, I imagine it should be fairly straightforward to hook it into monitoring somehow.

Paul


_______________________________________________
Discuss mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/discuss
This list provided by the League of Professional System Administrators
http://lopsa.org/

Reply via email to