July 2007
In a freshly installed Debian Etch, the package cfengine2
comes with
/var/lib/cfengine2/inputs
a symlink to /etc/cfengine
, and
/etc/default/cfengine2
looking like
RUN_CFSERVD=0 RUN_CFEXECD=0 RUN_CFENVD=0 CFSERVD_ARGS=""
Then, we need configuration files in /etc/cfengine
.
CfEngine looks for them in /var/lib/cfengine2/inputs
, but that is a symlink to /etc/cfengine
.
To get started, we need at least the following:
server:/etc/cfengine# find /etc/cfengine/ -type f
/etc/cfengine/cfrun.hosts
/etc/cfengine/cfservd.conf
/etc/cfengine/masterfiles/update.conf
/etc/cfengine/masterfiles/cfagent.conf
Note | |
---|---|
In my case, these files are generated using |
Note | |
---|---|
|
/etc/cfengine/cfrun.hosts
should simply contain the FQDNs of all hosts this server is ever going to service, one per line.
List them all and be done with it.
/etc/cfengine/masterfiles/update.conf
should be tampered with as little as possible.
Its sole responsibility is to keep the configuration files for CfEngine on the client identical to those on the server.
If the master copy /etc/cfengine/masterfiles/update.conf
becomes incorrect, the client copies also become incorrect at the next run of cfagent, and this cannot be repaired, as this is the file that should do the repair, and it has become incorrect.
Warning | |
---|---|
Do not mess with |
All the previous configuration just serves to get /etc/cfengine/masterfiles/cfagent.conf
into place.
This is the file that does all the work.
We present a minimal version in , but it should greatly be elaborated upon.
For help, please refer to the cfagent reference.
We are now ready to restart the cfservd daemon: /etc/init.d.cfengine2 restart
Note | |
---|---|
In order to make the |
[38]
iserv
Is a suite I made. It consists of a couple of scripts that generate configuration files for various services using a central stash of known variables like network addresses of interfaces, serviced domains, etc. There is no use in looking for it on the Web, as it is not past the kludge phase, and I haven't open-sourced it yet. If anyone who reads this knows of an existing system that can do this, I would be grateful for a quick notification.
[39] This location is not the only one that carries a copy, and subject to rapid change over time.