- From: Clif Smith <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: Re: Best practices for keeping repo and server sync'd
- Date: Mon, 9 Apr 2012 14:47:38 -0500
We have a script that runs via cron to:
- git pull from master branch
- determine if there are new (versions of) cookbooks
- if run as "report", log that there are newer cookbooks than what's on the
server (which Nagios monitors)
- if run as "upload":
- upload and freeze new/updated cookbooks
- create and build a new production environment file
- upload databags
- upload roles
It's working like a charm for prod but we need to determine our workflow for
dev and stage.
cjs
On Apr 9, 2012, at 12:53 PM, Jesse Campbell wrote:
>
Folks that are using git hooks, guard, etc:
>
Are you running post-commit hooks on your own workstation?
>
I'm looking into running from the chef server itself, but trying to
>
figure out the best workflow for one of our devs to push cookbook
>
updates...
>
>
Right now I'm thinking:
>
git push to github
>
go to chef management console
>
push button that runs rake install in the local repository
>
>
but since modifying the management console is out of scope for the
>
time being... i'm thinking up alternatives.
>
>
Thanks!
>
-Jesse
>
>
2012/4/7 Juan Jesús Ojeda Croissier
>
<
>:
>
> On Fri, Apr 6, 2012 at 6:09 AM,
>
> <
>
>
> wrote:
>
>> hello,
>
>>
>
>> guard-knife seems very interesting.
>
>>
>
>> As the initial sender of this post, we are using subversion, and we have a
>
>> small bash script like this
>
>>
>
>> cd /root/svnChef/trunk
>
>> svn update
>
>> # TODO: Backup cookbooks
>
>> knife cookbook upload -a
>
>>
>
>> We are never uploading a cookbook directly to the server, all the cookbook
>
>> changes has to go through subversion commit.
>
>>
>
>> By the way, is there a way for exporting all cookbooks from the server,
>
>> such
>
>> knife cookbook export -a, please ?
>
>> That's what we would like to do for replacing '# TODO: Backup cookbooks'
>
>>
>
>
>
> There is not such option. I think the closer thing is to do:
>
> knife cookbook list | while read cb ; do knife cookbook download $cb
>
> -d backup/ ; done
>
>
>
> Or something similar.
>
> You could save the last version (as in the example), all the versions,
>
> commit to the svn, etc, but I guess it must be (by now) still as a
>
> script or Rake task.
>
>
>
> I was thinking about make my own Knife plugin to sync the repos, but
>
> probably it would be interesting to have some sync functionalities at
>
> the Knife's core...
>
>
>
> --
>
> Juanje
Archive powered by MHonArc 2.6.16.