Currently Being Moderated
sjvn01

Chef: Cooking up great cloud servers

Posted by sjvn01 in CIO Engage on Aug 1, 2013 8:45:07 AM

chef-logo.pngIf you really want to make the most of a cloud, you need cloud configuration management software such as PuppetAnsible, or Chef. With these, instead of your system operators sweating over management programs meant for single, standalone servers, they can spin off dozens or hundreds of server instances in less time than it will take you to read this article.


I've already talked about Puppet, perhaps the most popular of these development/operators (DevOps) tools. Chef may not have quite as many fans, but with companies such as Facebook, Ancestry.com, and big data powerhouse Splunk using it, by anyone's reckoning, Chef is is a serious DevOps program.


Opscode is Chef's parent company. Chef itself is an open-source cloud configuration management tool. You use to install, maintain, and manage cloud server instances.

 

Chef, which typically runs on Linux, is written in Ruby and Erlang, a real-time programming language.

 

Usually, you'd run Chef in a client-server mode. The other mode, Chef-Solo, can be run on a single node, but with its limited functionality it's best used only on standalone servers rather than in cloud deployments.

 

Like many open-source programs, Chef is available in three versions. These are: Open Source Chef, Hosted Chef and Private Chef.  Open Source Chef is the free open-source version. With it, your only support will come from the Chef community. With an expert IT staff, that may be all you need.

 

If you want more help, Hosted Chef is a fully managed and scaled Opscode Chef server. This uses a service model. You can use Hosted Chef with a monthly subscription fee. It comes with standard or premium support. Finally, Private Chef is an on-site Chef server available through subscription pricing or perpetual license plans.

 

All that out of the way, here's how Chef works. In Chef, the fundamental unit of configuration and policy distribution is a cookbook. According to Opscode:


Each of these defines a scenario, such as everything needed to install and configure MySQL, and then it contains all of the components that are required to support that scenario, including:
  • Attribute values that are set on nodes
  • Definitions that allow the creation of reusable collections of resources
  • File distributions
  • Libraries that extend Chef and/or provide helpers to Ruby code
  • Recipes that specify which resources to manage and the order in which those resources will be applied
  • Custom resources and providers
  • Templates
  • Metadata about recipes (including dependencies), version constraints, supported platforms, and so on

 

A recipe is a program written in a subset of Ruby that defines a server's fundamental configuration. Attributes are then used to define node/client-specific settings to customize the recipe for client or group of clients. Yes, that's right, when push comes to shove, to customize Chef cookbooks for your particular cloud servers you need to know how to program in Ruby.

 

That's fine, if you're an experienced Ruby or Ruby on Rails developer, but someone who cut their teeth on system administration might be comfortable with Puppet's model methods.

 

Of course, there are already many Chef cookbooks ready for you to use on GitHub. These can be used to set up Web servers, application servers, database servers and dozens of other servers.  With these, you'll be able to set up from a handful of server instances to thousands of them. To season them to taste, though, you'll need to pick up Ruby.

 

If learning either Chef or Puppet sounds like too much trouble, let me ask you if you're really willing to deploy dozens to thousands of servers with their associated patches, security holes, and updates? By the time you'd be done rewriting your old server scripts to deal with a cloud's level of administrative work, you'll find that you're reinvented one of these or one of the many other DevOps programs.

 

That may be fine... if your job is developing cloud management systems. If, as more likely, your job is exporting and maintaining your servers to a cloud, you have better things to do and you should consider using one of these DevOps programs.

 

So, which is better, Puppet or Ruby? This, like the eternal war between vi and EMACS, is endlessly debated. The best answer is to try both and see which one works best for you and your team.

 

Besides the free open-source version, you can start with up to five nodes of Chef using either the Hosted or Private versions. 20 nodes of Chef will run you $120 per month; 50 nodes cost $300; and 100 will cost you $600 a month.

Comments

Filter Blog

By author:
By date:
By tag: