[chef] Re: Re: Re: Environments


Chronological Thread 
  • From: Daniel Condomitti < >
  • To:
  • Subject: [chef] Re: Re: Re: Environments
  • Date: Fri, 14 Mar 2014 16:35:58 -0700

Can you explain what you consider to be an environment and what data you’re looking to store in an environment? We have a single environment for production (vs staging environments / development) that’s shared across multiple data centers (physical and EC2 regions) with zero attributes in it. Discovery of services (you brought up db server hostnames and s3 buckets in an earlier email) could be done through chef searches and data bags.

On Friday, March 14, 2014 at 4:30 PM, Douglas Garstang wrote:

Jesse,

Thanks, but not what I was looking for. :)

Doug


On Fri, Mar 14, 2014 at 4:17 PM, Jesse Nelson < " target="_blank"> > wrote:
you can have a condition based on the chef_environment in your cookbooks attributes or recipes. 

In attribute file:

   If chef_environment == 'blarg'
       default[:mything][:blah] = 'whee'
   end


On Fri, Mar 14, 2014 at 4:11 PM, Douglas Garstang < " target="_blank"> > wrote:
We put every cookbook in its own git repo. Is there any way to put environment data, related to just that cookbook actually IN the cookbook, rather than a common environments directory?

I ask this because it seems strange to me that cookbooks are supposed to be a unit of software, and yet environment data, related to the cookbook has to be put into a common location. Seems strange. You can get around this with role attributes by creating wrapper cookbooks, but .... for environments?

Doug





--
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: ">
Cell: +1-805-340-5627




Archive powered by MHonArc 2.6.16.

§