Chef Blogs

New APT Repository for Chef 0.9

Joshua Timberman | Posted on

We are pleased to announce that the updated Debian/Ubuntu packages of Chef 0.9 have been posted to the new apt.opscode.com repository!

Please be aware of the following changes in the packaging if you’re using the older 0.7 packages from Ubuntu 9.10/10.04 or the old apt.opscode.com.

  • chef-server-slices is deprecated, and split into chef-server-api and chef-server-webui.
  • chef-server-webui is now optional and not installed by default with chef-server.
  • chef-indexer is deprecated and replaced by chef-solr.
  • Server related packages create the “chef” system user and group.
  • The chef-server (API), chef-server-webui, chef-solr and chef-solr-indexer daemons run as chef user and group.
  • Daemon init scripts are configured with /etc/default/chef* for log, config, user and other information.
  • The chef-server-webui daemon process now runs on port 4040 by default.
  • The webui no longer uses OpenID by default for login. Debconf will prompt for the “admin” password. Once you log in, change the password and you can assign an OpenID.
  • Registrations are now called clients.
  • Clients are validated with a certificate, /etc/chef/validation.pem. This is created when chef-server starts. Clients are no longer validated through the webui. See Authentication.

Distributions

Packages are available for the following Debian and Ubuntu distributions:

  • Debian 5.0 (Lenny)
  • Debian Testing (Squeeze)
  • Debian Unstable (Sid)
  • Ubuntu 10.04 (Lucid Lynx, LTS)
  • Ubuntu 9.10 (Karmic Koala)
  • Ubuntu 9.04 (Jaunty Jackalope)
  • Ubuntu 8.10 (Intrepid Ibex)
  • Ubuntu 8.04 (Hardy Heron LTS)

The Chef client packages (chef, libchef-ruby) are available for all the above. The Chef server packages (chef-server, chef-server-api, chef-server-webui, chef-solr) are only tested and supported for Debian Unstable and Testing, and Ubuntu 10.04. This is because Chef server requires CouchDB 0.9.1 or higher, and this version is not available in the older releases. Also, the Chef SOLR search engine requires the Debian packaged version of SOLR and Jetty, and the older releases do not have a recent enough version for Chef SOLR. At some point we may update the repository with backports for older versions, but we recommend Ubuntu 10.04 as it is an LTS release.

The source package for Chef is available for any of these releases.

Apt Pinning

If you are not ready to upgrade to the 0.9 release of Chef, you should pin your packaging in the APT preferences.

cat /etc/apt/preferences
Package: *chef*
Pin: version 0.7*
Pin-Priority: 1001

You can also use dpkg to hold package versions. For more information see the Chef Wiki page on preparing to upgrade.

Installing

Once you’re ready to install or upgrade, add the Opscode repository to your system’s sources. The component for all releases in the new APT repo is “main”. In the previous repo, this was “universe” for Ubuntu. This is to make the setting consistent.

deb http://apt.opscode.com/ <release> main

Replace release with the distribution codename for your release. For example on Ubuntu 10.04, use “lucid”:

deb http://apt.opscode.com/ lucid main

If you would like to be able to download source packages, add a similar line for “deb-src”. Once the sources list is updated, retrieve the Opscode Package GPG key and add it to the APT keychain.

wget -O- http://apt.opscode.com/packages@opscode.com.gpg.key | sudo apt-key add -

To install Chef as a client, simply install the “chef” package.

sudo apt-get install chef

This will prompt for the Chef Server URL via Debconf. This value can be preseeded for automated installations, see below. If you are using the Opscode Platform as your server, you will also need to set the validation client name that matches your organization. Prompting for this is not yet handled by debconf in the package.

echo "validation_client_name 'ORGNAME-validator'" | sudo tee -a /etc/chef/client.rb

In Chef 0.9, the “chef-server” package is a meta-package that installs both the API and the WebUI. The server doesn’t require running a Chef Client, so the “chef” package itself is optional.

sudo apt-get install chef-server
sudo apt-get install chef-server chef

Since the WebUI is optional as of Chef version 0.8 and higher, you can specify just the “chef-server-api” package, and the WebUI will not be installed.

sudo apt-get install chef-server-api chef

Optional Components for Knife

Knife includes some optional sub-commands that require additional Ruby libraries. These libraries are not available yet in Debian or Ubuntu, but are on the Opscode APT repo.

  • libfog-ruby – ec2, rackspace and terremark sub-commands.
  • libnet-ssh-multi – ssh sub-command.

Upgrading

If you are upgrading Chef from 0.7.x packages, unpin the packages and simply perform an apt-get upgrade.

sudo apt-get upgrade

The deprecated packages might not be removed, if not, apt-get autoremove should take care of “chef-server-slice” and “chef-indexer”.

Note that the webui won’t be installed by default. If you are Debian Stable (5.0, lenny), or Ubuntu 9.04 and older, the Chef Server is not supported because the CouchDB and SOLR versions are not recent enough to be compatible with Chef.

If you were using the development packages from Joshua Timberman’s Ubuntu PPA for 0.8.x, you can upgrade directly to 0.9.

RubyGems

Since Chef includes support for installing Gems via the “gem_package” resource, we depend on it. The packaged RubyGems is sufficient for the provider. If you wish to install RubyGems from source, you should make sure it is not installed over the top of the packaged version. Also, the Chef Server requires RubyGems due to the plugin feature utilized by Merb.

Resource Provider Packages

The Chef packages do not install the following packages for resource providers. The following packages may be desirable for using the providers. These can be installed via a package resource in a Chef cookbook recipe before using the resource.

  • git-core – git provider of the “scm” resource.
  • subversion – svn provider of the “scm” resource.
  • mdadm – managing “mdadm” resource.
  • libshadow-ruby – managing passwords in “user” resource.
  • upstart – upstart service provider.

Preseeding Chef Packages

The following settings are available to preseed package installations for non-interactive installations.

  • chef/chef_server_url – the URI for the Chef Server.
  • chef-solr/amqp_password – password for chef vhost in RabbitMQ.
  • chef-server-webui/admin_password – password for “admin” user in Chef Server WebUI, must be 6 characters.

Preseed settings can be specified with debconf-set-selections.

Reporting Issues

As with other Opscode Open Source projects, please report issues on our JIRA Ticketing system. Create new tickets in the CHEF project with the Packaging component. If you would like to contribute to the packages, please see our Contributing wiki page.