Configuration Management for Windows

Nathan Lee picture Nathan Lee · Feb 5, 2011 · Viewed 28k times · Source

Are there any tools for windows like that *nix world has? I am looking for something like Chef or Puppet.

I have found cfEngine but it still looks very *nix centric. Ideally it would be open source, and command line driven.

The idea is to put together an automated infrastructure with windows based servers. Our current IT department does not allow non-windows servers.

Answer

jtimberman picture jtimberman · Feb 6, 2011

Chef is supported on Windows by Opscode. While we don't run Windows for any of our infrastructure, we do have developers who are continually improving our Windows support. We also get community contributions, and most of the early phase Windows functionality for Chef was contributed by the community.

Important: Opscode now provides an MSI installer for Chef on Windows. This makes it easier than ever to get Chef and Ruby installed on Windows.

While we have a lot of Unix/Linux background across our teams, our intention is that Windows is treated as a first class citizen. 2012 will be a big year for Chef and Windows. Keep an eye on the Opscode blog for announcements.

The following Chef Resources work on Windows:

Environment Resource: sets windows environment variables
User
Group
Mount
File
Gem Package
Remote File
Cookbook File
Template
Service
Ruby Block
Execute

That is, these are resources included in Chef itself. As Chef is extensible with cookbooks, many more resources are added through a variety of Windows specific cookbooks. Read on for more information.

You can get started with using Chef and Windows here:

Originally, Doug MacEchern wrote some cookbooks to do a number of things to automate windows, too.

This information and more available on the Chef Wiki:

Update

The following cookbook adds new resources to Chef to manage Windows:

It is an update/rewrite of Doug's fine resources from his repository linked above. Documentation is available on the Chef Wiki.

The following cookbook deploys PowerShell and provides a resource to run PowerShell commands/scripts directly in Chef Recipes:

Documentation is available in the README.md included in the cookbook tarball.

Additional cookbooks for installing 7-zip, managing IIS and SQL Server have been added. Our "database" cookbook has been extended with a resource/provider for managing SQL Server databases and users (with the tds rubygem).

The knife-windows plugin for knife adds functionality for interacting with Windows systems to provision them with Chef installation.

Update: We have now added File ACL support for Windows to Chef, for all the usual file/directory suspects.