This post originally appeared on Chef engineer Alex Vinyar’s blog.
To teach is to learn…
…or something along these lines. “How do I manage reboots with chef-client on Windows” is a question I hear every so often.
So, this time around, I decided to buckle down and write down as many ways as I could remember to reboot a server and continue a chef-client run. No mucking around with the run_list, or messing around with multiple run_lists, definitely no manual steps, and most definitely no knife exec.
Here is my brainchild – input and feedback are most welcome!
https://github.com/vinyar/chef_win_reboots
In my experience I found a couple of common situations where Windows needs to be defibrillated-
With Chef managing your infrastructure there is a new reboot scenario:
The patterns in the Github repo allow users to manage reboots at the resource level, or as a wrapper cookbook pattern.
A real example can be seen in pattern two – which was really the genesis for this repo from way back when – https://github.com/vinyar/chef_win_reboots/blob/master/reboot_demo/recipes/pattern2.rb