...
Here are some helpful tips with working with cfengine.
Online documentation
- Reference Manual - Best doc for explaining what functions are built into cfengine
- Tutorial - Goes into theory quickly so I don't think it makes the greatest tutorial but you may find some useful explanations however. Much of it regarding how servers work together has already be integrated into sipXecs, or simply does not apply to how sipXecs uses cfengine.
- Standard cfengine Library - There's a library of utilities we including in sipXecs that are available to you scripts.
How to develop cfengine scripts independently
Like a shell script, many times it makes sense to develop your cfengine script outside of sipXecs. Here is the simplest script you could write, and how you could execute it.
...
Code Block |
---|
cd /var/cfengine/inputs cf-agent -IKvf mytest.cf |
"classes" are just booleans
If you're coming from a programming background, classes usually mean OOP. In cfengine, think of them as booleans or flags you define.
Inside an agent "bundle" you can use any of the following "promise types"
- vars
- classes
- outputs
- interfaces
- files
- packages
- environments
- methods
- processes
- services
- commands
- storage
- databases
- reports
...