Greetings!
We have released ChefDK 0.5.0. It can be downloaded for all supported systems at https://downloads.chef.io/chef-dk/
The full list of changes is available in the changelog, but I wanted to highlight some noteable changes below:
This release adds a lot of support for the Policyfile workflow. First, we set native (non compatability mode) API communication to the Chef Server as the default. This means that if you are using policyfiles currently, you need to add `policy_document_native_api false` to your knife.rb to continue using compatibility mode. If you switch to native mode there is no automatic importing of policyfiles from the compatibility mode databags, so you will need to re-upload your policyfile locks.
UPDATE: I was wrong – Chef Server 12.0.7 supports policyfile native mode endpoints as detailed in this blog post, but requires configuration to activate it. Chef Server 12.1.0 will support policyfile native mode endpoints by default. Sorry for my confusion!
Chef Zero, however, still does not support native mode endpoints.
Policyfiles now support attributes using the same syntax you would use in an attribute file for a cookbook.
[shell]
default[‘some’][‘attribute’] = 1
default[‘some’][‘overridden’][‘attribute’] = ‘a’
override[‘some’][‘overridden’][‘attribute’] = ‘b’
[/shell]
Policyfile attributes are applied at the “role”precedence level during the chef-client run. You can also regenerate only the attributes in a policyfile.lock by running `chef update -a`.
Running `chef diff` will display the itemized differences between two policyfiles or 2 versions of a specific policyfile. It is documented quite well and you can see the different options by running `chef diff -h`. This command only works with a server running the native API endpoints.
An example of the output looks like:
The packaged version of `chef` (12.2.1) contains a bug which tries to use `macports` as the package provider for OSX instead of `homebrew`. So if you use the embedded chef to converge your workstation, do not install this version of the ChefDK. I am preparing a 0.5.1 release which will include `chef` 12.3.0 and contains the fix for this bug. Expect to see it in the next day or two.