Quick Start : Puppet

This is mostly a note to myself in case I ever need to do this again. I’ve already got a git managed puppet config and need to remember how to deploy it on a new server.

Pre-Requisites

  • Debian based server (Debian, Ubuntu)
  • git repo for existing /etc/puppet
    • if you don’t have an existing repo, you can turn the default /etc/puppet into one later

On your server

You’ll need to install the tools and your configuration:

Installing Puppet Master

sudo aptitude install puppetmaster vim-puppet

Install git managed puppet repo

Don’t forget to change the repo name where necessary!

sudo mv /etc/puppet.default/ /etc/puppet
sudo mv /etc/puppet/ /etc/puppet.default/
git clone git@github.com:chiselwright/puppet-chizography.git puppet
sudo mv puppet /etc/
sudo /etc/init.d/puppetmaster start

Creating a new puppet config repo

If you want to create a repo from the default configuration, now’s the time:

cd
cp -R /etc/puppet .
cd puppet
git init
git add .
git commit -m 'initial commit'

Add remotes, etc, to your heart’s content.

On your desktop/victim

Assuming Debian based still (Debian, Ubuntu, Linux Mint)

sudo aptitude install puppet vim-puppet

Add puppet to local hosts file. Don’t forget to change the name of the puppet server!

sudo bash -c 'echo $(host chizography.net |grep address |cut -d\  -f 4) puppet >> /etc/hosts'

Run the first update:

sudo puppetd -tv --waitforcert 60

Generating certificates on the server

If you get stuck waiting for the certificate jump back on the server and run:

sudo puppet cert -s --all

By default the puppetmaster shouldn’t auto-sign incoming requests.

Congratulations

You now have a puppetmaster and (at least) one managed machine.

Leave a comment

About Chisel

user-pic