[Top][All Lists]

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

Re: syncing files....

From: Frank Smith
Subject: Re: syncing files....
Date: Fri, 06 Feb 2004 17:29:45 -0600

--On Friday, February 06, 2004 18:03:43 -0500 John Gray <address@hidden> wrote:

> Nate Campi wrote:
>> On Fri, Feb 06, 2004 at 04:56:25PM -0500, John Gray wrote:
>>> Is there a facility for syncing files in cfengine (I haven't been able 
>>> to find one).  So for example, when the passwd file has a passwd 
>>> changed, cfengine would sync it with the masterfiles?
>> At my site we've always used a wrapper command that checks config files
>> in and out of RCS before/after editing. If you used such a scheme you
>> could trigger a sync of the file in question to masterfiles (directly
>> rsync, or use cfrun to trigger the copy on the remote fileserver, etc).
>> The beauty of this is that if an upgrade/reinstall wrote out a copy of
>> passwd that you don't want in masterfiles, it wouldn't sync until you
>> manually triggered it.
>>> On a similair note, there some things I'd like to collect from the 
>>> systems (their current package lists and kernel configs are two 
>>> examples).  Is there a nice way to collect those things so I have a 
>>> central store of them.  I want to make diaster recovery easier, in fact, 
>>> that's largely my goal here, to be able to rebuild a system ASAP when a 
>>> drive dies.  I could certainly write scripts to do this, but I'd rather 
>>> not have too many independant system going if cfegine will handle it all 
>>> for me.
>> The general cfengine take on this is to set up the kernel and packages
>> using cfengine in the first place. That way if you need to rebuild the
>> host, cfengine does it all for you. 
>> Often this means retrofitting cfengine on top of an existing setup, to
>> start pushing out the *existing* configs/build. It's worth it, since it
>> makes it so easily rebuilt.
> I haven't gotten to far with having cfengine manage my packages yet. Many of 
> our boxes are debian boxes.   Can I tell cfengine the packages I need, and 
> have it use apt-get to resolve the dependencies for me?
> I see references to rpm.  We are mostly a debian and Solaris shop.  I'm using 
> pkg-get on the solaris boxes.  The details on how to make this work have 
> escaped me.

For Debian, just run a shellcommand:
/usr/bin/apt-get --yes install  packagename
where 'packagename' is somethng like libc6  and not libc6_1.9.6-2.deb,
and all required dependencies will be fetched and installed also.

I had a problem with apt-get not finding required commands due to
the path cfengine runs shellcommands with, and ended up calling a
wrapper script.  I admit I didn't spend much time looking into how
cfengine sets its shellcommand path, so there may be a better way.

You can also have cfengine auto-update Debian packages with
/usr/bin/apt-get dselect-upgrade --yes
so you can keep it all up to date.


> Thanks for the help.
> John
> -- 
> John Gray                           address@hidden
> AgoraNet, Inc.                      (302) 224-2475
> 102 E. Main Street, Suite 303       (302) 224-2552 (fax)
> Newark, De 19711          
> _______________________________________________
> Help-cfengine mailing list
> address@hidden

Frank Smith                                      address@hidden
Systems Administrator                           Voice: 512-374-4673
Hoover's Online                                   Fax: 512-374-4501

reply via email to

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