Adding a Node to Puppet

Before we add a node to puppet, it needs a static IP address and a hostname. They need to either resolve in DNS, or in our case, the host file which is managed by puppet. So lets add the hostname and ip info into the hosts file, and run puppet to make the changes take affect.

On the puppet server (puppet.example.motorrobot.net)

echo "192.168.7.51 motorrobot1.example.motorrobot.net motorrobot1">> /etc/puppet/files/hosts
puppetd -t

motorrobo1 node

What we are starting with
OS Version: CentOS 6.3 – motorrobot1 kickstarted
Hostname: motorrobot1.example.motorrobot.net
Static IP: 192.168.7.51

Shut off iptables and disable from boot

/etc/init.d/iptables stop
/sbin/chkconfig iptables off

Setup EPEL Repository
The cobbler packages are available on the EPEL repository for CentOS 6. So let’s install that if you don’t already have it installed.

NOKEY warning is OK.

Install puppet client

yum -y install puppet

Point install at puppet in hosts file

echo "192.168.7.2 puppet.example.motorrobot.net puppet" >> /etc/hosts

Generate client cert and ping the puppet master

/etc/init.d/puppet once -v

Back on puppet.example.motorrobot.net

Now we need to sign the cert that was just generated, this authorizes it to get configuration from puppet.
List puppet certs to be signed

puppet cert list

Sign cert

puppet cert sign motorrobot1.example.motorrobot.net

Back on motorrobot1.example.motorrobot.net

Now this node should be authorized to run puppet, perform a manual run to watch the updates.

Run puppet manually

puppetd -t

Start puppet client

/etc/init.d/puppet start

Make puppet client start on boot

/sbin/chkconfig puppet on
(Comments)

Comments