I recently started using chef and I love it for provisioning my vagrant boxes and quickly spawning new machinges.

Now I started using a hosted chef server.

It's pretty easy to manage my cookbooks using Berkshelf with all needed cookbooks distributed over several git repositories.

But now I want to have a neat management for my databags/environments/nodes/roles etc... as well.

I want to keep json files holding these configurations in sync with the chef server.

The only way to do that is using knife upload. I don't want to end up writing a bunch of scripts to upload local files to my chef server.

So is there a solution that lets me easily upload all my stuff to chef server? Preferably tied to a git push (so that all my stuff will be updated on chef, after I push the git repo)


I recently found spiceweasel which lets you setup a chef infrastructure using YAML files.


You could create a post-push git hook that uploads everything:

knife cookbook upload --all
knife role from file roles/*.rb
knife data bag from file --all

But since git does not have post-push local hook you have to hook it to something else.

  • I thought of that, however I don't want to set up an extra server to manage my git hooks for one repository. – leifg Apr 15 '13 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.