Excellent,
Torben, I think I agree with you on your views of direct and indirect version locking.
When a cookbook specifies a version constraint on another cookbook, it is locking itself to an interface.
How the other cookbook chooses to implement that interface, I.e., what other cookbooks it locks to, is part of that cookbook’s implementation, and should not be directly
visible to the original cookbook.
From: Torben Knerr [mailto:
Sent: Friday, June 13, 2014 3:48 AM
To:
Cc:
Subject: [chef] Re: Re: Peaceful Co-Existence of Multiple Versions of the Same Dependent Cookbook
personally I even prefer to lock dependencies in metadata.rb, exactly for that reason. The other bonus point is that you can use environments for environments again, and the only cookbooks you need to specify in the environments are the
"top level" cookbooks (I call them exactly like that).
@danielsdeleo: my latest response is still pending, will answer to the list to bring the discussion back here
On Thu, Jun 12, 2014 at 10:07 PM, Julian C. Dunn <
" target="_blank">
> wrote:
On Thu, Jun 12, 2014 at 1:44 PM, Stephen Corbesero
<
">
> wrote:
> I know that a multiple versions of the same cookbook can exist on a single
> chef server, but can different cookbooks depend on different versions of the
> same cookbook within an environment?
>
> Suppose we have two “top level” cookbooks, “foo” and “bar” that share a
> dependency on a “common” cookbook, but at different versions: perhaps, “foo”
> depends on “common” at version “=1.2.3”, and “bar” depends on “common” at
> “~>2.0.0”
>
> As long as “foo” and “bar” are not deployed on the same node, would all the
> nodes with the “foo” cookbook get the older version of the “common”
> cookbook, and would all the nodes with the “bar” cookbook get the latest
> version of “common” that was greater than 2.0.0?
>
> I am not asking if this is a good thing to do. I just want to know if
> different versions of the same cookbook could be deployed within an
> environment as long as they are on different nodes and the version
> constraints in the metadata have been correctly specified.
Yes, you can do this, if you do the pinning in the metadata for the
'foo' and 'bar' cookbooks (and not at the environment level).
- Julian
--
[ Julian C. Dunn <
">
> * Sorry, I'm ]
[ WWW:
http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]
|