[chef] How to manage and deploy environments?


Chronological Thread 
  • From: Steve Bennett < >
  • To:
  • Subject: [chef] How to manage and deploy environments?
  • Date: Fri, 20 Jul 2012 17:49:13 +1000

Hi,
  I'm trying to do something that should be really simple:
1) Create "dev" and "prod" environments
2) Specify a couple of attributes that go with each
3) Bootstrap a remote node with "prod" environment

The documentation (http://wiki.opscode.com/display/chef/Environments) suggests that you can create 'dev.rb' and 'prod.rb' in the environments directory, then run 'rake install' to upload these to the chef server. However, various comments on that page indicate that this is incorrect.

So, how *do* you manage environment-specific attributes? Isn't this the whole purpose of environments? I really want to manage them through local text files - not running commands on the chef server - if possible.

Secondly, how do you then specify that a node should be 'prod'? I tried this:
1) Bootstrap node
2) knife edit node xxxx
3) Run chef-client on node

It failed with a 403 error, but possibly because the environment was not properly registered in the first place. Is this the right approach?

Steve



Archive powered by MHonArc 2.6.16.

§