Chef Blogs

Chef 0.7.0 Release

Adam Jacob | Posted on | release | Releases

Chef 0.7.0 is hot off the presses, and it brings several great new features along with the traditional heap of improvements and bug fixes. This is a big release, and the first since we released Chef back in January that hasn’t been backwards compatible. Take a second and let that soak in – when you upgrade to 0.7.0, you’ll have a bit of work to do: specifically, add metadata to your Cookbooks and make sure you update both the clients and the server.

So what’s the new hotness that caused a break in backwards compatability, you ask? Several things:

  • Role Support: Chef now supports the concept of a ‘role’, which makes it easier to apply complex configurations to your servers. Check out the video of configuring roles through the web UI!
  • Refined Cookbook Distribution via Metadata: You now need to supply ‘metadata’ about your cookbooks – in particular, what other cookbooks they depend upon. This feature is the first step in getting to the stage where we can start providing more complex user interfaces on top of Chef, and a foundation for automated cookbook distribution and discovery.
  • The Chef Server UI now requires authentication everywhere.

Fear not, though – just follow the upgrade instructions and you’ll be good to go.

If you are new to Chef, it’s a great time to be joining our burgeoning community – head on over to the wiki for the install instructions.

But enough with the pre-amble – there is a main event to be had here, and that is the announcement of the Chef 0.7.0 MVP. We have contributions from 9 different people in this release, and many others helped out by filing tickets and testing the fixes. One man, however, stood up and earned himself the MVP… and with it a nickname. That man is Matthew Kent, who closed 13 tickets for this release – more than anyone else (including me, and anyone else paid to work on Chef.) His performance during this release was like Lebron James almost getting the 50 point triple double – it firmly establishes him as a mainstay and rock-star in the Chef community. Matthew ‘Lebron’ Kent, we salute you. For this release, Matthew (er, Lebron):

  • Fixed compatibility issues with Ruby 1.8.5
  • Added syntax checking for templates into the ‘rake install’ process for Chef Repositories
  • Fixed up the Red Hat Service Provider to properly leverage ‘chkconfig’
  • Eradicated the bug which was causing errant log-file truncation
  • Reported and fixed an issue where some recipes could still be evaluated twice
  • Drastically improved how the User providers manage home directories
  • Numerous fixes to the Yum provider, improving its performance and fixing bugs
  • Spotted and removed a method that was left over after re-factoring, making the whole code base saner. :)

While Mr. Kent gets the spotlight for his display of ticket-resolving madness, the rest of us weren’t exactly sitting around gawking:

Caleb Tennis wrote several cool blog posts about Chef. He also provided a pair of patches for Portage, making it both faster and more efficient, and extended the group resource to allow for adding and removing individual users from the group.

David Lee fixed one of the more irritating aspects of Chef’s search index support – you can now reference the results in the same fashion you can access them on the node object directly, in addition to the flattened structure we returned previously. It’s a nice bit of Ruby fu – thanks, David!

Chef 0.6.2 MVP David Balatero provided us with a MacPorts package provider.

Jason Jackson provided us with an update to the Route provider, enabling platform specific configuration files to be updated – initially, Red Hat and friends are supported. He then turned his eye on network interfaces, providing similar functionality. So Red Hat fans, send some love his way, because he sent some yours.

The 37 Signals boys popped in with a pair of patches. Joshua Sierles fixed up the Remote Directory provider when used via Chef Solo, while Mark Imbriaco made life easier on Chef Contributors by making the Chef Server run cleanly from the source directory.

Miguel Cabeça improved the Mount provider to support LABEL and UUID, along with a supremely useful patch to several of the Package providers: you can now specify an ‘options’ attribute to package resources, and the extra options will be added to the resulting command. (This was also done by Caleb for the Portage provider – thanks!)

Stephen Haynes provided a patch to fix a silly bug that caused the FreeBSD User and Group provider to be removed from the platforms mapping – thanks for the fix, Stephen.

From the Opscode crew:

AJ Christensen re-factored the CLI applications, so they are test-able and much more consistent. He also moved much of Chef’s functionality over to a series of libraries, making them re-usable from other applications: Mixlib::Config, Mixlib::Log, and Mixlib::CLI. Check them out if you want your apps to behave like Chef.

Nuo Yan implemented some alternative syntax for specifying notifications to multiple resources.

Joshua Timberman added metadata to every cookbook in the Opscode cookbooks repository, patched up the config.ru file used in passenger installs, and resolved an issue with Passenger complaining about log file handles.

Finally, I added support for Cookbook Metadata and Roles, re-factored the distribution of cookbooks to the edge nodes to only include those required to build a given server, and made various Web UI improvements.

