BT

Interview and Book Review: Managing Windows Servers with Chef

| Posted by Matthias Marschall Follow 0 Followers on Oct 24, 2014. Estimated reading time: 5 minutes |

John Ewart’sManaging Windows Servers with Chef“ covers all aspects of managing Windows systems with Chef. After introducing the fundamentals of using Chef on Windows it describes how to get ready to be able to use Chef on your Windows systems. Then it discusses Windows-specific resources in detail and moves on to provisioning a .NET application with Chef. The book also covers how to manage cloud services like Microsoft Azure, Amazon EC2, and Rackspace Cloud with Chef before it dives into more advanced Chef topics like supporting multiple platforms and testing Chef recipes.

The book is useful for everyone who needs to manage Windows hosts. Chef offers Windows support by providing knife plugins to handle Windows specific tasks like logging into a remote Windows box via winrm instead of SSH and Windows-specific resources.

After giving an overview about what’s possible with Chef when managing Windows systems John shows the reader how to install Chef client on a Windows box either by bootstrapping a host with knife from a workstation or by manually installing Chef on the host using the MSI package. He explains how to enable Windows Remote Management and how to configure your firewalls.

The third chapter is all about Windows-specific resources. Things like Batch scripts or Registry manipulation are covered as well as enabling specific Windows features using Deployment Image Servicing and Management (DISM) or the server manager command-line tool. John finishes the third chapter showing the reader how to reboot Windows after your Chef run has finished its job.

Chapter four introduces a cookbook, which installs a .NET application. This is a great starting point for developing Windows recipes as it shows some of the previously introduced Windows-specific Chef resources in action.

After getting the basics right its now time to cover more advanced topics like managing cloud services with Chef. John introduces the required knife plugins for Microsoft Azure, Amazon EC2, and Rackspace Cloud. He shows how to create new server instances and how to bootstrap nodes in the cloud.

In the final chapter, John describes advanced concepts like how to manage heterogeneous networks, handling multiple platforms, using source control for managing Chef recipes and testing recipes using ChefSpec.

InfoQ spoke with John Ewart about his book “Managing Windows Servers with Chef”:

InfoQ: What are the advantages of using Chef for managing Windows environments over other tools?

John: I would say that the advantages of using Chef over other tools for Windows is the same as using Chef for other platforms; being able to write recipes and cookbooks that are written in Ruby opens a lot of doors that more static state definition doesn't get you (i.e YAML or JSON). Where Chef doesn't provide you with a built-in resource or primitive you can easily extend Chef to build your own. Obviously there is some cost to this in learning Ruby if you aren't a Ruby programmer; however, even for those who are not experienced enough to extend the Chef core through libraries or LWRPs, being able to use basic logic mechanisms in templates or recipes is very powerful. Also Chef now is increasing support for Windows integration through DSC and other resources that are specific to Windows.

InfoQ: How can people better master the steep learning curve of learning Ruby and Chef concepts when adopting Chef?

John: When talking about Ruby, specifically, I would say that, of all programming languages, Ruby is one of the lowest-friction ones out there. By that I mean that the language is reasonably straightforward to read and has a plethora of available resources out there to learn basic Ruby skills. Sites from Code Academy to the Ruby website's "Learn Ruby in 20 Minutes" series and others make it a very accessible programming language. In fact you can even learn how to write Ruby directly from your browser using the interactive Ruby interpreter located at tryruby.org.

Regarding learning Chef-specific concepts, there are lots of resources on how to learn to use and extend Chef from various books to the "Learn Chef" track on the Chef website. Because of the strong community surrounding Chef, the mailing list, IRC and other peoples cookbooks provide a lot of available resources for learning best practices or improving your existing work. There are also a number of courses and workshops that are available as well as a number of DevOps-related meetups around the world where you can find other people who are excited about Chef and happy to share their knowledge.

InfoQ: Which limitations does Chef have on a Windows platform in comparison to Unix?

John: Chef on Windows is rapidly becoming an amazing tool, it has long been supported by Chef but within the past year or so that pace has picked up immensely. I can say that there are some limitations or rough-patches around things like authentication and bootstrapping hosts, particularly cloud hosts with WinRM using HTTPS, so that's not quite as easy as, say, using SSH with a UNIX-alike host. The automation capability that Chef brings to Windows is so amazing that I would hesitate to say that it has "limitations in comparison to UNIX"; that being said, there has historically been a smaller community of Windows users so a lot of community-maintained cookbooks have traditionally been very Linux-centric but again that is changing rapidly.

InfoQ: What has changed in the way to manage Windows with Chef with Chef 12?

John: I would say that the biggest changes in Chef 12 are tighter PowerShell integration and support for DSC.

About the Book Author

John Ewart is a system architect, software developer, and lecturer. He has designed and taught courses at a variety of institutions, including the University of California, The California State University, and local community colleges. These courses cover a wide range of computer science topics, including Java, data structures and algorithms, operating systems fundamentals, Unix and Linux system administration, and web application development. In addition to working and teaching, he maintains and contributes to a number of open source projects. He currently resides in Redmond, Washington, with his wife, Mary, and their two children.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT