Thursday, November 3, 2016

Configure Puppet Master and Slave

In my case following are the scenarios

Puppet Master - skynet.dc
Pupper Client - moonclouds

Enable RPM for puppet on both master and slave

RHEL/CentOS 7 - rpm -ivh
RHEL/CentOS 6 - rpm -ivh
RHEL/CentOS 5 - rpm -ivh

On Puppet Master, install the following

yum install puppet-server
puppet resource package puppet-server ensure=latest
/etc/init.d/puppetmaster start

On Puppet Client, install the following

yum install puppet
puppet resource package puppet ensure=latest
/etc/init.d/puppet start

On Puppet Master, add the configuration

vi /etc/puppet/puppet.conf
add these names under [master] heading

dns_alt_names = puppet, master.local, puppet.skynet.dc

service puppetmaster restart

On Puppet Slave, add the configuration

vi /etc/puppet/puppet.conf

Add master DNS name under [agent] heading. Puppet will connect to server.

server = puppet.skynet.dc

vi /etc/default/puppet
service puppet restart

Sign Slave Certificate on Master

[root@skynet ~]# puppet cert --list
  "" (SHA256) 6C:0B:24:CE:EA:F1:97:BF:89:39:FF:AB:6A:B9:AB:FF:8E:B3:EE:0D:E6:73:DD:9A:D5:05:6C:CE:24:0C:3D:DC
[root@skynet ~]#

[root@skynet ~]# puppet cert --sign
Notice: Signed certificate request for
Notice: Removing file Puppet::SSL::CertificateRequest at '/var/lib/puppet/ssl/ca/requests/'
[root@skynet ~]#

Location of certificates on puppet: /var/lib/puppet/ssl/

The above preparation will help the puppet clients to communicate with master. The next you need to code your requirement as code.

No comments:

Post a Comment