[chef] Re: Manage data bag dependencies?


Chronological Thread 
  • From: Roland Moriz < >
  • To:
  • Subject: [chef] Re: Manage data bag dependencies?
  • Date: Sat, 29 Nov 2014 09:22:14 +0100


Am 28.11.2014 um 18:22 schrieb Noah Kantrowitz < " class=""> >:
On Nov 28, 2014, at 6:41 AM, Roland Moriz < " class=""> > wrote:
some cookbooks require data bags and especially wrapper- and role cookbooks tend to require a chain of (encrypted) data bags.
AFAIK there is no way to describe the dependency/relationship of a cookbooks to data bags, e.g., through some metadata.rb attribute.

This is a problem if you use chef-solo/knife-solo or a lot of different chef-servers/organizations: You almost always forget to upload/create data bags and need to debug it by hand.

Any suggestions?

Stop using data bags and use cookbooks instead. You can use recipes and resources to the same effect.

That’s not always an option because we need to encrypt credentials and therefore need to use encrypted data bags.
I usually have a recipe inside a cookbook that just tries to open an encrypted data bag and copy the data to the node object (force_default-level) - so we have both options.


But let’s take an easier and open source example:

This cookbook requires a data bag but you need to know 
and

to be aware of the dependency. Not a way to „automagically“ get the data bag requirement.

best regards
Roland




Archive powered by MHonArc 2.6.16.

§