- From: Peter Donald <
>
- Cc:
- Subject: [chef] Re: Attribute Names
- Date: Thu, 21 Mar 2013 11:46:34 +1100
Hi,
On Thu, Mar 21, 2013 at 10:56 AM, Matthew Sims
<
>
wrote:
>
I'm mostly curious how others handle this.
>
>
We have a chef environment where attribute can be located in three
>
places;the cookbook attributes, environments and roles (and in some cases,
>
in other cookbooks.)
To avoid this complexity we have taken a somewhat simple approach.
We practically never use normal priority attributes. Occasionally we
may associate a node with a issue in issue tracker, or a point of
contact etc. In which case we use normal attributes either through the
GUI or CLI but never in cookbooks/roles/env files.
Our "reusable" cookbooks [1],[2] set attributes in attribute files at
the default priority if users can override them and at "override"
priority if they are simply being published for consumption by other
cookbooks. Our role and/or wrapper [3] cookbooks set override priority
attributes in a recipe. Our roles almost never set any attributes and
if they do they will never bet set anywhere other than other roles and
they are override priority. (They are typically flags that are read by
a role cookbook to switch between behaviours). Our environments rarely
set any attributes and if they do they will never be set anywhere
other than other environments and they are override priority. (they
are also flag attributes)
HTH
[1]
http://realityforge.org/code/2012/05/12/evolving-towards-cookbook-reusability-in-chef.html
[2]
http://realityforge.org/code/2012/11/12/reusable-cookbooks-revisited.html
[3]
http://realityforge.org/code/2012/11/19/role-cookbooks-and-wrapper-cookbooks.html
--
Cheers,
Peter Donald
Archive powered by MHonArc 2.6.16.