[Pre-Release Announcement] Chef Client 12.6.0

Ohai Chefs!

We are gearing up to do a release of Chef 12.6.0 shortly, and need your help to kick the tires and try out a pre-release build!

There are a number of new features (see below) that we would love to hear of your experience running them through your own environments, and learn of any issues or critical blockers ASAP.

The pre-release builds should be up to date with the latest fixes and features. When we are satisfied with the quality, we will create the final build and release to the world. If all goes well (i.e., barring any critical regressions), we plan to release Chef 12.6.0 early next week.

Obviously, this is still a pre-release build, and therefore not for running on your production or mission-critical servers, so please exercise the usual due diligence.

Run the Chef client on your dev or test servers, and try it out with your own cookbooks. Please make sure to file any bugs or issues found on https://github.com/chef/chef/issues, and identify them as 12.6.0 pre-release issues.

We look forward to and appreciate your feedback!

How To Get It

The commands below will download and install the most recent prerelease build:

###Linux and OS/X:

curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -c current -P chef

Windows:

Open up a Powershell command prompt as Administrator, and type:

. { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -channel current -project chef

Things You Can Do

Please see the Release Notes which has details on the changes and features: https://github.com/chef/chef/blob/master/RELEASE_NOTES.md

Here are some things to try:

Windows Chef Client Install, Upgrade, and Uninstall

Since we have re-architected the MSI installer, here are scenarios that would be great to exercise:

Follow the installation step (the PowerShell command above) on a clean machine (i.e., no Chef Client installed), as well as a machine that has an older version of the Chef Client already installed (version older than 12.5.1).

After you are done with testing, uninstall the Chef client (e.g., via the Control Panel), and make sure that the Chef client folder (C:\Opscode\Chef) is properly removed.

Cookbook with new chef_version and ohai_version keywords

Create or modify one of your existing cookbooks to add a Chef client version check. In your metadata.rb file, add the following:

# matches any 12.x version, but not 11.x or 13.x
chef_version "~> 12"

Then run the cookbook and make sure it continues to function.

Next, change the chef_version to something that does not match the Chef client (e.g., “~-> 13”), and re-run the cookbook.

For more examples, see https://docs.chef.io/release/12-6/release_notes.html#new-metadata-rb-settings

Install non-MSI Windows packages using core Chef package resource

If you have been using the Windows cookbook for installing non-MSI packages, try the same thing with core Chef instead.

Here is a sample you can use: add a new file called ‘testpackage.rb’, and add the snippet below. Then run ‘chef-apply testpackage.rb’ and make sure it correctly installs the package.

package 'http://mercurial.selenic.com/release/windows/Mercurial-3.6.1-x64.exe' do
  checksum 'febd29578cb6736163d232708b834a2ddd119aa40abc536b2c313fc5e1b5831d'
end

For more examples, see https://github.com/chef/chef/blob/master/DOC_CHANGES.md

Use the new ksh resource

For platforms that support it, you can now use Korn Shell as a core resource.

For example, add a new file called ‘testksh.rb’, and add the snippet below. Then run ‘chef-apply testksh.rb’ and confirm that it echos the output as expected.

ksh 'hello world' do
  code <<-EOH
    echo "Hello world!"
    echo "Current directory: " $cwd
    EOH
end

For more details, see https://docs.chef.io/release/12-6/release_notes.html#ksh


Once again, thanks for using Chef, and we hope you enjoy this prerelease.

Salim Alam
Principal Software Engineer
Chef Software, Inc.