help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how do you combine cfengine and rcs/cvs/subversion?


From: Jamie Wilkinson
Subject: Re: how do you combine cfengine and rcs/cvs/subversion?
Date: Mon, 5 Jul 2004 00:35:24 +1000
User-agent: Mutt/1.5.6+20040523i

This one time, at band camp, Karsten Heymann wrote:
>Hello you all,
>
>I'm wondering how those of you feeding cfengine from a revision control
>system have setup their config. 
>
>(Reason: I'd like to set up one before I instruct my coworkers on cfengine
>so we do it the right way just from the beginning :) )
>
>Especially I'm not sure how to set up the checkout mechanism. Do you
>regularly scheduled checkouts into cfengine's publishing directory or do
>you launch the checkout from hand. Do you maybe have some sophisticated
>scripts you would share or pointers to websites/articles about this? (I
>found none apart from some discussions on groups.google.com covering
>cfengine1).
>
>I'd really love to see some examples of working setups to get an Idea of
>what is practical and what not, so if you have something to say I'm all
>ears.

I've got a Makefile in my repo in subversion, and we manually push out
new changes when that happens (which is pretty much an automatic
reaction now), which has the advantage over our old method in that we
can double check and test our changes before rolling them out to
everything and watching it all break.

(Previously, we used CVS and had a commit hook that checked out the
latest version into cfservd's CFINPUTS directory whenever a checkin
occurred, and that was quite evil.)

The important parts of the Makefile for the rollout look like this:

update:
        svn up

rollout: update
        rsync -Ccvtzrl --exclude-from=NOROLLOUT -e ssh \
                --delete --delete-after --delete-excluded \
                ./ $(ROUSER)@$(ROHOST):$(RODIR)/

ROUSER := remoteuser
ROHOST := cfserver
RODIR := /var/cfengine/inputs

We use ssh keys to grant access to the cfinputs directory on cfserver.

-- 
jaq@spacepants.org                           http://spacepants.org/jaq.gpg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]