Installing and configuring Puppetmaster and Puppet Clients (On Ubuntu)

Puppet is a great Client/Server automation tool for your *NIX environment. The tool can be used to automate:

Installations
Updates
Deployment
Service manipulation
etc…

NOTE: Typically, the client(puppet/node) retrieves updates from the server (Puppetmaster). However you can enable push from the server to client as well. See “Client Configuration”.

Follow the below steps to get a basic configuration going.

Installation: Server

Installation: Client

Note: Although not required, you may want to make sure you have the same version of Puppet and Puppetmaster. I have Puppet 2.6.3 and Puppetmaster 2.7.1 running sucessfully, but have had issues with previous versions and installations.

If you like to install the same exact version of client/server you have some options:
1. Install via Ruby

2. Install from source (Assuming you have ruby installed)

3. Another way to install

4. Install form 3rd Party repository

Configuration: Server
Edit the puppet.conf file and add the following lines

Edit the fileserver.conf file and add the following lines

Create the files directory specified above (required to start the puppetmaster service)

Configure your nodes (client) below. The templates will apply to these nodes only.

Configure your templates. Here you’re listing the modules will effect your clients.

Edit the site.pp and import your nodes and templates

Restart puppetmaster to enable the above changes

Configuration: Client
There are only a few steps to get the client up and running. First up is the puppet main configuration file. Edit the file below and make changes.

Configure puppet to automatically at boot

Create the following required file

Created the following file if you like to push content manually from the server.

In this example, I’m using upstart to recycle a service. You’ll to copy “upstart.rb” from the server to client.

Configuration: Certificate
STEP1: On the Client:

STEP2: On the Server:

STEP3: On the Client:

STEP4: Only if necessary: Troubleshooting Certificate Issues:

Repeat the certificate creation process

Configuration: Modules
At this point there are no configuration left on the client. As long as the certificate was configured properly all changes make beyond this point are all on the server. Lets configure a mobile module we included in the configuration above. Lets start off with the required directory structure.

The files directory structure is listed below. In this case we’re assuming you’re going to be deploying a website named “mobile” with it’s root/content of “var/www/mobile”. You can touch these files for this example.

Modify the init.pp file

Modify the config.pp file

Modify the service.pp file

That’s all she wrote. Your clients should retrive any changes hourly (based on configuration above). If you like to push content manually from the server:

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>