Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Learning CFEngine 3
Foreword
Preface
Who Is This Book For?
Overview of the Book
Online Resources
Conventions Used in This Book
Using Code Examples
Safari® Books Online
How to Contact Us
Content Updates
September 2013 (third release)
November 2012 (second release)
Acknowledgments
1. Introduction
How to Achieve Automation
Home-Grown Scripts
Specialized Tools for Automation
Why CFEngine?
A Brief History of CFEngine
Versions of CFEngine
2. Getting Started with CFEngine
Installing CFEngine
Which Version of CFEngine?
Installing the Community Edition from Source
Compiling on Linux
Compiling on Mac OS X
Compiling on Windows with cygwin
Installing the Community Edition from Binary Packages
Installing the Commercial Edition
Finishing the Installation and Bootstrapping
Auxiliary Files
Your First CFEngine Policy
Integrating Your New Policy Into Periodic CFEngine Execution
3. CFEngine Basics
Basic Principles
Desired-State Configuration
Basic CFEngine Operations
Promise Theory
Convergent Configuration
CFEngine Components
A First Example
CFEngine Policy Structure
Data Types and Variables in CFEngine
Variable declarations
Strings
Numbers
Lists
Arrays
Classes and Decision Making
Bundles, Bodies, and Namespaces
Bundles
Bodies
Namespaces
Normal Ordering
Looping in CFEngine
Thinking in CFEngine
Clients and Servers
CFEngine Server Configuration
Updating Client Files from the Server
CFEngine Remote Execution Using cf-runagent
CFEngine Information Resources
Manuals and Official Guides
CFEngine Standard Library
CFEngine Solutions Guide
CFEngine Design Center
Community Forum and IRC channel
CFEngine Bug Tracker
Other Community Resources
Recommended Reading Order
4. Using CFEngine
Initial System Configuration
Running These Policies
Editing /etc/sysctl.conf
Editing /etc/sshd_config
Editing /etc/inittab
Configuration Files with Variable Content
Class-based configuration
System-state-based configuration
User Management
Software Installation
Package-Based Software Management
Manual Software Management
Using CFEngine for Security
Policy Enforcement
Template-based login banners
Password expiration periods
Security Scanning
Additional CFEngine Features and Information
5. The CFEngine Design Center
Getting Started with the Design Center
Installing cf-sketch
Exploring cf-sketch
Exploring Existing Sketches
Peeking Under the Hood
Contributing to the Design Center
Learning More About the Design Center
6. CFEngine Tips, Tricks, and Patterns
Hierarchical Copying
Passing Name-Value Pairs to Bundles
Setting Default Values for Bundle Parameters
Using Classes as Configuration Mechanisms
Generic Tasks Using Lists and Array Indices
Defining Classes for Groups of Hosts
Controlling Promise Execution Order
Dynamic Loading and Execution
Per-File Inputs
Dynamic bundle execution control
7. Advanced Topics
Setting Up Multiple CFEngine Environments
Using a Version-Control System to Separate Environments
Flow of Development and Deployment
CFEngine Testing
Behavioral Testing for CFEngine Policies
Unit Testing for CFEngine Policies
Using Vagrant with CFEngine
Service Management Using CFEngine
Basic Concepts of Service Management with CFEngine
Defining Your Own Service Management Mechanisms
Where to from Here?
A. Editing CFEngine 3 Configurations in Emacs
Setting Up
Using the cfengine Mode
Customizing Indentation in cfengine-mode
B. Editing CFEngine 3 Configurations in Vim
Setting Up
Getting Help
Using the Plugin
Hacking the vim_cf3 Plugin
Abbreviations
Maps
Installing vim_cf3 Using CFEngine
C. CFEngine 3.5.2 Agent Promise Attributes
Attributes of Promises Common to All CFEngine Components
Attributes of “classes” Promises
Attributes of “defaults” Promises
Attributes of “meta” Promises
Attributes of “reports” Promises
Attributes of “vars” Promises
Attributes that Can Be Used in Any Promise
Attributes of Promises Specific to the Agent
Attributes of “commands” Promises
Attributes of “databases” Promises
Attributes of “guest_environments” Promises
Attributes of “files” Promises
Attributes of Promises in edit_line Bundles
Attributes of Any Promises in edit_line Bundles
Attributes of “delete_lines” promises in edit_line bundles
Attributes of “insert_lines” Promises in edit_line Bundles
Attributes of “field_edits” Promises in edit_line Bundles
Attributes of “replace_patterns” Promises in edit_line Bundles
Attributes of Promises in edit_xml Bundles
Attributes of any promises in edit_xml bundles
Attributes of “build_xpath” Promises in edit_xml Bundles
Attributes of “delete_tree” Promises in edit_xml Bundles
Attributes of “insert_tree” Promises in edit_xml Bundles
Attributes of “delete_attribute” Promises in edit_xml Bundles
Attributes of “set_attribute” Promises in edit_xml Bundles
Attributes of “delete_text” Promises in edit_xml Bundles
Attributes of “set_text” Promises in edit_xml Bundles
Attributes of “insert_text” Promises in edit_xml Bundles
Attributes of “methods” Promises
Attributes of “packages” Promises
Attributes of “processes” Promises
Attributes of “services” Promises
Attributes of “storage” Promises
Control
Common Control
Agent Control
File Control
About the Author
Colophon
Copyright
← Prev
Back
Next →
← Prev
Back
Next →