Cattle and Pets: The Need for Configuration Management

In my last post I discussed how Adaptive Computing leverages OpenStack to empower developers by creating an internal tool called Builder. Builder has been enabling the creation of our software stack for almost a year now; to date we have seen Builder utilized to install just over 4500 instances. This has equated to countless hours of developers time saved. At the heart of all this effort, tooling, and automation lies configuration management. Adaptive Computing leverages Puppet to help us bring a newly installed Adaptive stack into compliance with a desired configuration in just minutes. In short, configuration management drives our success.

Cattle and Petes

Image via

As compute resources have become increasingly available—think almost endless compute available via Amazon AWS or Google Cloud Compute—the comparison of these resources have been referred to as cattle, and any type of local compute resource is being compared to pets. Typically you name your pets and you number your cattle, this becomes clear as you examine almost any type of infrastructure. Look at your server names; do you see servers called “Bumblebee” or “Optimus?” If the answer were yes, I would argue your servers are your pets and you are treating them as such. I would also wager that the routine tasks that your servers need (package installs, disk space management, configuration files) are being manually managed as well. Further, if one of these “pet” servers were to die or perform at lower than expected levels, serious ramifications could be felt in your infrastructure.

When was the last time you visited a dairy cattle farm? Often cattle are simply tagged with a number. Many of the processes that are required to keep cattle alive and productive have become fully automated. If one falls ill or becomes less productive it’s replaced… all while overall milk production is hardly impacted. The sheer number of cattle producing milk help to shield the loss of a few cows here and there and ensure the real deliverable and business value continues uninterrupted. All of this drives the point that your infrastructure needs to be configured as code. Servers need to have their configuration encapsulated into automation practices that allow failures to have limited impact upon your organization.

It’s important to begin a transition of thinking, moving away from viewing your infrastructure and resources as pets. Nobody wants to think about who is going to feed Fluffy when you head out of town, nor do you want to worry about Fido chewing your couch when you’re not looking. Once you capture your configuration and enable it’s deployment via automation you then starting treating your infrastructure like cattle. Once you shift your thinking you can start observing the value of cattle. Now that your resources are in a configuration management engine your risks are mitigated. If a machine starts to have problems just get rid of it, spin up a new one, deploy its configuration, and off it goes. With herds of these resources powering your application or service, you mitigate your risk and ensure success of your service or application.

In summary, great value lies in configuration management. I would endeavor to suggest however that a migration in thinking is crucial to fully utilize tools of this nature. Once the fundamental shift in thinking has taken place I think you will see dramatic improvement in the repeatability of your infrastructure.

Disclaimer: Adaptive Computing heavily utilizes Puppet, our configuration management tool of choice. Similar tools include Salt and Chef, and each has a similar domain specific language. Any of these tools can be used to propel your infrastructure as code objectives.

Facebook Twitter Email