70

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.

Nathan Lee
  • 2,231
  • 2
  • 23
  • 26
  • Update: Both Chef and Puppet now have Windows modules and Inedo Otter (http://inedo.com/otter) was built for Windows and integrates with PowerShell/DSC. – Karl Harnagy Jun 27 '16 at 20:45

7 Answers7

51

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.

jtimberman
  • 8,228
  • 2
  • 43
  • 37
  • @sumek Depends on what you mean? Not supported on Windows? – jtimberman Jul 13 '11 at 01:00
  • 1
    yes, what chef functionality is not supported on windows? – sumek Jul 13 '11 at 11:03
  • 1
    @sumek Chef's core functionality is managing resources on nodes, and it relies on a provider for a particular operating system to manage resources of a particular kind. The providers that are missing on Windows may not have a direct parallel on Windows, but since Chef is extensible, it is possible to add "support" via cookbooks, similar to the Powershell example. A new "Windows" cookbook released recently adds Windows registry and "package" management as well. – jtimberman Aug 02 '11 at 04:02
  • Note: I've updated the answer to include a link to the file acl information on the Chef Wiki. – jtimberman Jun 23 '12 at 16:19
  • thanks for post the link – Robert Jan 24 '14 at 16:05
  • Chef is working on adding the functionality found in the "Windows" cookbook to the core chef libraries. Some resources have been done already (registry_key, for example), and others are coming soon. Stay tuned to the Chef blog for release details. – jtimberman Mar 02 '14 at 18:48
8

Cfengine Nova has had stable native support for Windows for years (i.e. no Cygwin is needed).

Everything that is possible on Unix (e.g. run commands, file copy, file edit, etc.) can also be done on Windows, with addition to Windows-specific features like

  • Registry management
  • File ACL permissions
  • Windows service management
  • Event log support
  • Advanced OS discovery (version, arch, service pack, network, domain, etc.)

For a short introduction, look in Section 11 of the Nova supplement manual: http://cfengine.com/files/Nova_Supplement.pdf

user589137
  • 91
  • 1
4

I have been looking for exactly the same thing.

I ran across Windows PowerShell Desired State Configuration which purports to do many of the CM tasks you'd want to do with Chef/Puppet.

I am not going to give any opinion on it because I am still early in evaluating it - but if you're still looking for something, give this a shot.

MattW
  • 12,902
  • 5
  • 38
  • 65
4

Having had a deal of experience here i think that it really depends what you need to manage on a given box. Find your most common use case and ask a more specific question in terms of: whats the best tool for managing that. Things like IIS can be tricky (on older windows builds at least) and finding modules for CM tools to manage things like IIS settings and app pools can be hit and miss - especially when it comes to advanced settings (worker thready recycling springs to mind)

However Puppet has forge modules for more basic IIS settings which largely worked for me - and i really like the declarative format here - especially if you are managing large numbers of IIS servers

Also one of the major issues with Windows and configuration management is the lack of a proper package management solution - what actually comes in really handy here is something called Chocolatey (see http://chocolatey.org/) there is a plugin to use this as a provider in puppet - making the whole management process particularly easy. However i imagine that this can be integrated with other CM tools aswell - but does a great deal to help with installing software automatically in a windows environment

Though it is worth stating that whatever you end up using you will have to spend a while figuring out some odd bugs - windows and scripting/automation is not the best.

Scarby
  • 51
  • 5
3

Based on my experience, I am glad to use such toolset:

  1. Use powershell to manage the windows configuration. If only windows server, you can remotely execute the ps script.

  2. If you like, suggest to use Puppet or Chef to distribute your powershell script into client.

  3. If you like, suggest to use cygwin + (windows sshd) + crond to manage the shell-likely scripts which run in windows.

Huan
  • 287
  • 5
  • 12
1

I think its better if you can use Microsoft System Center.

It a solution from the Microsoft to manage Microsoft base products form desktops to servers and all. Should give a try ...

How to Deploy Applications in Configuration Manager

Deploying Software and Operating Systems in System Center 2012

Thilina
  • 695
  • 2
  • 7
  • 20
0

I don't recommend Chef unless you are a software developer who knows ruby. Chef is designed for software developers who want to manage IT infrastructure. Not for SysOps people who are the ones that actually end up managing it. It tries to treat IT infrastructure like code which is counter intuitive to how it actually works which is more like just data.

Puppet is more friendly for SysOps people imho but still can be complicated.

The good news is that there are other options as well. Less so for windows but projects like Puppet do support it reasonably well.

fred
  • 1,146
  • 11
  • 16
  • 4
    [DevOps](http://en.wikipedia.org/wiki/Devops) would be the appropriate term (vs SysOps or "developers who manage IT infrastructure".) Essentially a new class of uber-developer-admins has necessarily been created, for those certain shops where a much closer synergy is required between your traditional dev's & the traditional admins who have supported them, to facilitate more dynamic, yet fully automated deployments from development into production. – michael Dec 31 '13 at 09:07
  • Down vote for being highly subjective answer. – Tom Duckering Jan 12 '15 at 12:11
  • @Tom: I've been researching Windows CM tools from a DevOps perspective (ie I'm a developer responsible for release management). From what I've read elsewhere about Chef and Puppet fred is pretty accurate about the potential downside of Chef - that it requires users to write configuration scripts in Ruby whereas configuration in Puppet is more straight-forward. In fact, I've read two blog posts elsewhere that make the same claim as fred: That Chef is more oriented towards DevOps while Puppet is a better fit for ITPros. I've never used either so have no personal experience. – Simon Elms Jan 25 '15 at 05:41
  • @SimonTewsi: a fair point but the answer makes assertions about the design intentions of Chef which are unsupported by fact. It would be a bit more palatable if the answer cited some article describing the features and characteristics that could explain this feeling. – Tom Duckering Jan 26 '15 at 10:04