15

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;
Brad Wright
  • 261
  • 2
  • 6

2 Answers2

19

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:

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.

jtimberman
  • 7,511
  • 2
  • 33
  • 42
  • The packaging for Ubuntu 9.10 is broken at the moment which is disappointing with the official line from opscode seeming to be "Why aren't you running lucid?" :( http://lists.opscode.com/sympa/arc/chef/2010-07/msg00221.html – Philip Reynolds Jul 26 '10 at 11:32
  • 2
    The official line from Opscode is that we haven't backported all the packages required to get the Chef Server to install on Karmic due to resource constraints. Lucid works fine and is considered supported, Karmic is not. We may support Karmic in the future. – jtimberman Jul 27 '10 at 15:13
  • If you want to try out chef with local VMs I can recommend [Vagrant](http://vagrantup.com/). It manages VirtualBox VMs and integrates with chef. – Lethargy Feb 03 '12 at 13:48
  • Also be sure to checkout our #learnchef campaign https://learnchef.com – sethvargo Feb 25 '13 at 19:34
6

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.

Jeff Atwood
  • 12,994
  • 20
  • 74
  • 92
Steve Eley
  • 61
  • 1
  • 1