We have different data bags for different logical partitions (e.g. one for each application), and inside the data bags are items with names corresponding to our chef environments.Tony--Tony BurnsOperations Engineer / Software DeveloperQuad Learning, Inc.1150 17th St Ste 310, Washington, DC 20036c. 608.799.2000 p. 202.525.1078 f. 202.652.1075On Jan 3, 2014, at 12:35, J Light < " target="_blank"> > wrote:We used to just have different data bags for different environments and use the environment attribute to determine which data bag was hit with the query dynamically.I liked that better than having items mixed up in the same data bag, but each partitioning comes with its own pros and cons.On Fri, Jan 3, 2014 at 10:47 AM, Seth Falcon < " target="_blank"> > wrote:
Hi,
A pattern we use is:
" target="_blank"> writes:
> Hello! How do you folks deal with environment-specific data in databags?
> And databag items?
>
> For example, for the first case, let's say a user should be in one group in
> stage, and a different group in prod.
data_bags/
users/
prod.json
preprod.json
So anything that needs environment specific settings gets an environment
specific data bag item.
Recipe code can then select the right data bag item via the node's
chef_environment attribute.
+ seth
--
Seth Falcon | Development Lead | CHEF | http://www.getchef.com/ | @sfalcon
Archive powered by MHonArc 2.6.16.