Configuring Puppet services

Introduction

This procedure describes how Alexis Huxley set up a Puppet server.

Procedure

  1. Ensure that the hostname ‘puppet’ resolves to your puppet server (the default client configuration expects this).
  2. Run:
    apt-get install puppetmaster
    
  3. Edit /etc/puppet/fileserver.conf and set:
    [files]
      path /etc/puppet/files
      allow 192.168.0.0/24          #  adjust to suit local requirements
    ...

    and then run:

    mkdir /etc/puppet/files
  4. Create a stub manifest (that will just create an empty hushlogin file for root) by editing /etc/puppet/manifests/site.pp containing:
    class hushlogin {
        file { "/root/.hushlogin":
            owner => root,
            group => root,
            mode =>  644,
        }
    }
    node default {
         include hushlogin
    }
  5. Install some modules by running:
    puppet module install ericsson-nisclient
    puppet module install jonnyx-resolv_conf
    puppet module install trlinkin-nsswitch
  6. Note that after installing new modules or making changes to site.pp, you do not need to restart the puppet server process.

Client-side procedure

This section will moved or entirely removed, once encoded elsewhere.

  1. On the client run:
    apt-get install puppet
  2. If the puppet server is not accessible simply by using the name ‘puppet’ then add the following to /etc/puppet/puppet.conf:
    [main]
        ...
        server = <hostname-or-ip-address-of-puppet-server>
  3. On Debian wheezy systems edit /etc/default/puppet and set:
    ...
    START=yes
    ...

    and then run:

    service puppet start
    
  4. On the server you should be able to see the client’s request for authentication by running:
    puppet ca list
    
  5. If you want to reissue a certificate request (e.g. when switching to a different puppet server) then run:
    service puppet stop
    cd /var/lib/puppet
    mv ssl ssl.delete-me-soon
    mkdir ssl
    chown puppet:puppet ssl
    chmod 771 ssl
    service puppet start
    
  6. On the server accept the request and sign the request by running:
    puppet ca sign <client-id>
  7. On Ubuntu 14.10 allow it to do runs by running:
    puppet agent --enable
  8. On the client run:
    service puppet restart
    

See also

  1. Computing
  2. http://web.archive.org/web/*/https://debian-administration.org/article/526/1/2_An_introduction_to_using_Puppet
  3. http://web.archive.org/web/*/https://debian-administration.org/article/528/2/2_An_introduction_to_using_Puppet