Managing Windows With Puppet

Puppet is one solution that is trying its best to make sure Windows engineers and admins have the tools necessary to manage effectively. Here’s how to use it.

Many of the most popular infrastructure configuration solutions are built on *nix platforms, like Ansible, Chef, Salt and Puppet. This means that Linux is a first-class citizen for these tools and, consequently, everything else is second. In the Windows world, this can be somewhat depressing, but fortunately that does not mean you can’t manage Windows with these tools. Puppet is one solution that is trying its best to make sure Windows engineers and admins have the tools necessary to manage effectively. Whether it be supporting DSC resources, IIS or Chocolatey, Puppet allows you to automate Windows effectively.

In this article, I will go over some examples of some of the things you can manage on Windows with Puppet, as well as show how to setup Puppet agent. Keep in mind, I am assuming you have a functioning Puppet master server already set up.

Installing Puppet agent on Windows

When it comes to installing software on Windows, I much prefer to use Chocolatey. Chocolatey is an open-source tool and it can be used completely on CLI (CMD or PowerShell). Chocolatey even has the puppet agent package in its public repository located here.

Therefore, to install puppet agent on my windows node, I simply run this command:

PS C:\ choco install puppet-agent –y

Keep in mind if your Puppet master is named anything other than “puppet”, you will want to add an argument in the command to point your node to the name, such as:

PS C:\ choco install puppet-agent –y -installArgs '"PUPPET_MASTER_SERVER=puppet-1.domain.com"'

Awesome, puppet agent is installed!

Now, let’s request the master to sign our certificate:

PS C:\ puppet agent --test –waitforcert=60

On the Puppet master, you will sign the certificate with the puppet cert sign command.

sudo /opt/puppetlabs/bin/puppet cert sign win-test

Done! Your puppet node is now managed by the Puppet master. Let the fun begin!

Install Windows Puppet modules

A Puppet module is an already written packaged code that you can leverage. This can save a lot of time! For instance a module that allows you to install and configure IIS (puppet-iis).

To search for any modules in the Puppet forge (which is a repository of Puppet modules) tagged with “chocolatey” you can run:

Read more at ipswitch.com

Comments are closed.