Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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

share|improve this answer

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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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