The State of Open Source System Automation

The days of DIY system administration are rapidly coming to a close. Why? Because the open source tools available are just too good not to use. Presenting Bcfg2, Cfengine, Chef and Puppet.


Bcfg2 was represented by its creator, Sr. Systems Administrator Narayan Desai.

Some notes on the name: pronounced “bee-config two”. The “B” in Bcfg2 originally stood for “bundle”; now it doesn’t stand for anything. The 2 indicates version 2.

Narayan thinks of configuration management as an API for programming your configuration.

Goals of Bcfg2′s design:

  • Efficient representation of diverse configuration.
  • Scalability to thousands of nodes.
  • Programmability (ability to insert code, not just declarative descriptions of desired configuration).
  • Model configuration in simple unambigious terms. (No way to end up with two different models of the same configuration.) “Closing the loops between goals and reality” is very important in Bcfg2. To enable this, there is a lot of reporting builtin; client reports its state upstream to the server to enable “gap analysis”. This is a very popular feature.
  • Support extensive configuration debugging. Help the sysadmin get to the bottom of things quickly. Bcfg2 has full system introspection capability(why is Bcfg2 making the decisions that it is). Many people think the debugger is the coolest feature of Bcfg2.
  • The Bcfg2 client can be run in dry-run (no changes), interactive (are you sure you want to do this?) and non-interactive mode, which is facilitates learning it.
  • Composition of information from a number of sources. (For example,put together different policies from different organizational sources such as organizational policy (FTP should not be running) and departmental policy(all user home directories must be NFS-mounted from fileserver HAPPYHOME).)
  • Expose plugin API to all aspects of the configuration process to enable handling of corner/edge cases. (Flexibility is an important part of Bcfg2′s design.)

Because Bcfg2 can capture the entire configuration of a system into a model you can diff the goals model (the desired state) and the current model and find out your degree of deviation, or you can diff two current models (Server A and Server B) and find out what’s different about their configuration.

Bcfg2 is very flexible – for example, you can designate a node as an exemplar, and the Bcfg2 server will copy it’s config to other nodes.

Bcfg2 is configuration “plumbing” (it just works). Here is how:

  1. Server probes client’s local state. (Client gets the probes from the server; client runs the probes; feeds data back to server.)
  2. Server builds configuration goals and sends them to the client.
  3. Client validates it’s local state and figures out what it has to do to meet the goals.
  4. Finally state information is sent back to the server and it is processed and can be reported.

Bcfg2 Policy: Install the Postfix Package

    <Group name='Mail-server'>
        <Package name='postfix'/>

Bcfg2 Policy: Install Multiple Packages

    <Group name='Web-server'>
        <Package name='apache2'/>
        <Package name='apache2-mod_php'/>
        <Package name='php5'/>

Bcfg2 Policy: Generate MOTD file using templating plug-in

Generate /etc/motd (message of the day) file that describes the system in terms of its Bcfg2 metadata and probe responses.

Here is the template (stored on the server):

 Hostname is ${metadata.hostname}

 {% for group in metadata.groups %}\
  * ${group}
 {% end %}\

 {% if metadata.categories %}\
 {% for category in metadata.categories %}\
  * ${category}
 {% end %}\
 {% end %}\

 {% if metadata.Probes %}\
 {% for probe, value in metadata.Probes.iteritems() %}\
  * ${probe} \
 {% end %}\
 {% end %}\

                        ITOPS MOTD
Please create a Ticket for any system level changes you need from IT.

This template gets the hostname, groups membership of the host, categories of the host (if any), and result of probes on the host (if any). The template formats this in with a header and footer that makes it visually more appealing.


One possible output of this template would be:

                     GOALS FOR SERVER MANAGED BY BCFG2
 Hostname is cobra.example.com

  * oracle-server
  * centos5-5.2
  * centos5
  * redhat
  * x86_64
  * sys-vmware

  * os-variant
  * os
  * database-server
  * os-version

  * arch    x86_64
  * network    intranet_network
  * diskspace    Filesystem            Size  Used Avail Use% Mounted on
                        18G  2.1G   15G  13% /
 /dev/sda1              99M   13M   82M  13% /boot
 tmpfs                 3.8G     0  3.8G   0% /dev/shm
                       1.5T  198M  1.5T   1% /mnt/san-oracle
  * virtual    vmware

                        IT MOTD
 Please create a Ticket for any system level changes you need from IT.

Reference: http://trac.mcs.anl.gov/projects/bcfg2/wiki/Plugins/TGenshi/examples/motd

Screenshots of Reporting System




Configuration Management Tips from the author of Bcfg2

Narayan pointed out configuration management can benefit from software engineering approaches:

  • Version control of configuration policy.
  • Testing and validation of changes to configuration policy.
  • Release management process for changes to configuration policy.

Narayan said, “It’s really hard to do roll backs due to lack of roll back support in package management systems”. His solution? The best way to roll back is a filesystem snapshot.

Next: Cfengine

Comments on "The State of Open Source System Automation"

Here is a superb Blog You may Uncover Interesting that we encourage you to visit.

We prefer to honor many other world wide web websites on the internet, even when they aren?t linked to us, by linking to them. Underneath are some webpages worth checking out.

nel club e solo la scrittura di una delle più grandi storie nella storia dello sport. è un onore entrare a far parte di questa storia di successo, e non vedo l’ora alla squadra la prossima stagione ancora più paura. ”maglia calcio outlet,nuove maglia calcio serie a,Maglia Barcelona 2017 vendita

Always a huge fan of linking to bloggers that I love but really don’t get a good deal of link adore from.

An outstanding share! I’ve just forwarded this onto a co-worker who has been doing a little research on this.
And he in fact bought me lunch simply because I discovered it for him…
lol. So let me reword this…. Thanks for the meal!!
But yeah, thanx for spending time to talk about this subject
here on your web page.

Very few websites that come about to become comprehensive beneath, from our point of view are undoubtedly nicely really worth checking out.

I simply want to mention I am very new to blogging and site-building and absolutely savored your blog. Probably I’m planning to bookmark your blog post . You certainly have outstanding stories. Regards for revealing your web-site.

There is an obvious but nonetheless deeply impacting
spiritual forged to the participate in of light in the darkish cave,
the miner’s helmet torches illuminating The 33 2015 full movie online free (Marylyn) skyscraper-measurement
rock that seemingly has sealed their destiny.

Here are some links to sites that we link to due to the fact we believe they’re really worth visiting.

Here are a number of the websites we suggest for our visitors.

I found your blog through google and I must say, this is probably one of the best well prepared articles I have come across in a long time. I have bookmarked your site for more posts.

We like to honor numerous other web web sites on the net, even when they aren?t linked to us, by linking to them. Underneath are some webpages really worth checking out.

Here are some links to web sites that we link to mainly because we consider they are worth visiting.

Here are a few of the web-sites we advocate for our visitors.

Below you will uncover the link to some web sites that we think you should visit.

The information mentioned within the post are several of the very best accessible.

He understands Shepherd’s script and achieves The 33 full movie (mybrewguru.com)
tone essential to make this an enduring movie fairly than a getaway throw-away.

Here are a few of the sites we advocate for our visitors.

Every after inside a though we opt for blogs that we read. Listed beneath would be the most recent internet sites that we decide on.

Leave a Reply