Manage puppet agent on Windows

puppet.conf

As you may already know puppet works in server – agent architecture. Hence, you will most likely maintain one or more puppet server, and many puppet agents, as many as servers in your environment to be configured by puppet. How can I manage puppet agent on Windows? This question we are trying to address here.

Manage puppet agent

There are couple items to consider when you think about puppet agent. Firstly, the puppet server that puppet agent will communicate to. Secondly, the environment puppet agent will use, and based on this fact what modules are going to be applied to host where puppet agent operates. Last but not least, the interval at which puppet agent runs as a service on the puppet node.

All those parameters should be part of puppet.cont for every puppet agent. You must decide how are they going to be applied, and further how are you going to manage any modifications that is required going forward. The environment parameter should be treated as special case. It can be set, and controlled by puppet agent itself, but it’s not only option you can choose from. You can use puppet server to control and propagate desired environment value to puppet agent. ENC was developed to support this option More to read about that in another post. Whatever option you chose, setting of proper environment in puppt.conf of puppet agent should be considered as best practice.

puppet.conf

Basic puppet.conf should look like as below. It will be manageable in environments with medium to large amount of puppet agents.

puppet agent version

Below is just an example of piece of code that can be included in one of the puppet modules to manage puppet version on Windows. Once it is configured, puppet agent upgrade is pretty straightforward exercise across whole Windows environment.

Hiera data

After setting puppet as above you have overall control over those specific puppet agent parameters from one central location, which is hiera data.

References:

Leave a Reply