Thursday, March 28, 2013

What does cfengine Bootstrapping mean?


Cfengine bootstrapping means/servers the purpose of: 

1.  Starting/configuring cf-agent so that it runs automatically in every few minutes
2.  The agent connects to the defined policy server to get the updated policy files. 

Here is how you bootstrap cf-agent. 

cf-agent --bootstrap --policy-server=<ip_of_your_policy_distribution_server>

The above command when executed will start cf-agent to run in every 5 minutes to get the policy files from the policy server that you have given above and implement those policies. 

If you are configuring a machine to be used as a policy distribution server then all you need to do is use its own IP and it will give you proper messaging like "R: This host assumes the role of policy distribution host". 

Once the bootstrapping is over, you will notice that cf-execd and cf-serverd are running. 

See for example output: 


ps axw | grep "cf-"

  951 ?        Ss     0:00 /var/cfengine/bin/cf-execd
  957 ?        Ss     0:00 /var/cfengine/bin/cf-serverd


The agent machines will copy the policy files from your policy distribution servers /var/cfengine/masterfiles/ directory to /var/cfengine/inputs directory. 

No comments:

Post a Comment