by Ben Burkert
An assistant to chef. Helps organize cookbooks for multiple nodes.
- templater >= 0.5.0
From within your Rails/Merb project, run:
$ chefify .
That should generate the basic layout in a “chef” dir:
Generating with app generator:
[ADDED] config
[ADDED] nodes
[ADDED] cookbooks
[ADDED] config/sous-chef.yml
[ADDED] Rakefile
Next generate some nodes with the chef-gen command:
$ chef-gen node beta --environment=staging --platform=ec2
Generating with node generator:
[ADDED] nodes/beta/cookbooks/system/attributes
[ADDED] nodes/beta/cookbooks/beta/recipes/default.rb
[ADDED] nodes/beta/cookbooks/beta/attributes/beta_node.rb
And a few cookbooks:
$ chef-gen cookbook beta --environment=staging --platform=ec2
Generating with cookbook generator:
[ADDED] cookbooks/postgresql/attributes/server.rb
[ADDED] cookbooks/postgresql/recipes/server.rb
Use the “chef” script to manage your nodes:
$ chef -T
(in /Users/ben/code/myapp/chef)
cd cookbooks
cd /Users/ben/code/myapp/chef
cd nodes/beta/cookbooks
cd /Users/ben/code/myapp/chef
rake beta:deploy # Deploy the beta cookbook.
rake beta:package # Package the beta cookbook.
rake beta:test # test the beta cookbook.
note use ‘chef’ instead of ‘rake’. (e.g. chef beta:deploy).