- From: Peter Donald <
>
- To:
- Subject: [chef] Re: Preferred Attribute locations
- Date: Wed, 18 Jul 2012 09:44:37 +1000
Hi,
We tend to do the following.
* In the cookbook if an attribute is modifiable then it is set as a "default"
* In the cookbook if an attribute is not modifiable then it is set as
a "override". It is usually used to "publish" information to other
cookbooks. (i.e. The java cookbook may publish the path to the java
command line tool)
* In environments we only use override attributes all the time as our
environment ~= cluster
* We are moving from not having any attributes in roles (See below)
* We rarely if ever use normal attributes and usually it is only for
things like point of contact, business owner, or other cataloguing
information.
Our role specific configuration we tend to put in a recipe in a
"policy" cookbook as we often use a combination of searches, data bag
lookup and rules to syntesize the attributes and then we set them as
override. i.e. Just say we have a role "metric_server" that sets up a
graphite server that we can send metric data to. We would create a
"fisg-graphite" cookbook that generates the environment specific
configuration and then includes the appropriate recipes from the
graphite cookbook.
--
Cheers,
Peter Donald
Archive powered by MHonArc 2.6.16.