[chef] Re: Re: Re: deep merge - !merge users


Chronological Thread 
  • From: Jay Feldblum < >
  • To:
  • Subject: [chef] Re: Re: Re: deep merge - !merge users
  • Date: Thu, 8 Dec 2011 10:03:33 -0500

Deep merging may not seem terribly helpful when it comes to single-purpose, highly specific, custom cookbooks which basically know what their configurations should be.

But it is helpful when it comes to reusing third-party cookbooks: it permits writing custom roles to control and integrate with complex generic third-party cookbooks which look at deep attributes structures to decide what to do.

There is the alternative strategy that such cookbooks might instead provide definitions and resources which may then be called by a custom cookbook, so that instead of writing a custom role to control the third-party cookbook one writes a custom cookbook to control the third-party cookbook. But that requires much greater effort on the part of the author of the third-party cookbook. So we still need the ability to control and integrate with third-party cookbooks by mangling the attributes.

- Jay Feldblum

On Thu, Dec 8, 2011 at 1:47 AM, Matthew Kent < "> > wrote:
On Wed, Dec 7, 2011 at 6:11 PM, Bryan McLellan < "> > wrote:
<snipped some great and interesting thoughts I'll leave for others to comment>

> Deep merge seems like it could solve a really neat problem for
> someone, but I don't know what that problem is. Hopefully I've
> inspired someone else to have more problems than me.

To be clear about what the ticket concerns is only the merging of
arrays during the deep merge process. The merging of hashes in deep
merge has proven itself useful in role inheritance (I think), allowing
for greater role reuse and organization.

As for solving a problem I think "someone" is definitely the key here
- the control over the merging of arrays outlined in CHEF-2737 is only
one extra layer of flexibility that, like say default attributes in
roles, you can skip over and be just fine. It could even be made clear
in the deep merge documentation that there are other ways to achieve
this functionality. To me Chef is already very flexible and this makes
it slightly more so. Although if the eventual goal is to pare down
some of the flexibility in favour of making Chef simpler than I agree
this probably goes in the wrong direction.
--
Matthew Kent | http://magoazul.com




Archive powered by MHonArc 2.6.16.

§