HOWTO Install Puppet on CentOS 5.0

Important Node: This document is very much out of date. It was written more then 6 years ago for ancient versions of Puppet and CentOS. I would refer you to the PuppetLabs website that contains excellent documentation now days as well as package repositories that contain everything one needs. For quick, one-step production-ready install I’d recommand one buy the Puppet Enterprise package or take a look at the Foreman installer.

Having been less then satisfied with the documents I could find online describing the Puppet installation procedure on RHEL5 or CentOS 5.0, I decided to document my own experience of doing so for the benefit of others who will face the same challenge.

Note: So far this procedure had been developed and tested only on CentOS 5.0, therefore it may be completely unsuitable for other operating systems including RHEL5.

Note: Unless specified otherwise all the steps need to be carried out as root.

Installing a Puppet Server

  1. Setup dlutter’s yum repository:
    • download the repository file
      cd /etc/yum.repos.d
      wget http://people.redhat.com/dlutter/yum/dlutter.repo
    • Enable the proper repository, edit the dlutter.repo file, find the [dlutter-rhel5] section and set enabled=1
  2. Install puppet server
    yum install puppet-server
  3. (Optional) If you want —help commands to show useful stuff install the ruby-rdoc package
    yum install ruby-rdoc
  4. Create a minimal manifest file in /etc/puppet/manifests with the following content:
    # The name of the system running the file server
    $server = "pmaster"
    
    node default {
    }
    

    (where pmaster is the name of your puppet server)

  5. Start the puppet server
    /etc/init.d/puppetmaster start
  6. Enable server startup on boot
    chkconfig puppetmaster on

Installing a Puppet Client

  1. Setup dlutter’s yum repository (see details in the server setup).
  2. Install puppet client
    yum install puppet
  3. (Optional) If you want “—help” commands to show useful stuff install the “ruby-rdoc” package
    yum install ruby-rdoc
  4. (From this point on the steps should also be carried out on the server to enable it own built-in client) Configure the puppet client to connect to the server, edit the file /etc/sysconfig/puppet, uncomment the PUPPET_SERVER line, specify the server’s address
  5. Setup puppet client certificate (since we’re using SSL here you need to make sure the client can properly resolve its own and the server’s FQDN, note that you do not need to setup a certificate on the server)
    • Run the puppet client daemon once to generate a certificate request to the server:
      /etc/init.d/puppet once -v
    • Sign the certificate request on the server
      puppetca --sign puppet01

      (where puppet01 is the FQDN of your client host, you can see pending requests with puppetca —list)

    • Run the client again to retrieve the certificate
      /etc/init.d/puppet once -v
  6. Test the client
    /etc/init.d/puppet once -v
  7. (Optional) if you want the client to automatically pull configuration from the server every 30 minutes, enable it in chkconfig and start it as a service

6 thoughts on “HOWTO Install Puppet on CentOS 5.0

  1. Pingback: A Simple Puppet Module Howto

  2. Pingback: Puppet in CentOS | Mutexes

Leave a reply to Raj Cancel reply