Chef 0.10.0 Released!

﻿After a lengthy testing process, we’re very proud to announce that Chef
0.10.0 is officially released. Chef 0.10 is a huge step forward,
improving many aspects of the Chef experience. We’ve already previewed
many of the new features in this release:

Additionally, when output is to a terminal, you will see the output of execute
and script resources live as the command is executed—great for
long-running commands like bundle install or compiling packages.

This release also features a completely rewritten search back-end. The
new architecture is much more performant and stable than the old one.
We’re planning to write a geeky article to explain the new design, but
there are a few user-facing changes you need to be aware of: First, you
may now use wild cards within a search key, and the beginning of a
search term. For example, you can search for a host where any interface
ends with 134 like this:

Unfortunately, the changes to the Solr schema make it impossible for
Solr to sort your results on a given field. If any of your recipes rely
on setting the sort option to a search call, you’ll need to adjust
your code to sort the results on the client side.

Finally, the daemon that reads objects from the queue, denormalizes
them, and inserts them into Solr’s index is now chef-expander.chef-expander replaces chef-solr-indexer.

Thanks

We always make an effort to thank those who test our beta and RC
releases, but we don’t always name names. This time around, however,
we’re naming Grace Mollison(also
here) and Darrin
Eden our co-MVPs for testing the betas from the
very beginning and reporting a ton of bugs. We would also like to thank:

Breaking Changes in this Release

While we strive to make upgrades as seamless as possible, we also take
the opportunity in major releases to change behavior when we believe it
will make a long term improvement in Chef. Here’s a quick rundown of the
changes that could potentially break existing cookbooks or scripts:

Metadata dependencies are now respected: previously, only the names
of the cookbooks were used to calculate dependencies. Chef Server
now will respect version constraints in dependencies as well.
Be sure to take a look at your cookbooks to see if you have any
stale dependency version constraints; specifying a non-existant
version will cause any clients that use that cookbook to fail.

The greater than and less than operators in metadata version
constraints have changed; ‘>‘ and ‘<‘ are now the correct operators.

The order in which nested roles apply attributes is reversed. The
topmost role’s attributes will now “win” over the roles it includes.

Chef client now enforces “PATH
sanity”
by default. If you don’t want this, you can turn it off withenforce_path_sanity false in your config file.

Solr has been upgraded and the index schema has changed. You need to
reinstall chef-solr with the chef-solr-installer command and then
rebuild your search index with knife index rebuild after upgrading
(see below).

As mentioned above, the sort parameter to search calls will not
work in Chef 0.10. Sort the results on the client.

Chef used to create keys in the search index with intermediate
values replaced with an ‘X‘ as a wildcarding mechanism. These are
no longer available; use ‘*‘ as a wildcard instead.

chef-solr-indexer has been replaced with chef-expander

The command line options for some knife commands have been changed
to be more consistent with other commands. In particular, knife ec2
server create now uses -i to specify the ssh key, and -I to specify
the AMI to boot.

Knife now defaults to a more human-friendly output instead of JSON.
Use the -Fj option to get the JSON output.

The deploy resource has had an inconsistency in the notifications addressed, and now has the revision provider able to be idempotent if you specify an exact revision to deploy. This allows you to set the provider to track a particular branch within your SCM – resulting in your deployment getting updated the next time chef runs after pushing to that branch. This breaks previous uses of the deploy_revision provider, as it now must have a resource subscribe to it: subscribe :run, resources(:deploy_revision => "snakes").

How to Upgrade

The 0.10 Chef Server is compatible with 0.9.x Chef clients, so the basic
upgrade strategy is to upgrade the server first, and then upgrade the
clients as time and testing allows. Of course, you already know you
should make a backup before upgrading.

If you're using the Opscode
Platform, your server has
already been upgraded, so you may simply update your clients at your
leisure.