ChefDK 0.5.0 Released
// Chef Blog
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:
Native API ModeThis 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 falseto 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.
The current version of Chef Server does not support policyfile native mode but it will be included in release 12.1.0. Chef Zero also does not currently support native mode. If you want to upload policyfiles to either of these servers currently, you will need to continue using compatibility mode.
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.
Attributes in PolicyfilesPolicyfiles now support attributes using the same syntax you would use in an attribute file for a cookbook.
default['some']['attribute'] = 1 default['some']['overridden']['attribute'] = 'a' override['some']['overridden']['attribute'] = 'b'
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.
chef diffwill 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:
- Support fish shell in
chef -vnow displays the version of the ChefDK, Chef, Berkshelf and Test Kitchen
chef generate repocommand no longer generates a monolithic repo
- Add a
chef_repocookbook source which can be used in place of supermarket/berks-like depsolving to support a single monolithic git repo with its 'universe' of cookbooks entirely contained within it. Cookbook dependencies will be determined only from the filesystem. Cannot be combined with supermarket/berks-apis as a source.
- We now include the
knife-windowsgem at version 0.8.4 and the
winrm-transportgem at version 1.0.0
- Updated embedded software:
Note for OSX UsersThe packaged version of
chef(12.2.1) contains a bug which tries to use
macportsas 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
chef12.3.0 and contains the fix for this bug. Expect to see it in the next day or two.
Shared via my feedly reader
Sent from my iPhone