[chef] Re: Re: Scoping data bag items to environments


Chronological Thread 
  • From: Charles Duffy < >
  • To:
  • Subject: [chef] Re: Re: Scoping data bag items to environments
  • Date: Tue, 16 Aug 2011 20:33:09 -0500

...so you have a single instance of the item, with its data referencing the different environments?

That's really not ideal for my use case, and I'll probably want to select a different convention. I have an application which creates new data bag items when users specify new objects. I don't want a bug in the development version of the application (running in a "testing" environment) to potentially corrupt the content pushed to Chef by the live, production instance.

On Tue, Aug 16, 2011 at 8:15 PM, Joshua Timberman < "> > wrote:
Hello!

On Tue, Aug 16, 2011 at 5:46 PM, Charles Duffy < "> > wrote:
>
> Is there any support, either in code or by convention, for scoping data bag
> items to environments?

Convention. For example in an application deployment, we might want to
have a specific version listed in a data bag item by environment.

{
 "id": "my_app",
 "repository": " :my_company/my_app.git",
 "repository: {
   "production": "1.0.0",
   "staging": "1.2.0",
   "development": "master"
 }
}

We use this pattern in Opscode's public "application" cookbook.

--
Opscode, Inc
Joshua Timberman, Director of Training and Services
IRC, Skype, Twitter, Github: jtimberman




Archive powered by MHonArc 2.6.16.

§