This quick start guide is based on my understanding CFEngine concepts & working.
I've tried to make it as understandable & precise as I could.
CFEngine is a configuration management & automation
tool that has been around since the 90s.
It works on a variety of UNIX platforms as well as
Windows.
Some of its features are:
Ensures systems have self-healing capabilities.
Convergence of systems to reach a desired state of
configuration
Some low level examples include:
- Build new nodes
- Deploy & manage services & applications
- Managing databases
- Manage ACLs
Components of CFEngine:
Cf-agent
Cf-monitord
Cf-execd
Cf-serverd
Promise Theory:
A Model of voluntary
cooperation between individual agents who publish their intentions to one
another in the form of promises.
Files & processes can
make promises about their contents.
A process can make a
promise to be in running state but cannot make a promise regarding its
configuration.
Anatomy of a promise:
type:
context::
"promiser" -> "promisee"
attribute => "value";
In the above example:
type can be files or commands.
context is a condition deciding where & when to execute the promise.
promiser is the file or process making the promise.
attribute details & constrains a promise.
Bundles:
A bundle is a logical grouping of promises that are written with the aim of achieving a common end goal. For example promises written to install, configure & start MySQL.
Anatomy of a bundle:
bundle type name{
type;
context::
"promiser" -> "promisee"
attribute => "value";
}
Bundles apply to the binary that executes them. Agent bundles apply to cf-agent.
Body:
A body is a collection of attributes.
Anatomy of a body:
body type name{
attribute1 => "value";
attribute2 => "value";
}
In a body every attribute ends with a semi colon.
The components discussed above come together in the form of a plain text file with .cf extension called a policy.
No comments:
Post a Comment