Puppet: Making Windows Awesome Since 2011

imagePuppet was one of the first configuration management (CM) tools to support Windows, way back in 2011. It has the heaviest investment on Windows infrastructure with 1/3 of the platform client development staff being Windows folks.  It appears that Microsoft believed an end state configuration tool like Puppet was the way forward, so much so that they cloned Puppet’s DSL (domain-specific language) in many ways and are calling it PowerShell DSC.

Puppet Labs is pushing the envelope on Windows. Here are several things to note:

It can be overwhelming learning a new tool like Puppet at first, but Puppet Labs has some resources to help you on that path. Take a look at the Learning VM, which has a quest-based learning tool. For real-time questions, feel free to drop onto #puppet on freenode.net (yes, some folks still use IRC) with questions, and #puppet-dev with thoughts/feedback on the language itself. You can subscribe to puppet-users / puppet-dev mailing lists. There is also ask.puppetlabs.com for questions and Server Fault if you want to go to a Stack Exchange site. There are books written on learning Puppet. There are even Puppet User Groups (PUGs) and other community resources!

Puppet does take some time to learn, but with anything you need to learn, you need to weigh the benefits versus the ramp up time. I learned NHibernate once, it had a very high ramp time back then but was the only game on the street. Puppet’s ramp up time is considerably less than that. The advantage is that you are learning a DSL, and it can apply to multiple platforms (Linux, Windows, OS X, etc.) with the same Puppet resource constructs.

As you learn Puppet you may wonder why it has a DSL instead of just leveraging the language of Ruby (or maybe this is one of those things that keeps you up wondering at night). I like the DSL over a small layer on top of Ruby. It allows the Puppet language to be portable and go more places. It makes you think about the end state of what you want to achieve in a declarative sense instead of in an imperative sense.

You may also find that right now Puppet doesn’t run manifests (scripts) in order of the way resources are specified. This is the number one learning point for most folks. As a long time consternation of some folks about Puppet, manifest ordering was not possible in the past. In fact it might be why some other CMs exist! As of 3.3.0, Puppet can do manifest ordering, and it will be the default in Puppet 4. http://puppetlabs.com/blog/introducing-manifest-ordered-resources

You may have caught earlier that I mentioned PowerShell DSC. But what about DSC? Shouldn’t that be what Windows users want to choose? Other CMs are integrating with DSC, will Puppet follow suit and integrate with DSC? The biggest concern that I have with DSC is it’s lack of visibility in fine-grained reporting of changes (which Puppet has). The other is that it is a very young Microsoft product (pre version 3, you know what they say :) ). I tried getting it working in December and ran into some issues. I’m hoping that newer releases are there that actually work, it does have some promising capabilities, it just doesn’t quite come up to the standard of something that should be used in production. In contrast Puppet is almost a ten year old language with an active community! It’s very stable, and when trusting your business to configuration management, you want something that has been around awhile and has been proven. Give DSC another couple of releases and you might see more folks integrating with it. That said there may be a future with DSC integration. Portability and fine-grained reporting of configuration changes are reasons to take a closer look at Puppet on Windows.

Yes, Puppet on Windows is here to stay and it’s continually getting better folks.

About Rob Reynolds

Rob Reynolds has been programming in .NET since the early days of 1.0... [Continue reading... at http://about.me/ferventcoder] On this blog you'll find just about anything I find interesting that has to do with development including Puppet and Chocolatey. Because we are all polyglot programmers in our own way, you may see anything from NHibernate to some custom CSS. Nobody is perfect and occasionally I may post something you find incorrect. Please keep me straight! With your help and interaction the community will benefit.
This entry was posted in puppet and tagged , . Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • Sinisterpenguin

    My experience was very different, Puppet on Windows was a horror (Ruby calling PowerShell??) where as DSC was a breeze. Remember Windows houses tend to have Windows monkeys like me with Windows skills!

    I’d like to see Puppet calling DSC directly so we can enjoy all the goodness of a Puppet infrastructure using native Windows technology.

    • https://about.me/ferventcoder ferventcoder

      How long ago and what version of Puppet? There can be quite a few reasons why your experience was not that great up to and including not having awareness of the Windows module pack ( https://forge.puppetlabs.com/puppetlabs/windows ) which includes the powershell provider that lets you use ps1 files instead of needing to escape certain characters.

      Puppet 4 (just around the corner) is going to have native support for HEREDOCs, which means you can implant your PowerShelll directly in your Puppet manifest (without having to escape things). Take a look at Henrik’s post ( http://puppet-on-the-edge.blogspot.com/2014/03/heredoc-is-here.html ).

      As far as calling DSC directly, you are going to see quite a bit more of that. For now, take a look at https://forge.puppetlabs.com/msutter/dsc

  • Pingback: The Morning Brew - Chris Alcock » The Morning Brew #1668