Hey Jeremy,
Thanks for the tip, however it didn't appear to work for me, any idea what
I am doing wrong?
Last login: Wed May 30 23:31:39 on ttys021
22:10:45 (production_ec2) jdyer@aleph.local ~ shef -z -c ~/.chef/knife.rb
loading configuration: /Users/jdyer/.chef/knife.rb
Session type: client
Loading.......[Fri, 29 Jun 2012 22:10:52 -0400] INFO: Run List is
[Fri, 29 Jun 2012 22:10:52 -0400] INFO: Run List expands to
....[Fri, 29 Jun 2012 22:10:54 -0400] INFO: Loading cookbooks
done.
This is shef, the Chef shell.
Chef Version: 0.10.10
Configuration Management System Software - Chef Infra | Chef
http://wiki.opscode.com/display/chef/Home
run help' for help,
exit' or ^D to quit.
Ohai2u jdyer@aleph.local!
chef > env = Chef::Environment.load('dt_prod')
=> dt_prod
chef > env.cookbook_versions
=> {}
chef >
-John
On Fri, Jun 22, 2012 at 12:16 AM, Jeremy Voorhis jvoorhis@gmail.com wrote:
I've done this once before using shef, and it turns out to be pretty easy.
- Fire up shef like so
% shef -z -c ~/.chef/knife.rb
- Load your environment
chef > env = Chef::Environment.load('YOUR_ENV_HERE')
- Grab your cookbook versions and format to taste.
chef > env.cookbook_versions
=> {"build-essential"=>"= 1.0.0", … }
-
Include your output in environments/YOUR_ENV_HERE.rb
-
Upload
% knife environment from file environments/YOUR_ENV_HERE.rb
HTH,
Jeremy
On Jun 21, 2012, at 8:44 PM, John Dyer wrote:
Hey Guys,
Is there any way to take an environment, which currently has no
cookbook version constraints, and set each cookbook version to the latest
of whats deployed on my chef server? Would really suck to have to get the
expanded run list and do "knife node show" on each... Any other way about
this ?
-John