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