Chefconf Hackday results

So last week, Fletcher Nichol and myself, took on the task of adding
attribute sanity tests, and foodcritic linting, to a simple cookbook.
Many others joined us for some Beer-Driven Development throughout the
week, almost too many to name (big thanks to Matthew Sauve-Frankel). We
also integrated this with Travis CI for shits ‘n’ giggles. I received
some feedback ranging on our testing efforts from "that sounds stupid"
to “that looks badass”.

Both of us have some community cookbooks that take upwards of 30 minutes
to converge. So this was a bit of a proof of concept, and an exercise
to provide reference documentation for testing cookbooks. Our main goal
was to have a way of testing inputs (attributes) as a cookbook ships.
As a cookbook maintainer, I have no way of knowing what attributes
someone may override without loading external roles. The way I see it,
the least I could do is make sure what does ship in one of my cookbooks
is somewhat sane.

I opened a JIRA ticket [COOK-1298] intending to use NTP as a reference
cookbook for platform edge-case testing. It seemed like a good hello
world example to test this idea out. So, not actually sure if I’ll pull
request this or not. I guess I am looking for validation from others on
the mailing list that this idea is not, in fact, stupid.

I have squashed the commits in the following tree, to hide any drunken
commit messages which may, or may not, have occurred at Chefconf. Check
it out, and let me know what you think. The TESTING.md is meant to
serve as a HOWTO document for testing cookbook inputs as we have done here.
https://github.com/atomic-penguin/ntp/tree/COOK-1298


Eric G. Wolfe
Senior Linux Administrator,
IT Infrastructure Systems

Marshall University Computing Services
Drinko Library 428-K
One John Marshall Dr.
Huntington, WV 25755
Phone: 304.942.3970
Email: eric.wolfe@marshall.edu

You will be recognized and honored as a community leader.

On May 21, 2012, at 3:50 PM, Eric G. Wolfe wrote:

I opened a JIRA ticket [COOK-1298] intending to use NTP as a reference cookbook for platform edge-case testing. It seemed like a good hello world example to test this idea out. So, not actually sure if I'll pull request this or not. I guess I am looking for validation from others on the mailing list that this idea is not, in fact, stupid.

Speaking as a representative of the NTP Public Services Project (see http://support.ntp.org/), I think we would very much welcome any work that is done anywhere in any community that would be likely to help increase the quality of the NTP deployments that might be rolled out anywhere in the world.

With my Chef hat on, I think that you have picked wisely, precisely because the NTP cookbook should be pretty simple, and it should make a good "Hello, world" type of example that can hopefully be followed by others.

That's all theory, of course -- I haven't actually looked at any of the changes yet, and I know nothing about the generation of "attribute sanity tests" or "foodcritic linting", so I'll have to go see if I can make heads or tails of the output.

I have squashed the commits in the following tree, to hide any drunken commit messages which may, or may not, have occurred at Chefconf. Check it out, and let me know what you think. The TESTING.md is meant to serve as a HOWTO document for testing cookbook inputs as we have done here.
GitHub - atomic-penguin/ntp: Development repository for Opscode Cookbook ntp

I'll take a look at this when I can, but I can't make any promises. The next few weeks are likely to be very busy for me.

--
Brad Knowles brad@shub-internet.org
LinkedIn Profile: http://tinyurl.com/y8kpxu