Puppet


This post is in the category: Applications

These posts are small bits of information for applications that I feel are worth noting.


I build up and tear down servers often for testing and development. I use Puppet to assist with bringing up servers quickly. Using Puppet with Debian preseed files allows me to spin up a VM, walk away, and come back to a fully configured box – super cool!

Server (Puppetmaster) Installation

[root]$ apt-get install puppetmaster

To enable the general file server, uncomment the below section in /etc/puppet/fileserver.conf.

[extra_files]
  path /etc/puppet/files
  allow *

Puppet Server Certificate Commands

List certificates waiting to be signed

[root]$ puppet cert list

List all certificates

[root]$ puppet cert list -all

Sign a client certificate

[root]$ puppet cert sign hostname.example.com

Sign all waiting certificates

[root]$ puppet cert sign --all

Clean / Purge existing certificate

[root]$ puppet cert clean hostname.example.com

Client Installation

[root]$ apt-get install puppet

Enable the puppet service on Ubuntu 12.04.

[root]$ sed -i s/START=no/START=yes/g /etc/default/puppet

Enable the puppet service on Ubuntu 14.04.

[root]$ puppet agent --enable

Puppet Client Commands

Run once in debug, verbose mode

[root]$ puppet agent --no-daemonize -v --onetime

Purge client certificates; rejoin to same puppet server

[root]$ rm /var/lib/puppet/ssl/*/*.pem

Purge client certificates; join to new puppet server

[root]$ rm /var/lib/puppet/ssl/*/*.pem
[root]$ rm /var/lib/puppet/ssl/crl.pem
This entry was posted in Applications on by .

About Andrew Wells

I have been developing on the LAMP stack since about 2006. I run Ubuntu XFCE on my desktop and have a history of managing Ubuntu and CentOS servers. I code web applications mostly in PHP but have experience with other languages as well. When I'm not working, I can be found working in my home lab or out snowboarding, hiking, camping, or biking depending on the season.

Leave a Reply

Your email address will not be published. Required fields are marked *