Puppet Tutorial: Installing Puppet master And Puppet Agent
Installing Puppet master and Puppet agent is not at all a difficult task. In this post we will go through the steps for installation.
We had a look at puppet facter in my previous post How Does Puppet Work. Now facter can be considered as an inventory management tool for puppet. It returns information about each node to puppet master, based on which puppet master will fetch the configurations, and submit to the node.
If you notice puppet version numbering, you will notice that, just after the 0.25.5 release, they rolled out the 2.6 version. People might get baffled on seeing this sudden change in version. This sudden change in version numbering was due to the fact that, 2.6 version was much more improved version than the previous ones, and the previous version numbering scheme did'nt reflect the exact growth of puppet.
NOTE: The puppet master package always needs to be a greater version than the puppet agent. For example if you have your agents with version 0.25, you can have your puppet master with 2.6 version. But not the other way.
How to Install Puppet on Redhat/Centos & Fedora?
The main prerequisites while installing puppet on redhat/centos and fedora is that you need to have the following.
- Ruby Language
- Ruby Libraries
- Shadow Ruby Libraries
The above mentioned things can be easily installed using YUM package manager.(You can easily get those package in the distribution DVD)
[root@slashroot2 ~]# yum install ruby-shadow ruby ruby-libs
Note: You need to have epel,rpmforge repository configured for this
We will be installing puppet master and agent on the two machines named slashroot1 and slashroot2 similar to the Installing ganglia gmond and gmetad post.
Lets make slashroot1, our puppet master. So a puppet master server must contain the following packages.
- Pupppet
- Puppet-server
- facter
[root@slashroot1 ~]# yum install puppet puppet-server facter Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
facter i386 1.6.6-1.el5 epel 68 k
puppet noarch 2.7.9-1.el5.rf rpmforge 1.0 M
puppet-server noarch 2.7.9-1.el5.rf rpmforge 14 k
Installing for dependencies:
augeas-libs i386 0.10.0-3.el5 epel 373 k
ruby-augeas i386 0.4.1-2.el5.rf rpmforge 26 k
Transaction Summary
================================================================================
Install 5 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
- the package "puppet" contains the puppet agent
- the package "puppet-server" contains the puppet master server
- the package "facter" will contain the tool which will act as fetching information about the node.
Now lets install the packages required for a puppet node(the server which will fetch information from puppet server).
The clients or node requires only the package "puppet" and "facter". we will be configuring this on the host slashroot2(which will act as our node client).
[root@slashroot2 ~]# yum install puppet facter
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
facter i386 1.6.6-1.el5 epel 68 k
puppet noarch 2.7.9-1.el5.rf rpmforge 1.0 M
Installing for dependencies:
augeas-libs i386 0.10.0-3.el5 epel 373 k
ruby-augeas i386 0.4.1-2.el5.rf rpmforge 26 k
ruby-shadow i386 1.4.1-7.el5 epel 9.5 k
Transaction Summary
================================================================================
Install 5 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 1.5 M
Is this ok [y/N]: y
on ubuntu and debian system you can achieve the same using apt-get. The puppet-server package for debian system are named puppetmaster. So to install a puppet server(master) on a debian machine, you can do that via apt-get as shown below.
apt-get install puppet puppetmaster facter
On our next post we will start configuring puppet master.
Comments
puppet and facter are yum
puppet and facter are yum dependencies of puppet-master.
You can run the following:
# yum install puppet-master
and it will take care of the rest
# yum install puppet-master
# yum install puppet-master
will also take care of ruby, ruby-shadow, ruby-libs
Configure Puppet
Thank you ! Nice topic
Could you write the full configuration (Client Server with an useful example).?
Thank you in advance.
Getting error while installing Puppet puppet-server facter
I am using Cent-OS.
[osboxes@osboxes ~]$ sudo yum install puppet-master
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.mit.edu
* extras: centos.mirrors.wvstateu.edu
* updates: mirror.lug.udel.edu
No package puppet-master available.
puppet
Very good write-up. I definitely appreciate this website. Continue the good work!
<a href='http://vmonlinetraining.com/devops.html'>Devops Online Training</a>
Add new comment