[chef] Set chef environment at initialization of node


Chronological Thread 
  • From: < >
  • To:
  • Subject: [chef] Set chef environment at initialization of node
  • Date: Fri, 11 Nov 2011 11:02:23 -0800 (PST)

Hi all,

This has probably been addressed already, but I can't find it in the archive
(since the word "environment" means so many different things). I want to set 
my
chef environment at node instantiation. I currently use "knife ec2 server
create ..." to bootstrap the ec2 instance with centos6-gems.

I have two different environments, "staging" and "production", and I want to
make sure that production doesn't get newer versions of the cookbooks until
they've been qualified in staging. Is there a straightforward way of
accomplishing this?

I have tried setting knife.rb
knife[:environment] = "production"

and I even tried adding to client.rb in the bootstrap:
environment "production"

But neither of these worked.  Any thoughts?

Thank you!
Vincent



Archive powered by MHonArc 2.6.16.

§