[chef] Re: 2 environments on one machine


Chronological Thread 
  • From: "steve ." < >
  • To: " " < >
  • Subject: [chef] Re: 2 environments on one machine
  • Date: Wed, 14 Aug 2013 09:55:39 -0700

A Chef node can only be in one environment at a time.

Here are the options I can think of, in ascending order of complexity:
* Spin up another machine.  (Hey, we're ordering by complexity, not cost...)
* Move your per-environment logic into roles, data bags or an application cookbook.  Roles and data bags won't let you constrain cookbook versions, though.
* Run two Chef clients/nodes on the same host.  You'll need to pay special attention to all of your cookbooks to ensure that they either don't share any resources or, if they absolutely _have_ to share resources, that they agree on the state of those resources.  Otherwise the conflicting resources will toggle back and forth between the state that production wants it and the state that UAT wants it.

Good luck!



On Wed, Aug 14, 2013 at 9:31 AM, Florian Hehlen < " target="_blank"> > wrote:

Hi,

 

I have the unfortunate situation of having to deploy UAT and PROD artefacts on a single machine. Is there an efficient way to manage this with environments? Or should I look into doing it some other way? It feels very natural to use the environment to store the attributes for the version I want to release in each situation.

 

Cheers,

Florian





Archive powered by MHonArc 2.6.16.

§