Configuration Management for Web Application Hardware
When you’re looking to manage the configuration of your server, there are a couple of options that are worth your time investigating - Puppet Labs’ Puppet and Opscode’s Chef. There are pros and cons to both of them and we’ll take a quick look at both tools here to help you better understand the benefits.
Puppet Labs – Puppet
Puppet from Puppet Labs is a well-established configuration tool. It works by enabling automation that assists in the lifecycle management of your server infrastructure. It allows you to keep track of all aspects of provisioning, configuration, managing patches and compliance. The idea is that you automate the tedious tasks that you would otherwise do by hand and rapidly reduce the deployment time for application releases. It also gives you real options to rapidly scale your servers from small clusters to thousands either on site or via the cloud.
Puppet Labs’ Puppet works using a declarative methodology. Using Puppet Labs – Puppet’s own configuration language, you begin by defining the ideal state of your server infrastructure. You can then work through simulations of any changes prior to deployment, allowing you to tweak your configuration on the fly. Once you’re good to go you can then quickly deploy and enforce your configuration and ensure that any drift from the ideal state is monitored. The outcome of that can then be reported on so that you can continue to work towards enforcing the ideal state on your infrastructure.
To help support you with this, Puppet Labs’ Puppet offers a wide range of pre-constructed modules for component configuration. They’re available for download in their marketplace. That means for many server deployments there’s no need to do much coding but for more complex tasks it’s essential to get a handle on Puppet’s own configuration language. That’s one of the areas in which a devops (development and operations) team can really assist with and that means your development team can continue to concentrate on their areas of strength rather than learning another language.
Puppet Labs’ Puppet is a great automation solution for server configuration. It’s well-established and has a track record of delivering the goods. The only drawback is that it requires a good level of understanding of its specific language.
Opscode – Chef
Chef from Opscode is the new kid on the block when compared to Puppet. Essentially it’s a reaction to the constraints of having to learn a new language just for server configuration. It’s an open source project that was started by a bunch of disgruntled Puppet users. Opscode wanted Chef to deliver a similar level of configuration automation but instead of having to learn a new language they wanted to deliver their instruction set directly using Ruby.
Opscode’s Chef works in a similar way to Puppet though the terminology takes on a certain culinary flavor. You create a “recipe” to determine the ideal level of server configuration. Essentially a “recipe” describes the correct state for a series of resources, for instance which packages should be installed, what services should be active, and any files that need to be created.
Once these recipes are implemented, you can sit back and let Opscode’s Chef monitor your hardware configuration. In load balancing exercises you can simply interrogate Chef to find out what the state of play is and allow it to enforce the rules you want. That cuts down on the need to manually reconfigure the resources on the system. The API also allows you to take data classes from a variety of sources and then reuse that data at the touch of a button.
As with Puppet, Opscode’s Chef supports both onsite server approaches and cloud approaches. There’s in built support for EC2 and Rackspace.
You’ll also find that Opscode’s Chef has a reasonable selection of “off-the-shelf” configuration options. It’s not quite up there with Puppet’s 600+ but there are 250 downloadable “cookbooks” for you to take advantage of.
A solid devops team will help you walk through the more finite differences between Opscode’s Chef and Puppet Labs’ Puppet. If you’re looking for a well-established solution with a long track record of delivering automated server configuration solutions, then Puppet Labs’ Puppet is a very strong choice. However, it comes with the disadvantage of requiring another language in your team’s skillset. Opscode’s Chef is definitely making up for lost time and if you’d prefer to keep working with Ruby and don’t mind trading off a little more development time for your server configuration in exchange – bottom line, it’s a great choice too.