Part 2: Puppet 2.6.1, configure puppetmaster and puppetd

Configure Puppetmaster

For installing puppetmaster 2.4.1 on CentOS please click here for Part 1

In Part 1 we covered installing the Puppetmaster and Puppetd packages on Centos 5.5. We will now configure a very basic client/server model to serve the /etc/resolv.conf file to our client. Simple enough!

Create your first module

Our first module will be called networking::resolver, it’s job will be to push out a resolve.conf file to clients.

Create the directory structure under /etc/puppet

Create your resolv.conf file

Create your module manifest

Configure your site and nodes

Create a minimal site.pp

Create a tempates file

Create your node file

Don’t forget to replace with the fqdn of your client server

Set up puppetmaster parameters

Create default configuration

This is a minimal puppet.conf file, a more detailed file can be produced with puppetmasterd –genconfig

The autosign will automatically sign certs for new clients, this is discouraged in a production environment but useful for testing. For information on running puppetmaster without autosign see the puppetca documentation.

Set permissions for your fileserver.
Note that this allows everything, you should restrict this in a production environment.

Start puppetmaster

The puppet client

Configure puppetd
On your client, edit puppet.conf and add the following in the [agent] section, remembering to change to the fqdn of your Puppetmaster.

Allow puppetrunner

Create a file called namespaceauth.conf and add the following, note in a production environment this should be restricted to the fqdn of your puppet master

Start puppetd

View pending changes

Use –test along with –noop to do a dry run to view the changes that puppetd will make

Now you can run puppetd without –noop to pull in your new resolv.conf file

This is a very basic demonstration of creating a server/client pair with puppet. There is much more documentation on configuring and managing puppet here

Next: Installing Puppet Dashboard

Follow and share if you liked this

Related Post

Be the first to comment

Leave a Reply

Your email address will not be published.