Skip to content
/ chef Public
forked from chef/chef

A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.

License

Notifications You must be signed in to change notification settings

aglarond/chef

 
 

Repository files navigation

DESCRIPTION:

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:

DEVELOPMENT:

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.

ENVIRONMENT:

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.5.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.

LINKS:

Source:

Tickets/Issues:

Documentation:

LICENSE:

Chef - A configuration management system

Author

Adam Jacob (<[email protected]>)

Copyright

Copyright © 2008-2011 Opscode, Inc.

License

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

http://www.apache.org/licenses/LICENSE-2.0

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.

About

A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 96.9%
  • JavaScript 2.4%
  • Other 0.7%