Full Change Log is below the fold.

Bug

  • [CHEF-178] – remote_directory not supported in chef-solo
  • [CHEF-187] – Mount Resource should handle LABEL and UUID
  • [CHEF-242] – activesupport conflicts with to_json in node.rb
  • [CHEF-245] – chef/provider/user/useradd.rb should only add -m to command line if home directory is being modified
  • [CHEF-253] – chef-server-slice on centos 5.3 incompatibility with merb-core and ruby 1.8.5
  • [CHEF-259] – redhat service provider – correct use of chkconfig
  • [CHEF-260] – yum provider remove_package without version broken
  • [CHEF-261] – yum provider depends on ‘json’ which is not available for Python 2.4
  • [CHEF-271] – rpm packaging – executable examples
  • [CHEF-276] – server.rb log_location truncation
  • [CHEF-280] – recipes evaluated twice
  • [CHEF-281] – Locale isn’t set properly during package installation on Ubuntu 8.10 (at least)
  • [CHEF-283] – "registrations" should be "registration’s"
  • [CHEF-295] – chef-indexer throws fatal exception when processing index/remove messages
  • [CHEF-296] – limiting openid providers variable consistency
  • [CHEF-297] – Failing specs for portage provider
  • [CHEF-310] – yum provider – YumCache – refresh logic
  • [CHEF-312] – FreeBSD user and group provider broken by CHEF-220
  • [CHEF-320] – roles creation fails with an `each’ nil:NilClass error
  • [CHEF-330] – Chef::Config[:solo] not being set in Solo runs
  • [CHEF-331] – user provider – useradd.rb :manage_home confusion
  • [CHEF-335] – dpkg_package resource does not work
  • [CHEF-336] – Error when no tags set in create REST call
  • [CHEF-339] – log file should be a string, got: #<IO:0x7f0db9a68ad8>
  • [CHEF-342] – chef-server’s config.ru should include the server config file
  • [CHEF-344] – gem_package resources failing to install packages
  • [CHEF-345] – chef-client doesn’t automatically read /etc/chef/client.rb anymore
  • [CHEF-350] – chef-solo json attributes aren’t loaded
  • [CHEF-353] – .rake_test_cache gets corrupt

Improvement

  • [CHEF-116] – Require authentication for the entire Chef Server
  • [CHEF-122] – Notifies should be able to send different actions to different resources, perhaps through a hash
  • [CHEF-151] – Refactor application CLI logic to a seperate class so it can be tested
  • [CHEF-215] – Speedup of package provider (at least, for Gentoo)
  • [CHEF-225] – Routing provider needs extended to manage configuration files
  • [CHEF-243] – Search results in recipes & chef server return a *flattened* hash. It should return, or be able to return, a non-flattened hash, with all field names intact.
  • [CHEF-251] – chef-server should run from gems without requiring config file modifications within the gem directories.
  • [CHEF-268] – Config files should be able to be passed into chef-client as http resources
  • [CHEF-272] – include contrib/ in gems
  • [CHEF-288] – service resource – supports and custom stop/start/etc commands
  • [CHEF-302] – chef-server authentication requirement should link to information on securing openid
  • [CHEF-317] – Last Check in relative time ago
  • [CHEF-323] – yum provider – improve failure output
  • [CHEF-325] – cookbook not found error message is not helpful for metadata uptake
  • [CHEF-327] – Package providers shoud have an options attribute to pass verbatin to underlying commands
  • [CHEF-329] – more useradd home directory fun
  • [CHEF-332] – Deleting a node via the web-ui pops up an error message, though the deletion is successful
  • [CHEF-346] – Update 0.7.0 for new rake task to test templates and cache tests
  • [CHEF-347] – cleanup – chef/provider/remote_directory.rb do_recursive_old
  • [CHEF-354] – chef-repo should have config/chef_upgrade.json

New Feature

  • [CHEF-131] – Add a flag to chef-client to re-read JSON attribute file each time it wakes up (in conjunction with daemonization/interval)
  • [CHEF-220] – Interface Provider
  • [CHEF-226] – the group resource doesn’t allow you to add or remove users from the group, just explicitly set them.
  • [CHEF-232] – determine if a recipe has been seen / included on a node
  • [CHEF-265] – Add support for MacPorts on OS X as a package provider
  • [CHEF-275] – Cookbook Meta-data Generator
  • [CHEF-284] – Role support
  • [CHEF-306] – We should only ship the set of cookbooks needed to build a node to the edge
  • [CHEF-337] – Update skeleton repository for Chef 0.7.0