chef-metal has an interesting variant on this … if your cookbook can be
served by a local chef-zero, it will serve up your local repository
directory directly, making for a very tight edit > converge > edit >
converge loop. You can replicate the effect with:
ssh -R 8889:localhost:8889
set up /etc/chef/client.rb with “chef_server_url http://localhost:8889”
Now anytime you run chef-client on the remote machine, it will immediately
pick up the latest cookbook from your local directory without any copying
or vendoring or whatnot.
It can’t be done directly with berkshelf, but if you berks vendor to your
repository directory, you can edit the cookbook there and reflect the
changes back when you are done.
On Tue, Sep 2, 2014 at 2:07 PM, Durfee, Bernie (GE Global Research) <
A common workflow I use is…
- Change my cookbook
- Run ‘berks package’ to build a complete tarball of my cookbook with
- SCP to a server
- Run ‘sudo chef-solo -o “recipe[my-fancy-cookbook::default]" -r
cookbooks-1409688848.tar.gz’ to test the cookbook
Is this workflow possible with chef-client in local mode? Can I pass
chef-client a tarball that was created by the ‘berks package’ command?