How do I get started with Chef?

The chef documentation is pretty bad. And Google isn't helping me.

Can anyone point me at a decent article or something that would help me get started?

My specific issues are:

  • How do I get a client to read my configuration? chef-solo seems like the best start (I don't want to run an OpenID server or Merb)
  • How do I configure Apache to serve Django? I already know how to do this via regular server configuration, but I figure an example Chef recipe would be a good start;

Updates

  • Chef version is 0.10.8
  • The Chef Wiki has gone through a lot of revision since this was originally asked.
  • The Opscode Platform is now called Opscode Hosted Chef
  • Chef will soon be distributed as a full-stack installation, in addition to RubyGems and Debian packages.
  • Vagrant is a great way to get started using Chef.

Original response follows

First, as of this writing, the latest version of Chef is 0.9.8. Opscode distributes Chef as RubyGems, and has up-to-date Debian/Ubuntu packages as well. RPMs for the latest version are released by a member of the community.

Second, in versions 0.8.x+ and higher, OpenID is no longer required for authentication. Merb is required for the Server because it is a Merb web application.

Opscode hosts a Chef Server as a Service called The Opscode Platform. You can signup and get started. It is free during the "feature beta", and once it leaves beta it is free for up to 5 nodes. If you sign up there's a getting started guide on Opscode's help site.

Overview of getting started:

  • Get Chef installed. The easiest way to do this is to run an Ubuntu 10.04 system, either in a VM or on EC2, etc. The first step is to get Ruby installed, then install Chef itself.
  • Set up the local user environment to communicate with the Opscode Platform, or your own Chef Server. You can set up your own server by using Opscode's Chef bootstrap configuration for RubyGems.
  • Set up a Chef Repository to store your cookbooks and other infrastructure configuration.
  • Download cookbooks you want to use into the 'cookbooks' directory in the repository.
  • Upload cookbooks to the Chef Server, add the recipes to the run list of a node and watch it get configured.

As for Django and Apache2:

  • Apache2 cookbook
  • Python cookbook

You'll need to write one that deploys your Django application code. The Apache2 cookbook contains a Definition to help set up a virtual host for web applications.

You can help improve the documentation by submitting a ticket in the "Documentation" component of the Chef project. If you have trouble with the Open Source Chef Server, the best places to ask for help are the Chef Mailing List, or the #chef IRC channel on FreeNode. If you sign up for the Platform you have access to the help site to submit support requests.

Disclosure: I work for Opscode.


Late, but: http://ericholscher.com/blog/2010/nov/8/building-django-app-server-chef/

When I started looking at Chef, I found it incredibly complex and lacking in fundamental documentation. This is going to be my experience understanding Chef while setting up a single server. This strategy can be used across multiple servers, with a little tweaking.