Puppetizing OS X – Puppet installation – jozefmares.com
Home top_menu_hacks Puppetizing OS X – Puppet installation

Puppetizing OS X – Puppet installation

by Jozef Mares

Puppet is cool automation and configuration management tool. I’m really happy with it since day I discovered it – and there is not so much tools that are that useful.

I have puppetized all kind of tasks on my servers like user management, service installation and configuration but on desktop there was nothing puppetized and automated. It’s time to change it.

I’m going to cover installation only in this post, next posts will cover application management, plist management and I hope I will find a way how to interact with keychain.

Installation is pretty simple compared to older days. :) Just visit Puppet labs download page and install latest versions of Puppet, Hiera and Facter.

You should install Facter first as Puppet need it.

Next step is to create group and user by running:

sudo puppet resource group puppet ensure=present
sudo puppet resource user puppet ensure=present gid=puppet shell='/sbin/nologin'

If you want puppet to run in master/client setup add these plist files to your system. They will ensure that Puppet master and Puppet itself will start-up during boot:

wget http://docs.puppetlabs.com/guides/files/com.puppetlabs.puppetmaster.plist
wget http://docs.puppetlabs.com/guides/files/com.puppetlabs.puppet.plist

Move plists to /Library/LaunchDaemons, set rights and let launchd let know about them:

sudo chown root:wheel /Library/LaunchDaemons/com.puppetlabs.puppet.plist
sudo chmod 644 /Library/LaunchDaemons/com.puppetlabs.puppet.plist
sudo chown root:wheel /Library/LaunchDaemons/com.puppetlabs.puppetmaster.plist
sudo chmod 644 /Library/LaunchDaemons/com.puppetlabs.puppetmaster.plist

sudo launchctl load -w /Library/LaunchDaemons/com.puppetlabs.puppet.plist
sudo launchctl load -w /Library/LaunchDaemons/com.puppetlabs.puppetmaster.plist

You should also let know system where Puppet master is, for this basic setup you can just add this to your /etc/hosts: puppet

For OS X I prefer standalone setup, but this will be covered in next post.

You may also like