Not sure what to do for our workflow - cookbooks/roles/environments

TL;DR - How do I/Can I add a recipe to a role in only one environment?

Long version:

We have been using chef strictly with just one role and one
environment (several cookbooks though). But of course we are now at a
place where we need to think about more environments and more roles.

We have machines of roles (say) R1, R2, R3, R4

We need to have environments (say) devA, devB, (probably one for each
dev, not sure) alpha, beta and prod

We have cook books (say) Common1, Common2, Common3 (few more),
R1SpecificCookBook, R2SpecificCookBook, R3SpecificCookBook,
R4SpecificCookBook

Of course only cookbooks have versions - lets say v0 and v1 for each cookbook.

So far so good.

Problem happens when devA adds a new recipe to (say) R1 - we can add
that recipe to R1SpecificCookBook v1 (still under development), but it
breaks when that recipe is nowhere to be found in devB, alpha, beta
and prod environments - as it is not in any of the v0 cookbooks.

Should we retro patch v0 cookbooks with NOOPs for these new recipes -
that does not sound right.

I have no idea how to handle our work flow - needless to say while I
have (once) contributed to chef [1], I am nowhere near a power user.
Need some advice. Please help

[1] http://tickets.opscode.com/browse/CHEF-3438

Thanks

Autif

On Fri, Mar 22, 2013 at 8:04 AM, Autif Khan autif.mlist@gmail.com wrote:

TL;DR - How do I/Can I add a recipe to a role in only one environment?

In short the easiest way is to model roles using cookbooks/recipes
[1]. This allows you to version roles so that different versions could
be deployed in different environments.

[1] Role Cookbooks and Wrapper Cookbooks

--
Cheers,

Peter Donald

On Thu, Mar 21, 2013 at 6:29 PM, Peter Donald peter@realityforge.org wrote:

On Fri, Mar 22, 2013 at 8:04 AM, Autif Khan autif.mlist@gmail.com wrote:

TL;DR - How do I/Can I add a recipe to a role in only one environment?

In short the easiest way is to model roles using cookbooks/recipes
[1]. This allows you to version roles so that different versions could
be deployed in different environments.

[1] Role Cookbooks and Wrapper Cookbooks

Thank you very very much.

This is exactly my problem and this should/will resolve our workflow.

Once again - much obliged!

Autif