A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.
Clone or download
Pull request Compare This branch is 16772 commits behind chef:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.




Chef is a system integration framework designed to bring the benefits of configuration management to your entire infrastructure.

The Chef Wiki is the definitive source of user documentation.

This README focuses on developers who want to modify Chef source code. For users who just want to run the latest and greatest Chef development version in their environment, see:


Before working on the code, if you plan to contribute your changes, you need to read the Opscode Contributing document.

You will also need to set up the repository with the appropriate branches. We document the process on the Chef Wiki.

Once your repository is set up, you can start working on the code. We do use BDD/TDD with RSpec and Cucumber, so you'll need to get a development environment running.


Chef has two kinds of code testing:

  • Unit Tests (rspec)

  • Integration Tests (cucumber)

We're going to set up the local environment in two phases, one for each of these.

Unit Tests (rspec):

We use Rspec to test that the code does what it is supposed to (unit tests).

Non-Ruby software:

  • Gecode (version 3.5.0)

Gecode is available on Mac OS X from homebrew, for Ubuntu/Debian from apt.opscode.com, or can be compiled from source.

Install the Chef Gems from source in this repository.

rake install

Install the following RubyGems:

  • rake

  • rspec (2.8.0)

  • dep_selector (requires Gecode to compile native extensions)

Run rake or rake spec:

rake spec
Finished in 17.42 seconds
3823 examples, 0 failures, 3 pending

Integration Tests (cucumber):

The integration tests require some additional software on top of what was installed for the unit tests. Most of the integration tests are for testing the Chef Server API interactions, so a Chef Server environment needs to be installed.

Non-Ruby software:

  • Java

  • CouchDB (0.10+)

  • RabbitMQ (1.7.2+)

These are available in most common distribution packaging systems, including Debian 6.0+ and Ubuntu 10.04+. Java is installed on Mac OS X by default; CouchDB and RabbitMQ are available in homebrew.

Make sure the RubyGems for the Chef Server are installed (should be from the +rake install+ earlier):

  • chef-expander

  • chef-server

  • chef-server-api

  • chef-server-webui

  • chef-solr

Starting the Environment:

Once everything is installed, run the dev:features rake task. Since the features do integration testing, root access may be required.

(sudo) rake dev:features

This rake task will do the following:

  • Start CouchDB, running on port 5984

  • Start and configure RabbitMQ for Chef, running on port 5672

  • Install Chef SOLR data and start chef-solr, running on port 8983

  • Start chef-server-api on port 4000

  • Start chef-server-webui on port 4001

  • Start chef-expander, the clustered search index broker

You'll want to leave this terminal running the dev environment.

Web Interface:

With the dev environment running, you can now access the web interface via localhost:4000/. The default login is admin / p@ssw0rd1.

Integration testing:

We test integration with Cucumber. Normally, you'll just run:

rake features

In a second terminal, to run all the feature tests. Other feature tests are available as well, see:

rake -T | grep Cucumber

There are over 60 different sets of features that can be tested.






Chef - A configuration management system


Adam Jacob (<adam@opscode.com>)


Copyright © 2008-2012 Opscode, Inc.


Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.