[Ilugc] Tutorials for puppet

  • From: gs@xxxxxxxxxxxx (Gourav Shah)
  • Date: Wed, 5 Sep 2012 13:27:45 +0530

My method of self training  -- try it on a couple of VMs, post errors
in the respective mailing lists and get the solutions from the guru's
keyboard :)

This is the best way to learn, by doing. There is exhaustive documentation
available on the official Puppet/Chef sites.


My *personal impression* (do intend to start emacs/vi type discussion
here):  chef appeared to have an edge over puppet.  Of course, in the
FOSS world this keeps changing with the new releases of the respective
suites.  A Google search for 'puppet chef sysadmin' brings up quite a
few postings on both.

Thats Arun for starting this discussion and tempting me to jump in with my
opinions.

I have used both, Puppet and Opscode Chef, for over two years now to
automate complex clustered setups. I started with Puppet, and then moved to
Chef, and never looked back. Puppet uses declarative language, which is
easier to learn for beginners, however in comparison to Chef has multitude
of useful features which make it more attractive. It has many advantages
over Puppet, offers more features such as attributes overriding,
environments, data bags, solr search, knife client, support for
bootstrapping on cloud as well as bare metal. From my experience chef  is
more stable and has predictable behavior  which helps in debugging.   So my
advise to you is, if you are starting with Configuration Management System,
start with Opscode Chef.  Its a little more complex than Puppet is to
learn, but take my words, you wont regret going that way.


Here is one  the example works I could achieve with Chef. This is using
bash script with Chef cookbooks. I have setup a mechanism to bootstrap a
Big Data cluster on ec2  with multitude of inter-dependent services such
as  Apache Zookeeper, Hadoop, Hbase, Kafka, Apache Pig, Hive, Apache Solr
Cloud  integrated and configured to talk to each other.

The end product is a script which takes arguments in the form of number of
instances of each type to be launched. Script uses ec2 api calls and Chef's
bootstrap mechanism and a few api calls to,

1. Launch ec2 Instances
2. Bootstrap Chef (Install and configure chef client)
3. Configure services as per roles (e.g. zookeeper, hadoop namende, hbase
master, hadoop slave, solr etc. )
4. Configure each service to find other services and manage dependencies.
E.g. Hadoop needs to know where to find zookeeper, and has its IP address
configured in its configurations.
5. Override config parameters to customize setup.

All you need to do is run the bash script with a few arguments, and after a
few minutes, you have your big data cluster setup and configured,
magically...


Thanks
Gourav


Thanks
Gourav
Initcron | www.initcron.com

Other related posts: