ChefDK 2.4.17 released!

Ohai Chefs!

Today we’re releasing the first of the 2.4 series for ChefDK, 2.4.17. This most notably includes some needed fixes to winrm-fs which had caused a handful of test-kitchen + Windows issues. See the full changelog for more details.

Improved Performance Downloading Cookbooks from a Chef Server

Policyfile users who use a Chef Server as a cookbook source will
experience faster cookbook downloads when running chef install. Chef
Server’s API requires each file in a cookbook to be downloaded
separately; ChefDK will now download the files in parallel.
Additionally, HTTP keepalives are enabled to reduce connection overhead.

Cookbook Artifact Source for Policyfiles

Policyfile users may now source cookbooks from the Chef Server’s
cookbook artifact store. This is mainly intended to support the upcoming
include_policy feature, but could be useful in some situations.

Given a cookbook that has been uploaded to the Chef Server via chef push,
it can be used in another policy by adding code like the following to
the ruby policyfile:

cookbook "runit",
  chef_server_artifact: "https://chef.example/organizations/myorg",
  identifier: "09d43fad354b3efcc5b5836fef5137131f60f974"

Add include_policy directive

Policyfile maybe now use the include_policy directive as described in
This directive’s purpose is to allow the inclusion policyfile locks to the current
policyfile. In this iteration, we support sourcing lock files from a local path or a
chef server. Below is a simple example of how the include_policy directive can be used.

Given a policyfile base.rb:

name 'base'

default_source :supermarket

run_list 'motd'

cookbook 'motd', '~> 0.6.0'


>> chef install ./base.rb

Building policy base
Expanded run list: recipe[motd]
Caching Cookbooks...
Using      motd         0.6.4
Using      chef_handler 3.0.2

Lockfile written to /home/jaym/workspace/chef-dk/base.lock.json
Policy revision id: 1238e7a353ec07a4df6636cdffd8805220a00789bace96d6d70268a4b0064023

This will produce the base.lock.json that will be included in our next policy users.rb:

name 'users'

default_source :supermarket

run_list 'user'

cookbook 'user', '~> 0.7.0'

include_policy 'base', path: './base.lock.json'


>> chef install ./users.rb

Building policy users
Expanded run list: recipe[motd::default], recipe[user]
Caching Cookbooks...
Using      motd         0.6.4
Installing user         0.7.0
Using      chef_handler 3.0.2

Lockfile written to /home/jaym/workspace/chef-dk/users.lock.json
Policy revision id: 20fac68f987152f62a2761e1cfc7f1dc29b598303bfb2d84a115557e2a4a8f27

This will produce a users.lock.json that has the base policyfile lock merged in.

More information can be found in
RFC097 and
the docs.

New tools bundled

We are now shipping the following new tools as part of Chef-DK

  • kitchen-digitalocean
  • kitchen-google
  • knife-ec2
  • knife-google

Get the Build

As always, you can download binaries directly from or by using the new mixlib-install command line utility available in ChefDK 0.19.6 or greater.

$ mixlib-install download chefdk -v 2.4

Alternatively, you can install ChefDK using one of the following command options:

# In Shell
$ curl | sudo bash -s -- -P chefdk -v 2.4

# In Windows Powershell
. { iwr -useb } | iex; install -project chefdk -version 2.4

If you want to give this version a spin in Test Kitchen, create or add the following to a .kitchen.local.yml file:

  product_name: chefdk
  product_version: 2.4