- From: Ranjib Dey <
>
- To:
- Subject: [chef] Re: RE: Re: Cookbook Architecture
- Date: Wed, 17 Oct 2012 21:47:34 +0530
majority of the opscode cookbooks targets multiple platforms as well as re-uses other cookbooks hence the added complexity. In almost every cases you can come up with a simpler solution that is geared towards your specific need, given you understand that you might end up maintaining those cookbooks.
Initially (at least 2 year back) I used to maintain all our cookbooks , primarily because we run mostly centos/rel , and I didn't like the some of the patterns enforced in the community cookbooks (like enforcing debian style site/mod management for apache in rel). Also this helped us keeping our cookbook repos slim and self contained.
Things started changing once the code base started getting bigger, we missed out a lot of neat community cookbooks that implements latest and greatest chef (as well as chef related tooling) features, the effort involved for refactoring steadily increased. And the frustrating part was most of those features were rapidly pouring in the community cookbooks. Not only that you can not use some other cookbook, just because of its dependency to another community cookbook (and you can not use that, as you have your own slim, trim, gym version :-) ).
I think there are uses cases for both patterns (your own cookbooks vs community cookbooks + only a handful cookbooks that are unique to your infrastructure). If you are starting new with chef you might go with your very own set of cookbooks. To effectively use community cookbooks, you need incorporate certain other tooling as well (like librarian ). Also , you might end up maintaining your own fork of some cookbooks (temporarily). But if you can live with these pains, community cookbooks can be pretty rewarding. The initial learning curve is higher, but you end up maintaining much less code (and more importantly the relevant ones, that are unique to your infrastructure).
I belong to a service based company, so i'll shamelessly say reusing and contributing back to the community cookbooks makes my life easier (though i have not been able to do this at all client places). But this might not be relevant to you
best
ranjib
On Wed, Oct 17, 2012 at 8:41 PM, Nguyen, Dang
<
" target="_blank">
> wrote:
My team uses the same methodology as John.
From: John Martinez
Sent: Wed, Oct 17, 2012 07:53 AM
To:
" target="_blank">
Subject: [chef] Re: Cookbook Architecture
We do separate versions of cookbooks and define what versions to use
in environments. Package versions are node attributes.
So, the latter.
-john
On Oct 17, 2012, at 7:48 AM, "
" target="_blank">
" <
" target="_blank">
> wrote:
> Hi Chefs,
>
> We have come across this design pattern many times when building out our
> cookbooks and can't quite decide which makes the most sense. Do you write your
> cookbook such that the latest version of the cookbook can install any version
> of the application it is installing/configuring or do you create separate
> versions of the cookbook for each version of the cookbook (i.e. each cookbook
> version installs only one version of the software)? The Opscode cookbooks seem
> to go with the first strategy but we have found we can make simpler cookbooks
> by going with the second strategy.
>
> Any thoughts?
Archive powered by MHonArc 2.6.16.