Puppet
Last updated
Was this helpful?
Last updated
Was this helpful?
→
Puppet is a solution to automate the management of an infrastructure, it is an open source product with an important community. Current version is 6.3 (February 2019). An enterprise edition is available with additional features that ease the use of the solution.
Entry points:
Puppet is relying on the agent-master pattern:
An agent node sends a requests (with facts
) to the master and asks for the desired state (catalog
)
The master checks the node is known (and the communication is secured with HTTPS/certificate) and sends back the catalog based on its data repository (including the code to achieve the different configurations)
The agent applies the catalog and reports back the result of the actions
The Puppet master is also known as the puppetserver
.
Interesting modules:
Name
Detail
Source
Standard library of resources for Puppet modules.
puppet-archive
Compressed archive file download and extraction with native types/providers for Windows and Unix
puppet-download_file
puppetlabs-acl
Module to manage the Microsoft .NET framework
puppet-windows_env
puppetlabs-powershell
puppetlabs-registry
Manage IIS for Windows Server 2008R2, 2012 and 2012R2. Maintain application sites, pools, installation, and many other IIS settings.
On Windows, edit the two files:
.fixture.yml
file is where you can declare dependencies with other modules
File path
Details
C:\Windows\System32\drivers\etc\hosts
Host file
C:\Users\xxxxxxx\.gitconfig
Git configuration file
C:\ProgramData\PuppetLabs\puppet\etc\puppet.conf
Puppet agent configuration file
C:\ProgramData\PuppetLabs\puppet\etc\ssl
Puppet client ssl
C:\ProgramData\PuppetLabs\code\environments
: local copy of environment files
File path
Details
/etc/sysconfig/puppetserver
Puppet server configuration file
/etc/puppetlabs/puppetserver/conf.d/auth.conf
/etc/puppetlabs/puppet/puppet.conf
Puppet agent configuration file
/etc/puppetlabs/puppet/hiera.yaml
/etc/puppetlabs/r10k/r10k.yaml
r10k configuration
/etc/puppetlabs
: base path
/etc/puppetlabs/code
: Puppet code managed by git, this is where r10k will
/etc/puppetlabs/code/environments
: Definition per environment, this is where r10k will create folders per git repository branches (production, staging, etc.)
/etc/puppetlabs/puppet
: Puppet Agent configuration
/etc/puppetlabs/puppetserver
: PuppetServer configuration
/etc/puppetlabs/r10k
: r10k configuration
/opt/puppetlabs
: Internal Puppet stuff, binaries, etc
/var/log/messages
: Puppet Agent logs
/var/log/puppetlabs
: Other logging
/tmp
: Used by the installer (issues if set ‘noexec’)
Puppet is modular by design, first step is to look at existing modules for your needs (NB: don't reinvent the wheel and keep you code on added value). Module repository is Puppet forge at .
Roles and profiles, a concrete example by Puppet (, , )
Puppet ()
Go to and select the version that you need (puppet-agent-x64-latest.msi
for example).
It is also known as Puppet master. You can review the procedure to install a Puppet server on this .
Puppet serveur auth configuration file ()
Hiera configuration file ()
/etc/puppetlabs/puppetserver/conf.d
: Settings (see )
You can read .
r10k