Use the "Documentation" category when you create bugs. And of course you can search the bug tracker for known issues with the documentation, and help the community of CFEngine users by correcting some of them. Writing Documentation The CFEngine documentation is written in regular markdown , with some extensions as documented below. Check out the cheatsheet!
|Country:||Republic of Macedonia|
|Published (Last):||13 October 2009|
|PDF File Size:||1.60 Mb|
|ePub File Size:||8.37 Mb|
|Price:||Free* [*Free Regsitration Required]|
Become an author Introduction If you are looking for a fast and highly scalable configuration management tool for your IT infrastructure, you should give CFEngine a try. Though the functionality it offers is quite similar to that offered by other popular tools such as Puppet and Chef, CFEngine has a much smaller footprint, both in terms of memory and CPU utilization, and is generally faster because it is written in C and thus runs natively on the OS. Prerequisites Before you begin, you should have access to: A server running Ubuntu Note: If you want to manage multiple machines using your Ubuntu server, you will have to repeat steps 1, 2, and 3 on each of the machines.
However, in Step 4, to configure the machines as just clients, you should bootstrap them with the IP address of your current Ubuntu server i. The language has a rather steep learning curve, but performing basic tasks with it is easy. Use nano or your favorite text editor to create a new file called myPolicy. Bundles can be of different types. For now, you will be creating a bundle that cf-agent can fun.
To print a message to the console, the reports promise should be used. Accordingly, add the following code to the file: myPolicy. You can now run your policy using the cf-agent command.
Step 6 — Adding a Policy to the Policy Server In the previous step, you ran the policy manually using the cf-agent command. To run the policy automatically — and, more importantly, on multiple machines — you should add it to the policy server. By default, policies added to the server are executed once every 5 minutes by cf-agent.
Use nano or your favorite text editor to create a new file called createFilePolicy. The following policy creates an empty file named hello. Add the following code to the policy: createFilePolicy. Therefore, copy createFilePolicy. Use nano to edit promises. After the changes, the list should look like this: promises. Additionally, the name of the bundle in your policy file should be mentioned in the bundlesequence list toward the top of the file.
Add CreateHelloFile as the last item of bundlesequence: promises. Save the file and exit. Your policy has now been added to the policy server, and will be run every five minutes.
If you want to remove the policy, you should first delete the name of the bundle and the name of the policy file from promises. You also learned how to create and run simple policies, both manually and automatically.
You can now use CFEngine to manage the configuration of your server.
CFEngine Tutorial - Draft