Changes

Jump to: navigation, search

User:Prathapan

4,362 bytes added, 12:21, 23 April 2011
Release 0.3
== '''Release 0.3 ''' ==
'''Fully configuration Documents''' Puppet fully documentation Puppet is open source systems and configuration management tool. It a client-server model, where server (puppetmaster) is the centralized server and client (puppet) is installed in the client system that is to be managed. Every configuration is defined in the puppetmaster, and then it is compiled and pushed out /applied to those clients. The communication between puppetmaster and puppet is encrypted and authenticated. Puppet generates the certificate itself and signed by the puppet master to be successfully authenticated. The communication between the client and server is by default 3 minutes, if there are any changes made in the server that is to be applied to the client in the next interval of the communication. The configurations are called resources and group of resources are called collections. Each resource is made of type, title, and attributes. For example: file {“/etc/resolv.conf”: owner=> “root” } The resource type is file, the resource type tells the puppet what type of the resource is managed. There are few other resources such as services, packages, cron jobs, file system and etc. The title is “/etc/resolv.conf” that is a file to be managed by puppet. The attribute here is owner and it has value of root. There are much more attributes available and each has it’s value associated with. By combining many resources( package,classes, number of configuration, etc) into a collection is called classes. For example Apache is a server application and if you want to manage this, you configure the class, which has the many resource of collection and it applied to the node. Let see an example and how we can scale the configuration For example if you want to manage the “ypbind” in the node1 node ‘node1.example.com’{ package{“ypbind”: ensure=> latest } file{“/etc/yp.conf”:source => puppet://files/yp.conf”,notify => service [“ypbind”],require => package[“ypbind”] } service {“ypbind”:enable => true,ensure =>running,require =>[File[“/etc/yp.conf”],package[“ypbind”] ] } } This is configuration is applied to the node1.exapmle.com. Imagine if there are 100 of node to be managed, this configuration has to done again and again. This does not scale well. To reduce this configuration effort in every nodes, wed can group this in to a class instead and then include the class with each node. For example: # /etc/puppet/manifest/classes/yp.pp class yp::client { package {“ypbind”:ensure=> latest} file {“/etc/yp.conf”:source => puppet://files/yp.conf”,notify => service [“ypbind”],require => package[“ypbind”]} service {“ypbind”:enable => true,ensure =>running,require =>[File[“/etc/yp.conf”],package[“ypbind”] ] } } # /etc/puppet/manifest.pp import “classs/*.pp” node ‘node1.example.com’{include yp::client} node ‘node2.example.com’{include yp::client} what I have done is that I group the recourses type into class. Then I call the class in to each node. By doing this eliminate the configuring each resources in each node. Just call the class into each node. But sill it cab be made to scale more. Think if there are few more classes to be applied then each classes has to be called into. For example, # /etc/puppet/manifest/site.pp import “classs/*.pp” node ‘node1.example.com’{include yp::clientinclude foo1include foo2...include foo100 } node ‘node2.example.com’{include yp::client include foo1include foo2...include foo100 } This again brings little bit more configuration over head. There to over come from this we can do it such a way, #/etc/puppet/manifest/group/desktop.pp class desktop { include yp::clientinclude foo1include foo2...include foo100 } #/etc/puppet/manifest/site.pp import “class/*.pp”node ‘node1.example.com’ {include desktop} What I did was group the classes into another class and apply that group into the nodes. This configuration method pretty scale well. For the further learning about the puppet resource type, title, attribute and associated attribute value, I found a really good cheat sheet here. Installing and configuring puppet Please see the release 0.1 Configuring the file server Please see the release 0.2 here are some use full links:
1
edit

Navigation menu