Hi, I am looking into some configuration management tools and puppet seems to be one of the more interesting to use in our setup. One of the things I am unable to find, is how to run tests. After a change of e.g. resolv.conf, I would like to run a test lookup (e.g. host) and that should give a valid result. If not I want to get an error message somewhere so we can have a closer look why the change wasn''t successful. A little bit similar to (j)unit tests in software development. Is possible to do such tests in puppet in a fashionable way? Thanks, Bram. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Matthew Macdonald-Wallace
2008-Aug-06 12:39 UTC
[Puppet Users] Re: testing a configuration change
On Wed, 6 Aug 2008 05:33:23 -0700 (PDT) Bram <brambi@gmail.com> wrote:> One of the things I am unable to find, is how to run tests. After a > change of e.g. resolv.conf, I would like to run a test lookup (e.g. > host) and that should give a valid result. If not I want to get an > error message somewhere so we can have a closer look why the change > wasn''t successful. A little bit similar to (j)unit tests in software > development. Is possible to do such tests in puppet in a fashionable > way?You can get programs and services to "watch" (can''t remember the actual phrase, sorry) a file, so you could create a script that "watches" resolv.conf and have that test a domain and email/log the results when resolv.conf changes. Otherwise, it''s possibly a "do you know ruby? No? well start learning..." kinda moment! :o) cheers, M. -- Matthew Macdonald-Wallace matthew@truthisfreedom.org.uk http://www.truthisfreedom.org.uk --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
> A little bit similar to (j)unit tests in software > > development. Is possible to do such tests in puppet in a fashionable > > way? >Bram, I''ve been thinking about this more and more. There are really a many levels to ''testing''. A PuppetUnit framework would be great, but the unit test level isn''t really what you are describing. I believe your test is closer to a ''functional'' test, which is great, but much less methodologically defined in practice (when compared to unit testing). As the Puppet community matures and shares tips and tricks, I believe there will be emergent solutions born of necessity. I''d love to hear what you come up with, or what other people are doing to verify their Puppet driven infrastructure. Andrew --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Andrew Shafer schrieb:>> A little bit similar to (j)unit tests in software >>> development. Is possible to do such tests in puppet in a fashionable >>> way? > > > Bram, > > I''ve been thinking about this more and more. There are really a many levels > to ''testing''. > > A PuppetUnit framework would be great, but the unit test level isn''t really > what you are describing. I believe your test is closer to a ''functional'' > test, which is great, but much less methodologically defined in practice > (when compared to unit testing). > > As the Puppet community matures and shares tips and tricks, I believe there > will be emergent solutions born of necessity. > > I''d love to hear what you come up with, or what other people are doing to > verify their Puppet driven infrastructure.I believe that most of the stuff one really wants to test is, as you say, of the integration/functional/acceptance testing level. Much of that could be done by adding more checks and plugins to things like nagios (nrpe anyone?), collectd or munin. Also, the necessity of checking such things is completely independet of puppet or any other management strategy, because the complexities of the systems are most of the times again magnitudes beyond that of a single piece of software. Regards, DavidS --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---