cluster:Cfengine/302

From Dgiref
Jump to: navigation, search

Contents

Introduction

Common information

Logo2-small.png Cfengine is an automated suite of programs for configuring and maintaining Unix-like computers. The idea of cfengine is to create a single set of configuration files which describe the setup of all hosts on the network and a configuration policy that is deployed over a network. In a typical setup, Cfengine runs on every host, retrieves configuration data from the master server, and applies changes as needed.

Cfengine is a relatively simple platform to implement the hard cluster configuration management problem. Cluster hosts are associated with autonomous agents and communication between them is based on the common configuration platform. There are some tasks which can be solved with cfengine:

  • manages files or directories rights, their content
  • distribute files
  • install, remove, update software
  • manage users
  • run executable scripts

To get things done cfengine uses the administrator-defined configuration templates (or configuration policies). From this view, the software itself is working as the configuration platform or "a configuration manager". Every host in the cluster with installed cfengine package is managed by the configuration manager. The management itself declared as a set of logically grouped policies, and each host implements a subset from the whole policies.

The cfengine can work as a maintenance tool to setup a complete host or a set of software associated with the host. The policies to manage maintenance are grouped into tasks in the reference installation. Thus, there is site, os, app groups of tasks. The current set of cfengine policies can be found into the reference installation codebase repository.


Package:    cfengine v. 3.0.2
 os:             Scientific Linux version 5.6 64 bit
 server:        dgiref-batch.fzk.de
 manuals:  cf3 agent


Archive links
Information links
Download links
Guidelines links
Tutorials links


cf3 syntax

The syntax of Cfengine files is relatively simple and somewhat Perl like. However, Cfengine tends to be more sensitive to white space.

  • Sections are contained withing brackets.
  • Commas separate parts of the same action.
  • Actions are ended with a semicolon.
  • Body part lines end with semicolons.
  • Variables are identified by $ and usually contained in brackets to separate them from surrounding text.
  • Most user defined information is contained within double quotations.
  • Comments begin with # or can be included in the promise so that Cfengine will print them during a run (comment => "My comment").

Directories and files

See also troubleshooting for this page.


Please open a NGI-DE ticket if you experience any Installation or Configuration problem.

cfengine v.3.0.4

Prepare

Strictly speaking, the cfengine software do not use a client-server model. It can be named as an agent-server model, where server is an agent, installed into the master host. The reference installation configuration are stored into the subversion (svn) repository of Karlsruhe Institute of Technology. Thus, some preparation steps include:

Firewall configuration

Port 5308 should be open (how to open port in firewall).

Install

The following step is needed to install a cfengine agent (execute as root user):

Note-icon.png
  
use yum or rpm to install cfengine masterhost from http://mirror.scc.kit.edu/downloads/

Configure

To configure the cfengine v.3 agent, the following steps should be done:

  1. download the cf3.preconf from codebase repository into cfengine directory /var/cfengine/
  2. change mode to executable and execute /var/cfengine/cf3v.preconf bash script.
  3. configure the site by changing the parameters in the /var/cfengine/masterfiles/inputs/library/variables.cf
  4. run cf-agent to constrain cfengine master host configuration

Proceed

To run the agent use the cf-agent command.

Initial test

Examine the output for the cf-agent or test the individual promise with cf-promise promise.name

Update

Use yum update/remove to update or remove the package.

Personal tools