[chef] Re: Re: Re: Re: Chained dependencies management


Chronological Thread 
  • From: Jay Levitt < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Chained dependencies management
  • Date: Sun, 12 Aug 2012 15:11:11 -0400

Kevin Nuckolls wrote:
My opinion (and I don't know if it's a very popular one), is that
include_recipe is an anti-pattern when used between cookbooks. It deeply
couples the implementation details of two separate cookbooks. When using
open sourced cookbooks that use include_recipe, you often are required to
use the specific cookbooks that one was written against.

Does that apply to internal cookbooks as well? I've found that I'm increasingly refactoring, say, role[base] into a single run-list item that calls recipe[mysite::role-base]. This lets me use the Ruby DSL, LWRPs, normal-level attributes, and anything other API the "real" cookbook provides.

I hate the un-DRYness of specifying both include_recipe('postgresql') in mysite/roles/role-base.rb and depends('postgresql') in mysite/metadata.rb, but the purely declarative role syntax just doesn't let me do a lot of things...

Jay



Archive powered by MHonArc 2.6.16.

§