Chef

Chef-zero Is Broken in Ubuntu 14.04

I was playing a bit with applying chef cookbooks locally, without a chef server and found that version of Chef from Ubuntu repo is way too low for normal operation in local mode.

# apt-cache policy chef
chef:
  Installed: 11.8.2-2
date = ""
  Version table:
 *** 11.8.2-2 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

There is a bug resolved in recent versions of Chef related to the way in which chef-zero parses json files. If there is metadata.json file instead of metadata.rb in a cookbook chef-zero fails to parse this file expecting just a filename instead of full file content.

Some Library Cookbooks Already Rely on ‘Sensitive’ Method

Recently participated in Chef cookbook upgrades. One of cookbooks depends on library rabbitmq cookbook => 3.1

The problem is that recent versions of rabbitmq cookbook (after 3.3.0) rely on newer chef-cient functionality and if you have chef-clients version < 11.14.0 installed on nodes chef-client run will fail and you will see the following error in the log:

undefined method `sensitive' for Chef::Resource::Template

Some Comments on Jakshi’s Accessing Chef Attributes in Serverspec Tests Blog Post

Here is an awesome post pouring some light on using node attributes during ServerSpec tests, but I have one tiny addition. It’s useful to have node attributes supplied by Ohai, so I’d add this to the respective recipe: --- a/test/fixtures/cookbooks/test-helper/recipes/default.rb 2014-12-19 16:55:02.636535159 -0800 +++ b/test/fixtures/cookbooks/test-helper/recipes/default.rb 2014-11-24 20:28:35.083708281 -0800 @@ -20,6 +20,7 @@ attrs = {} + attrs = attrs.deep_merge(node.automatic_attrs) unless node.automatic_attrs.empty? attrs = attrs.deep_merge(node.default_attrs) unless node.default_attrs.empty? attrs = attrs.deep_merge(node.normal_attrs) unless node.

Chef 11 Hangs Trying to Deal With Unresolvable Dependencies

Recently hit the problem with Chef server 11.0.12-1.ubuntu.12.04 trying to test updates for OpenStack StackForge cookbooks. stable/havana cookbooks depend on the cookbook openstack-common ~> 8.0, stable/icehouse depend on the cookbook openstack-common ~> 9.0

Chef: Attribute Overrides in Recipes Is a Bad Idea

I like Chef, but some aspects of its internal kitchenary are pretty poorly documented (or I’m not good enough with Chef to understand why it should behave this exact way).

I’ve hit an annoying problem trying to fix library in a chef cookbook: