Recently I got the notion of setting up a puppetized configuration system for my computers at home. I have two machines:
My biggest frustration, though, was find a simple tutorial that would help me get Puppet up and running, the two machines talking, and a configuration pushing down onto the client.
So after pulling from a few separate sources, here's what I found works. In a future post I'll write about how, after more frustration, I was able to get configurations pushing down onto the systems and how I setup version control on the puppet configurations themselves.
So, obviously, I installed puppet on halo, and puppet and puppet-server on earth.
What I did was to configure earth to be it's own certificate authority with the following in /etc/puppet/puppet.conf:
The steps to follow are:
- earth - a Linux desktop, which will be the puppet client
- halo - a Linux server, which will be the puppet server as well as a client
My biggest frustration, though, was find a simple tutorial that would help me get Puppet up and running, the two machines talking, and a configuration pushing down onto the client.
So after pulling from a few separate sources, here's what I found works. In a future post I'll write about how, after more frustration, I was able to get configurations pushing down onto the systems and how I setup version control on the puppet configurations themselves.
Step 1: Install Puppet (Fedora 19)
Not the hardest part, but you do need to be aware of what packages are out there. The two packages are puppet and puppet-server. The former is what you need on any system that will act as a client or agent, the latter on any system that will be offering up puppetized data.So, obviously, I installed puppet on halo, and puppet and puppet-server on earth.
Step 2: Configuring The Puppet Master
This is the first part that gave me headaches. Since I don't want to deal with external certificates, I just wanted something that would work for me in my private network.What I did was to configure earth to be it's own certificate authority with the following in /etc/puppet/puppet.conf:
[main]
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl
# self-signing certificates
server = earth.gateway.2wire.net
certname = earth.gateway.2wire.net
[master]
reports = store, http
modulepath=/etc/puppet/modules:/usr/share/puppet/modules
[agent]
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
Step 3: Exchanging SSL Certificates With The Agent
Here is where there was a decided lack of examples online. And the Puppet website didn't help at all, especially with recovering things after a failure occurred.The steps to follow are:
- unless you have your own DNS, add the fully qualified hostnames of each machine in the other's /etc/hosts file; i.e., for me I had to put earth.gateway.2wire.net in halo's file, and halo.gateway.2wire.net in earth's, then
- open two terminals on your puppet master (in my case, on earth) and one on your puppet agent (in my case, on halo), then
- start up in one puppet master terminal a master using the command line:
- puppet master --no-daemonize --verbose
- on the puppet agent terminal start an agent using the command line:
- puppet agent -t --no-daemonize --verbose
- you'll see some messages about exchanging the SSL credentials and then a note that no certificate is waiting, at which point in the other puppet master terminal window you'll do:
- puppet cert sign halo.gateway.2wire.net
Comments
Post a Comment