Using cfengine to centralize administration

This is section from my web pages Musings/Experiments With A Virtual Data Center

cfengine is a tool for centralizing the installation and configuration of host or servers. For more information about cfengine see cfengine.org.

One of my major focuses of this project is to learn about cfengine. My goal is to try and use cfengine to drive the installation and configuration of the servers. Basically what I think I want to do for each application is configure cfengine to install the application on the correct servers and then configure it for the servers in each data center.

The first three steps are:

  • Get cfengine running in a minimal configuration mode
  • Install a yum repository so that I can install software over the network
  • Configure cfengine to install basic packages on all servers

The basic cfengine configuration

The basic cfengine configuration requires:
  • update.conf: A simple configuration to copy over the first configurations
  • cfagent.conf: The initial cfagent configuration
  • cfservd.conf: The initial cfservd configuration.

All three of these were based on examples in the documentataion.

update.conf

The update.conf basically copies over the files in /masterfiles/cfengine/inputs and /masterfiles/cfengine/bin directories to the local /var/cfengine directory. It also allows trusted keys from the master cfengine server. This is to get the initial cfengine master server's public key to the local cfengine client. Not a lot to start with

Here is my original update.conf file.

cfagent.conf

The cfagent.conf file is the the update.conf file without the TrustKeysFrom statement.

Here is my original cfagent.conf file.

cfservd.conf

The cfservd.conf basically allows trusted access from the local networks and allows access to files in the /masterfiles directory on the server.

Here is my original cfservd.conf file.