Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here are some helpful tips with working with cfengine.

Online documentation

  1. Reference Manual - Best doc for explaining what functions are built into cfengine
  2. 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.
  3. 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"

  1. vars
  2. classes
  3. outputs
  4. interfaces
  5. files
  6. packages
  7. environments
  8. methods
  9. processes
  10. services
  11. commands
  12. storage
  13. databases
  14. reports

...