Install Puppet Client on Linode Ubuntu 10.04 LTS (Lucid Lynx)
This is a tutorial that explains how to create a puppet client and register it with a puppet master. We will start by launching a new Linode instance running 32 bit Ubuntu 10.04 (Lucid Lynx). Once the instance is running we will install puppet and register it with an existing puppet master.
Launch a new instance
In this tutorial we are going to walk through launching a virtual instance using the services provided by Linode. You should be able to apply the initial steps to your cloud provider with a fair dose of common sense. For the purposes of this tutorial I'm using the defaults provided by Linode for the Ubuntu 10.04 LTS distribution. Make sure your instance is running and connect to it through the shell.

Install Puppet
The process to install puppet is super simple. Add the repository to apt's sources, authenticate the key from puppetlabs and then use an updated apt to install puppet.
Connect Puppet and Puppet Master
Connecting the puppet client to the puppet master is incredibly easy so let's spend some time getting familiar with facter and puppetca. Facter is a program that gathers variables about a client and exposes them for use in puppet. Let's use facter to retreive the fully qualified domain name (fqdn) of our linode instance to see if it is registered with our puppetmaster already.
As you can see, the fqdn of this linode instance is li220-252.members.linode.com. We can query the puppetmaster to see if this instance is already registered. If this is an instance you reuse it is likely to already be registered and should be cleaned from the puppetmaster.
Now that we know the puppet client does not have a matching certificate on the puppet master we can initiate a new signing request from the client. Normally your puppetmaster server fqdn is stored in configuration files controlled by puppet, but we can use the --server flag to explicitly pass it for now.
Back on the puppetmaster we pass the --list flag to puppetca with no arguments to see all pending signing requests. puppetca uses the --sign flag to sign the certificate request.
Define the Puppet
Now that the signing process is complete, our puppetmaster can deliver files to the puppet client. Each machine is defined as a node in puppet. The node is identified by running a regex against the fqdn of the client. These node definitions are typically stored in /etc/puppet/manifests/site.pp on the puppet master. Here's a quick example that illustrates a best practice of defining a base class that is inherited by the linode instance we have been working with. The base class is used to include modules that are common to all machines in the system.
Invoke the Puppet Master from the Puppet
At this point you can switch back to the puppet client and rerun puppetd. The modules defined for the node perform their magic and set up the puppet for us.
