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:
In addition to the features we’ve already written about, we’ve made some
really great improvments to the output reported by chef-client
,
especially in the failure cases. Here’s a sample:
INFO: Processing execute[apt-get update] action run (apt::default line 20)
INFO: execute[apt-get update] sh(apt-get update)
INFO: execute[apt-get update] ran successfully
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:
knife search node 'network*:*134'
1 items found
Node Name: graphite-dev
Environment: _default
FQDN: graphite-dev.local
IP: 172.16.185.134
Run List: role[graphite]
Roles: graphite
Recipes graphite
Platform: ubuntu 10.04
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:
- Thom May, who provided an initial
implementation of environments; - Ryan Davis and Eric
Hodel for adding plugin support to knife; - Caleb Tennis for the initial implementation of the “wake
on USR1” feature; - Michael Leinartas for a patch to reverse the order in
which role attributes are applied for nested roles; - Doug MacEachern for adding Mac OS X server platform
support.
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 with
enforce_path_sanity false
in your config file. - Solr has been upgraded and the index schema has changed. You need to
reinstall chef-solr with thechef-solr-installer
command and then
rebuild your search index withknife 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 withchef-expander
- The command line options for some knife commands have been changed
to be more consistent with other commands. In particular,knife ec2
now uses
server create-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")
.
- The CentOS bootstrap script now installs Ruby 1.8.7 complements of
our friends at AegisCo
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.
Upgrading Chef Server
Complete upgrade instructions are available on the Chef
wiki.
If you originally installed Chef via rubygems (or the rubygems-based
bootstrap cookbooks), the upgrade process will be like this:
-
Install Gecode:
[sourcecode lang="bash"]
echo "deb http://apt.opscode.com/ `lsb_release -cs` main" | sudo tee /etc/apt/sources.list.d/opscode.list
wget -qO - http://apt.opscode.com/packages@opscode.com.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install libgecode-dev
[/sourcecode] -
Stop all Chef Server processes, including
chef-solr-indexer
and
chef-solr
. - Upgrade the gems:
(sudo) gem install chef-server
- Upgrade your solr installation:
(sudo) chef-solr-installer
- Start the Chef server processes. Keep in mind that
chef-solr-indexer
has been replaced withchef-expander
- Rebuild your search index:
knife index rebuild
Upgrading Chef Client
If you've installed chef-client
via rubygems, you simply need to
upgrade your gems:
(sudo) gem install chef
If you are running chef-client as a daemon, be sure to restart it.
If you have installed Chef via apt packages, keep an eye on this blog;
we'll update you as soon as the 0.10 packages are available.
Release Notes
Here's the complete list of patches applied to this release. Note that
the vast majority of these were backported to 0.9.14 and 0.9.16.
Bug
- [CHEF-1063] - yum query/yum-dump.py fails when a locally-compiled Python is in $PATH
- [CHEF-1074] - /etc/init.d/chef-solr on centos doesn't set pidfile correctly
- [CHEF-1129] - "knife cookbook upload" also bundles temporary files, could be avoided by a configurable parameter?
- [CHEF-1154] - marsal data too short errors from moneta
- [CHEF-1245] - Yum package provider fails poorly when it encounters unexpected output from yum-dump.py
- [CHEF-1276] - Apt package provider doesn't distinguish between installed and available versions in the debug messages
- [CHEF-1292] - JSON nesting error is not indicated in user interfaces
- [CHEF-1311] - Metadata generation should be deterministic
- [CHEF-1321] - deploy_revision resource has bad name
- [CHEF-1405] - extlib gem dependancy provides bugs in rails application
- [CHEF-1407] - changes in update-rc.d breaks Chef::Provider::Service::Debian
- [CHEF-1508] - nested roles and override_attributes
- [CHEF-1526] - knife cookbook site vendor gives no indication of unmet dependencies
- [CHEF-1562] - Knife should not issue warnings when successfully updating a role
- [CHEF-1583] - Chef Server API root page throw errors
- [CHEF-1584] - redhat init.d chef-client script does not write pidfile
- [CHEF-1587] - node.recipe? was removed, no easy way to check for included recipes
- [CHEF-1600] - rubygems provider should not force you to use rubygems.org as a gem source
- [CHEF-1612] - "knife cookbook upload" uploads .svn/* files
- [CHEF-1615] - Chef/Windows/Ruby 1.9.2 incompatibility
- [CHEF-1620] - fog is not listed as an dependency but is used by knife/tests - similar to net-ssh-multi
- [CHEF-1623] - knife bootstrap mentions [RUN LIST] in the banner, but its an option
- [CHEF-1628] - Inconsistent Documentation
- [CHEF-1633] - does not work on centos with python 2.6
- [CHEF-1634] - easy_install provider can't install some packages
- [CHEF-1635] - Debian/Ubuntu Chef package doesn't have a versioned dependency on rubygems
- [CHEF-1651] - archlinux bootstrap template needs base-devel
- [CHEF-1656] - The knife man page has no description of the -F/--format options
- [CHEF-1679] - Service provider on Windows does not acknowledge failure
- [CHEF-1682] - Knife fails with NameError (Fcntl::F_SETFD) when uploading a cookbook on Win32 build of Ruby 1.8.7
- [CHEF-1690] - Mac OS X Server platform provider support
- [CHEF-1691] - Javascript alert message when deleting a client is wrong
- [CHEF-1704] - knife uses deprecated fog class Fog::AWS::EC2
- [CHEF-1717] - knife cookbook show fails to display file / part contents
- [CHEF-1727] - knife using deprecated fog syntax as of fog 0.3.7
- [CHEF-1777] - chef-client logging to stdout doesn't sync buffer under runit
- [CHEF-1781] - IOError - closed stream in erl_call provider
- [CHEF-1794] - Cannot disable services on debian lenny
- [CHEF-1802] - chef server broken with rack-1.2.1
- [CHEF-1803] - file mode regex is overly restrictive
- [CHEF-1807] - run_interval functional test sometimes waits indefinitely for the child chef-client to exit
- [CHEF-1808] - RabbitMQ connection retry broken in multi-queue indexing
- [CHEF-1821] - Unable to knife search for negative queries
- [CHEF-1832] - knife status should handle a null ohai_time instead of failing noisily
- [CHEF-1834] - debian service provider cannot enable a disabled service
- [CHEF-1835] - run_interval feature test is unreliable as it depends on ps|grep for determining the chef-client child process
- [CHEF-1836] - knife cookbook purge fails if checksum documents are missing from couchdb
- [CHEF-1844] - A node's attributes says it is a kind_of? Hash, but does not support all Hash methods
- [CHEF-1845] - Git Provider fails when the directory you want to clone the repo to already exists
- [CHEF-1851] - Features tests will sometimes fail at beginning due to 412 from creating chef_integration; retrying solves it.
- [CHEF-1852] - Better error message when moving a temporary file to a directory that doesn't exist
- [CHEF-1853] - Debian init scripts for chef-client don't pass on $PIDFILE option
- [CHEF-1861] - chef-client hanged on windows after running around 100 times
- [CHEF-1864] - Feature tests for apt package provider failing
- [CHEF-1868] - Centos bootstrap template references non-existant URL for EPEL repo
- [CHEF-1878] - WebUIUser design documents are not created when running feature tests, making WebUI unusable
- [CHEF-1879] - Resource#inspect uses all available memory
- [CHEF-1904] - EPEL URL in centos knife configuration now 404
- [CHEF-1905] - Numeric#fdiv is not available on ruby 1.8.6
- [CHEF-1916] - chef_environment attribute cannot be displayed with knife node show
- [CHEF-1919] - knife bootstrap throws uninitialized constant Net::SSH (NameError)
- [CHEF-1924] - Possible Regression -- Cookbook Not Found errors not suggesting metadata as a possible cause
- [CHEF-1925] - Data Bag Item inspect is not verbose enough
- [CHEF-1926] - Git Provider has a confusing error message when accessing a non-existant repo over http(s)
- [CHEF-1930] - Subversion resource fails if the destination directory isn't already a working copy
- [CHEF-1931] - inconsistency specifying run list for knife ec2 server create and bootstrap
- [CHEF-1943] - 'knife bootstrap' broken on chef-0.9.12
- [CHEF-1954] - Shef in client mode reports that it's in solo mode
- [CHEF-1955] - Shef does not correctly configure Chef::Cookbook::FileVendor causing template and cookbook file resources to fail.
- [CHEF-1964] - archlinux-gems needs to preserve chef environment
- [CHEF-1988] - DataBagItem.load returns a Hash and not a DataBagItem
- [CHEF-1993] - Version (only latest) shouldn't be shown on the Cookbooks list page
- [CHEF-1994] - The notifies syntax introduced in 0.9.10 is not implemented for subscribes
- [CHEF-2000] - default group provider does not work on HP-UX
- [CHEF-2002] - subversion provider checkout action not idempotent
- [CHEF-2011] - Relative path to client_key not handled well
- [CHEF-2039] - Empty array should not be shown as a cookbook name in the cookbook version constraints picker on the environment create/edit form
- [CHEF-2043] - chef-solr-installer doesn't respect paths in /etc/chef/solr.rb
- [CHEF-2057] - Rename Chef::JSON to avoid conflict with ::JSON class
- [CHEF-2062] - yum provider claims to install nonexistent versions if specified
- [CHEF-2073] - knife cookbook create should use FileUtils.mkdir_p instead of shell_out to run mkdir -p
- [CHEF-2078] - 0.9.14.rc.1 - shef -z does not load run_list, contrary to behavior documented on wiki
- [CHEF-2080] - Shell_out should not set @cwd to Dir.tmpdir by default
- [CHEF-2081] - chef-0.9.14.rc.1 yum provider fails to correctly select packages when arch is provided
- [CHEF-2083] - 0.9.14.rc.1 - unexpected nil referring to prior revision in git provider called from deploy provider
- [CHEF-2084] - Roles create/edit form broken in the WebUI
- [CHEF-2090] - DSL methods need to check arguments. In particular, Language#data_bag_item
- [CHEF-2091] - spaces between items in the comma-separated run_list fails during knife bootstrap
- [CHEF-2092] - Deploy resource with SVN failing in Chef 0.9.14
- [CHEF-2102] - Need correct URI encoding and decoding of the query string for search
- [CHEF-2103] - Search result is incorrect with syntax (NOT...) AND ... and (NOT...) ...
- [CHEF-2122] - knife rackspace server create's bootstrap uses identity_file but there's no config option
- [CHEF-2124] - Knife should not load plugins from old gems
- [CHEF-2125] - Shef is broken
- [CHEF-2135] - cookbook_version.metadata and cookbook_version.manifest["metadata"] can be out of sync due to support for deprecated metadata syntax
- [CHEF-2142] - knife cookbook * -- uninitialized constant Chef::REST
- [CHEF-2143] - Search query transformation not handling wildcard character '?' properly
- [CHEF-2145] - Back compat for cookbooks api is broken
- [CHEF-2146] - "knife cookbook bulk delete .*" fails with 0.10.0 beta 2
- [CHEF-2147] - knife uninitialized constant Chef::DataBagItem
- [CHEF-2152] - knife cookbook site vendor -- uninitialized constant
- [CHEF-2153] - knife bootstrap -- uninitialized constant
- [CHEF-2154] - knife data bag from file -- uninitialized constant
- [CHEF-2155] - execute resource, creates attribute -- undefined method
- [CHEF-2162] - knife rackspace server create -- uninitialized constant
- [CHEF-2170] - remove retries for 403
- [CHEF-2174] - knife cookbook site share -- undefined method 'validate_cookbook'
- [CHEF-2175] - uninitialized constant Chef::Knife::Core::NodeFormattingOptions
- [CHEF-2176] - knife environment list `<class:Environment>': uninitialized constant Chef::Mixin::FromFile (NameError)
- [CHEF-2177] - knife cookbook site install -- undefined local variable or method `cookbook_path'
- [CHEF-2178] - When Chef 0.9.x is installed, attempting to load plugins that were formerly in core causes a load error
- [CHEF-2180] - knife ssh - NameError: uninitialized constant Chef::Knife::Ssh::Readline
- [CHEF-2181] - knife bootstrap - not showing colorized output
- [CHEF-2185] - enforce_path_sanity tries to modify frozen string (ENV["PATH"]) with "<<"
- [CHEF-2187] - friendly knife node show run list output isn't entirely friendly
- [CHEF-2188] - Knife cookbook upload fails when an environment is not specified
- [CHEF-2190] - Chef::Environment::Mash nameerror on knife environment create production
- [CHEF-2194] - knife-openstack doesn't deal with nil items in the image list
- [CHEF-2197] - knife ec2 server list fails with empty server.state
- [CHEF-2198] - Cookbook uploads broken
- [CHEF-2200] - CookbookVersionSelector loads all data for all cookbook versions in the system
- [CHEF-2203] - "knife role bulk delete .*" fails with 0.10.0 beta 8
- [CHEF-2206] - knife recipe list is broken
- [CHEF-2208] - inconsistent environment output with search, node list in 0.10.0.beta.8
- [CHEF-2209] - No need to dump the list of all dbs every time we create a design document
- [CHEF-2210] - Cookbook uploads should not rely on generating metadata.json
- [CHEF-2211] - Chef 0.10 and Ruby 1.8.6 issues
- [CHEF-2213] - features/support/env.rb requires spec/expectations which changed in rspec
- [CHEF-2214] - data_bag_item and data_bag DSL methods should continue to support the data bag name to be passed in using format :foo
- [CHEF-2217] - Knife should turn off colors on windows
- [CHEF-2219] - core bootstrap templates need to all support environments
- [CHEF-2223] - knife "Cannot find sub command for:" error should be more friendly
- [CHEF-2224] - Chef no longer saves the node before executing the resource collection
- [CHEF-2227] - chef-solr-indexer files in distro should be updated for chef-expander
- [CHEF-2228] - chef-expander daemon names are confusing
- [CHEF-2229] - chef-solr-installer fails to chown
- [CHEF-2230] - Environment search is broken in the WebUI.
- [CHEF-2231] - WebUI: Available recipes list in Node/Role creation/edit form should sort alphabetically
- [CHEF-2233] - Run list cannot be correctly specified with Windows client running knife ec2 server create
- [CHEF-2236] - run_context not propagated to GemPackage during deploy provider run
- [CHEF-2239] - knife ssh role:blah tmux fails with uninitialized constant Chef::Mixin::Command (NameError)
- [CHEF-2243] - knife index rebuild doesn't reindex environments
- [CHEF-2244] - data doesn't make it to solr when re-indexing data with chef-expander
- [CHEF-2254] - "Exception: NameError: uninitialized constant Chef::EncryptedDataBagItem" when creating an encrypted data bag item
- [CHEF-2257] - ubuntu apt bootstrap template can and should be generic and non version specific
- [CHEF-2258] - Chef::Handler::ErrorReport causes a deprecation volcano to erupt
- [CHEF-2262] - Solr Indexer: dies randomly every so often and doesn't properly restart on its own
- [CHEF-2265] - knife bootstrap fails with uninitialized constant Chef::Mixin::Command (NameError)
- [CHEF-2269] - knife cookbook list --show-all fails with 0.10.0 rc1
- [CHEF-2272] - yum-dump.py - commas are valid in package names
- [CHEF-2277] - Object#tap monkey patch not loaded
- [CHEF-2289] - EncryptedDataBagItem causes name error (missing require) when called from recipe code
- [CHEF-2290] - knife data bag * commands have non-standard underscore in argument names
- [CHEF-2295] - README.rdoc in Chef source is outdated
Improvement
- [CHEF-311] - yum provider - better cache refresh
- [CHEF-442] - Reclarify existing log messages levels, give more information in INFO mode.
- [CHEF-606] - Runner#run_action duplicates code from Resource#run_action
- [CHEF-1054] - Chef SOLR gem has an empty README.rdoc
- [CHEF-1287] - speed up yum provider
- [CHEF-1290] - Cookbook loading must support versioned dependencies
- [CHEF-1423] - Support versions of recipes on the run list
- [CHEF-1428] - Update to use rackspace cron-based execution of chef-client instead of ssh
- [CHEF-1445] - knife rackspace server creation should use bootstrap subcommand
- [CHEF-1446] - Improve error message for knife cookbook site vendor when working dir is not a git clone of chef-repo
- [CHEF-1540] - New rake tasks databag:upload[databag], databag:upload_all, databag:create[databag], databag:create_item[databag,item]
- [CHEF-1558] - knife rackspace command should be able to take and list flavors and distros instead of relying on numeric IDs
- [CHEF-1590] - Chef isn't compatible with Amazon's Virtual Private Cloud
- [CHEF-1647] - rake install should not only git pull, but also git submodule update
- [CHEF-1703] - Xenserver is not listed in platform
- [CHEF-1708] - Upgrade Solr to 1.4.1
- [CHEF-1763] - make knife ec2 support :region in config
- [CHEF-1765] - make knife ec2 support :availability_zone in config
- [CHEF-1767] - AIX group provider
- [CHEF-1769] - improve chef-solr startup detection in debian init script
- [CHEF-1800] - Color escape sequences do not work on Windows
- [CHEF-1833] - Not ignoring cookbook version constraints from dependency metadata when expanding cookbook dependencies
- [CHEF-1840] - Unclear message generated by chef-client when purging unused files
- [CHEF-1850] - In features couchdb replicate, change debug level of message about retrying of couchdb DB create
- [CHEF-1858] - Modify load path and use a standard require instead of path-based require in chef.gemspec
- [CHEF-1866] - @api_search features tests don't work
- [CHEF-1932] - Knife SSH macterm error prone
- [CHEF-1937] - Teach knife ssh tmux not to craete empty windows and to keep separate invocations in separate tmux sessions
- [CHEF-1990] - Ability to set initial EBS device size and boot from it
- [CHEF-1999] - Make Environments CRUD on the WebUI pretty and shippable
- [CHEF-2013] - Ability to specify the branch to merge back to when performing a knife cookbook vendor
- [CHEF-2022] - Remove Cookbooks and Nodes tabs under Environment in the WebUI
- [CHEF-2023] - Knife cookbook list should respect to the environment selected and show only the ones available in the selected environment.
- [CHEF-2028] - /cookbooks and /environment/:env_id/cookbooks should return data in consistent format and the returned data structure should be extensible
- [CHEF-2032] - Create a separate installer for chef-solr, and make the chef-solr executable responsible only for running solr.
- [CHEF-2033] - verbose logger
- [CHEF-2044] - Chef 0.10 server components should be easily installable via chef cookbook and chef-solo
- [CHEF-2111] - Replace per-cookbook ignores with per-repo ignores
- [CHEF-2126] - Don't show attributes the user shouldn't edit in knife node edit
- [CHEF-2130] - Chef should enforce a sane path setting
- [CHEF-2132] - Cookbook Uploads must check users' dependency syntax and help them update to the newer syntax
- [CHEF-2137] - extract class for knife subcommand loading
- [CHEF-2140] - Chef server should rescue search query parse errors and return 400 instead of 500
- [CHEF-2150] - Knife should not use log levels to control output verbosity
- [CHEF-2159] - Chef::REST should set a unique user agent for chef-client, knife, and webui
- [CHEF-2164] - Implement retries for 503
- [CHEF-2165] - Knife should hide stack traces when not running with max verbose
- [CHEF-2171] - colorize message tags in knife, create option for turning colors off, make interrupts quieter
- [CHEF-2172] - move non-subcommand classes from chef/knife/FOO into chef/knife/core/FOO
- [CHEF-2173] - Knife's default data output should be less noisy and verbose
- [CHEF-2183] - Environments need default and override attributes
- [CHEF-2184] - Scrub log output at INFO level
- [CHEF-2189] - Set arbitrary HTTP headers for Chef::Rest via config
- [CHEF-2191] - knife-openstack uses fog's deprecated #ip_address
- [CHEF-2193] - knife bootstrap - search for bootstrap templates in external knife plugins
- [CHEF-2195] - knife bootstrap scripts should install a specific version of chef
- [CHEF-2201] - Make man pages accessible via knife
- [CHEF-2225] - Cookbook deprecation feature and integration with knife
- [CHEF-2280] - general yum-dump.py improvements
- [CHEF-2281] - Pass in inflated object instead of raw data from client / webui when saving a data bag item
- [CHEF-2282] - Read chef-solo config file and JSON file location from environment
- [CHEF-2294] - centos5 bootstrap template should still install EPEL
New Feature
- [CHEF-1248] - Plugin System for Knife
- [CHEF-1319] - knife node tag (add|remove)
- [CHEF-1473] - Add ability for SIGUSR1 to wakeup the chef daemon and start a chef run
- [CHEF-1521] - enhance knife cloud functionality
- [CHEF-1715] - Add support for Blue Box Group Blocks
- [CHEF-1757] - create knife subcommands for OpenStack
- [CHEF-1818] - Unify cookbook version syntax and version contraints
- [CHEF-1938] - chef/distro boot scripts for archlinux
- [CHEF-1945] - Chef should support simple encrypted data bags
- [CHEF-2003] - chef-client should have an -E / --environment option that sets Chef::Config[:environment]
- [CHEF-2026] - specify other kinds of licenses with knife cookbook crate
- [CHEF-2042] - chef-solr-indexer is now chef-expander
- [CHEF-2049] - Add multiple cookbook version and environment filtering to cookbook list/show in webui
- [CHEF-2076] - RFE: option to prevent upload of a cookbook with the same version