Opscode
Home     Cookbooks     Blog     GitHub     Tickets 

Preparing Debian and Ubuntu for RubyGems

These instructions describe how to get your Debian or Ubuntu system prepared to install Chef from RubyGems. The following versions of Debian and Ubuntu are known to work quite well with Chef's gems when using these procedures.

  • Debian 5 (lenny, squeeze, sid)
  • Ubuntu 6.06 (dapper LTS, see notes below)
  • Ubuntu 8.04 (hardy LTS, see notes below)
  • Ubuntu 8.10 (intrepid)
  • Ubuntu 9.04 (jaunty)
  • Ubuntu 9.10 (karmic)
Debian Sid

Due to its nature, sid (Debian unstable) should not be used in production environments. Chef should work fine on this release, but other parts of the distribution may be unstable causing what appear to be bugs in Chef. It is perfectly suited for testing purposes, though. Please file tickets with the Debian BTS for issues with the distribution, and with the Chef Project for issues in Chef itself.

Install Ruby and Development Tools


Install Ruby and some development tools.

Install Ruby

We need build-essential for compiling native extensions for some RubyGems. We need wget to retrieve the RubyGems sources. The ssl-cert package provides a handy way to make self-signed certificates.

Enable Repo for Java Installation


The Chef Server utilizes SOLR for the search engine, which requires Java. In order to install Java with the bootstrap cookbook, you need to enable the multiverse or non-free repository, depending if you're running Ubuntu or Debian.

This is only required on the Chef Server.

Install RubyGems from Source


We prefer to install RubyGems from source rather than use the OS-provided version (if any), as it is cross platform, so we know what to expect.

Install RubyGems

For Debian and Ubuntu users, see the Debian Position on RubyGems. If you prefer to install Chef from APT packages, you can use the Opscode APT repository to install Chef on Debian or Ubuntu with APT.

$PATH Issues

If you use an OS-provided RubyGems package instead of installing from source, you may need to add the path where it puts RubyGem-installed programs to your system's PATH, otherwise Chef may not start/work properly. If you're not sure what path to add, check gem env for "EXECUTABLE DIRECTORY".

Configure Gem Sources


The Opscode Gem releases are available via RubyGems. As of RubyGems 1.3.6, this is the default source and you don't need to do anything. If you're running an older version, the default source is http://gems.rubyforge.org/; it has been changed by the Ruby community to point to rubygems.org for the foreseeable future and you don't need to do anything. However, it is probably a good idea to make sure that your sources are updated:

Install Chef Gem


Now we'll install the Chef RubyGem. This also installs Chef's dependencies.

Install Chef

Set up Chef


Now that you have Chef installed, you're ready to bootstrap Chef.

If you are setting up a Chef Server on Ubuntu 8.04 Hardy, read on for notes before proceeding to bootstrap configuration of Chef.

Ubuntu 6.06 Dapper Notes


Ubuntu 6.06 Dapper contains Ruby 1.8.4, which is too old to support Chef. A newer Ruby must be installed from PPA:

Install Ruby

This solution may also work for Ubuntu Edgy, Feisty, and Gutsy, but has not yet been tested.

Ubuntu 8.04 Hardy Notes


Ubuntu 8.04 (hardy) does not include a CouchDB package. This is required for the Chef server, so if you're running your Chef server on Hardy, you'll need to get CouchDB installed separately from source. For versions prior to Chef 0.8.x, we recommended installing CouchDB 0.8, but that version no longer works with the Chef Server. If you would like to continue running Chef Server on a Ubuntu 8.04 system, you will need to install CouchDB, Erlang and related dependencies from source manually before installing or upgrading the Chef Server v0.8.x.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Copyright © 2009 Opscode, Inc. All Rights Reserved.