nema5pic
vi-hell
clippie

CFEngine

101

A centralized configuration management tool, with similar purpose like Puppet, Chef. But quite different modeling mechanism. Optimist view: Don't repeat, do things once. Pessimist view: it is an error replicator at high speed. ie. Be careful what you do, there is no roll back feature build in. There is no undo per se. Fixing is really adding new rule to check for the error and apply another change.


Syntax


space matters.  
!FileExists works.   ! FileExists (ie with a space after !) don't!
function(...)  is good.  don't add spaces around ( ) !!


class1|class2			| = or
condition1.condition2		. = AND
class1.cond1|class2.cond1	AND preceds OR
(class1|class2).cond1		( ) does NOT alter the conditions... mixed success.... sometime it is taken verbatim as part of name??
(class1.cond1|cl2.cond2).cond3	this seems to have worked under shellcommands: clause  (or maybe it didn't work which is why it was commented out.
				there is no real diff b/w class1 vs cond1... ie, they are just grp definitions.



Process clause

processes:
	# only check for running process for host with the group named "uge_exechost"
        uge_exechost::
        	# run a ps -ef, see if it match the quoted line below
                "/opt/gridengine/bin/lx-amd64/sge_execd"
			# if not, run the command in the restart in the line below
                        restart "/sbin/service sgeexecd.ugemaster start"
ref: https://cfengine.com/archive/manuals/cf-manuals/cf2-Reference#processes

Commands/Troubleshooting

cfexecd -F in cron save files in /var/cfengine.


    



See also

puppet








Copyright info about this work

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike2.5 License. Pocket Sys Admin Survival Guide: for content that I wrote, (CC) some rights reserved. 2005,2012 Tin Ho [ tin6150 (at) gmail.com ]
Some contents are "cached" here for easy reference. Sources include man pages, vendor documents, online references, discussion groups, etc. Copyright of those are obviously those of the vendor and original authors. I am merely caching them here for quick reference and avoid broken URL problems.



Where is PSG hosted these days?