4

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)

2 Answers 2

2

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

1

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

#!/bin/bash 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.

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.