Install Puppet Client on RHEL 6.4


This article will show how you can prepare a puppet client on Red Hat Enterprise Linux 6.4 (RHEL 6.4) server. I have installed a rhel 6.4 Base server  and also configured a local yum repository using the ISO image that was available to me. Please do the same before you start to configure puppet client.

Pre-requisites

Install Base RHEL 6.4 server
Configure YUM repository
Disk space: 8 GB for my setup, you can decide based on your needs.
RAM: 1 GB, again it is up to you based on your work loads.

Installing ruby


The ruby package alongwith it's libraries are needed, please install them:

# yum install ruby ruby-libs ruby-shadow

Installing puppet client


The puppet packages are available in the EPEL repository. You could install epel repository on the client server with below commands:


# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm
warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]


Verify installed rpm

# rpm -q epel-release
epel-release-6-8.noarch


Modify epel repository

The default epel repos fiel did not work for me and I did not get the epel repository. I had made changes to this file to get epel working. I will show you how to do this.

Edit your /etc/yum.repos.d/epel.repo file to look like below:

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

Now you can run "yum repolist all" command and check if your new epel repository is working. Install the puppet client package alongwith the package facter. Facter is responsible to collect machine information and update this to the puppet server.

# yum install puppet facter

Verify rpm's installed:

# rpm -q puppet facter
puppet-2.7.26-2.el6.noarch
facter-1.6.18-7.el6.x86_64


Puppet client configuration

Add below line in your /etc/puppet/puppet.conf, under the section [agent]


[agent]
server = hostname of your puppet server
report = true
pluginsync = true


Make sure puppet client starts if server ever reboots. 

# chkconfig puppet on

Your are now ready to start your puppet client. The below command will automatically generate SSL certificate because this is required by the puppet server to validate connections. This is one time command.

#  puppet agent --no-daemonize --verbose
info: Creating a new SSL key for ldap.likwid.com
info: Caching certificate for ca
info: Creating a new SSL certificate request for ldap.likwid.com
info: Certificate Request fingerprint (SHA256): 66:AB:AE:DD:40:9A:BA:75:A3:68:72:A2:33:18:E2:F9:A8:A0:23:7B:2E:05:7D:D9:08:D6:E4:7F:8C:33:93:B9
notice: Did not receive certificate
info: Caching certificate for ldap.likwid.com
notice: Starting Puppet client version 2.7.26
info: Caching certificate_revocation_list for ca


Signing client certificate

Now, sign this certificate at you puppet server:

# puppet cert --sign

If sign is successful, you should get below message:

Notice: Signed certificate request for ldap.likwid.com

Your puppet client is now ready!

I will write puppet server setup and writing manifests to configure clients in coming articles. For example, you can now write manifests (modules) to copy files, install MySQL, restart Apache, install SSH etc.

See you next time. Cheers!

Comments

Popular posts from this blog

Install IBM Tivoli TSM 5.5 Backup Server (trial) on your Laptop using Linux KVM virtual machine

IBM TSM Client 5.x install (trial) on your Laptop using KVM Virtual Machines