220 likes | 575 Views
PUPPET. Puppet ??. Puppet is a cross platform framework enabling system administrators to perform common tasks using code. The code can do a variety of tasks from installing new software, to checking file permissions, or updating user accounts.
E N D
Puppet ?? • Puppet is a cross platform framework enabling system administrators to perform common tasks using code. • The code can do a variety of tasks from installing new software, to checking file permissions, or updating user accounts. • Puppet is great not only during the initial installation of a system, but also throughout the system's entire life cycle.
Puppet (contd..) • In short: Puppet is a system to centralize and standardize configuration and administration of your systems. • These can be desktop systems, workstations, servers, whatever. Puppet is not limited to Linux. We can also use Puppet with UNIX-based OSes like Solaris, the BSDs, and Mac OS X.
Puppet ( contd …) To put it another way, if you want to run updates on all your systems using Puppet, you don't need to specify the Yum commands for Fedora systems, the Zypper commands for openSUSE, and APT commands for Ubuntu and Debian systems. Instead, you can write a manifest and run it on all your systems to update your packages.
Who made Puppet? • Puppet is produced by Puppet Labs, founded by Luke Kanies in 2005. It is written in Ruby and released as free software under the GPL until version 2.7.0 and the Apache 2.0 license after that
Advantages of puppet • Puppet is used by major player in the industry like google, red hat etc. • Wide number of platforms are supported in puppet. • It works smoothly even when deployed in large infrastructure.
Working of puppet • Puppet master – It contains all configuration for different hosts. Puppet master runs as a daemon on master server. • Puppet agent – This is daemon that runs on all servers that are to be managed by puppet.
How puppet works on different platforms? • It is possible due to a tool called Facter • Whenever agent connects to puppet master for configuration the facter gives complete detail about the node to the puppet master. • After getting the complete detail the puppet master decides how to apply configurations.
Installation • To install Puppet, in a terminal on the server enter: sudoapt-get install puppetmaster • On the client machine, or machines, enter: sudoapt-get install puppet
Edit host file gedit /etc/hosts 127.0.0.1 localhost.localdomainlocalhost puppet 192.168.1.17 meercat02.example.com meercat02
On each Puppet client, add an entry for the server: 192.168.1.16 meercat.example.com meercat puppet
Creating manifests file • Create a file /etc/puppet/manifests/site.pp containing the following: package { 'apache2': ensure => installed } service { 'apache2': ensure => true, enable => true, require => Package['apache2'] }
Creating node file create a node file /etc/puppet/manifests/nodes.pp with: node 'meercat02.example.com' { include apache2 }
Final step in Server The final step for this simple Puppet server is to restart the daemon: sudo /etc/init.d/puppetmaster restart
Now everything is configured on the Puppet server, it is time to configure the client. • First, configure the Puppetagent daemon to start. Edit /etc/default/puppet, changing START to yes START=yes • Then start the service: sudo /etc/init.d/puppet start • Back on the Puppet server sign the client certificate by entering: sudo puppetca --sign meercat02.example.com