Cover image for Learning CFEngine 3

Book description

Get up to speed on CFEngine 3, the open source configuration management software that enables you to automate everything from one-server shops to enterprise computer networks. This hands-on introduction shows you how to use CFEngine 3 to implement and manage and your IT infrastructure in a sustainable, scalable, and efficient manner.

Table of Contents

  1. Learning CFEngine 3
  2. Foreword
  3. Preface
    1. Who Is This Book For?
    2. Overview of the Book
    3. Online Resources
    4. Conventions Used in This Book
    5. Using Code Examples
    6. Safari® Books Online
    7. How to Contact Us
    8. Content Updates
      1. November 9, 2012
    9. Acknowledgments
  4. 1. Introduction
    1. How to Achieve Automation
      1. Home-Grown Scripts
      2. Specialized Tools for Automation
    2. Why CFEngine?
    3. A Brief History of CFEngine
    4. Versions of CFEngine
  5. 2. Getting Started with CFEngine
    1. Installing CFEngine
      1. Installing the Community Edition from Source
        1. Compiling on Linux
        2. Compiling on Mac OS X
        3. Compiling on Windows with cygwin
      2. Installing the Community Edition from Binary Packages
      3. Installing the Commercial Edition
    2. Finishing the Installation and Bootstrapping
    3. Auxiliary Files
    4. Your First CFEngine Policy
  6. 3. CFEngine Basics
    1. Basic Principles
      1. Desired-State Configuration
      2. Basic CFEngine Operations
      3. Promise Theory
      4. Convergent Configuration
    2. CFEngine Components
    3. A First Example
    4. CFEngine Policy Structure
      1. Data Types and Variables in CFEngine
        1. Variable declarations
        2. Strings
        3. Numbers
        4. Lists
        5. Arrays
      2. Classes and Decision Making
      3. Containers
        1. Bundles
        2. Bodies
      4. Normal Ordering
      5. Looping in CFEngine
      6. Thinking in CFEngine
    5. Clients and Servers
      1. CFEngine Server Configuration
      2. Updating Client Files from the Server
      3. CFEngine Remote Execution Using cf-runagent
    6. CFEngine Information Resources
      1. Manuals and Official Guides
      2. CFEngine Standard Library
      3. CFEngine Solutions Guide
      4. CFEngine Design Center
      5. Community Forum and IRC channel
      6. CFEngine Bug Tracker
      7. Other Community Resources
      8. Recommended Reading Order
  7. 4. Using CFEngine
    1. Initial System Configuration
      1. Editing /etc/sysctl.conf
      2. Editing /etc/sshd_config
      3. Editing /etc/inittab
      4. Configuration Files with Variable Content
        1. Class-based configuration
        2. System-state-based configuration
    2. User Management
    3. Software Installation
      1. Package-Based Software Management
      2. Manual Software Management
    4. Using CFEngine for Security
      1. Policy Enforcement
        1. Login banners
        2. Password expiration periods
      2. Security Scanning
  8. 5. CFEngine Tips, Tricks, and Patterns
    1. Hierarchical Copying
    2. Passing Name-Value Pairs to Bundles
    3. Setting Default Values for Bundle Parameters
    4. Using Classes as Configuration Mechanisms
    5. Generic Tasks Using Lists and Array Indices
    6. Defining Classes for Groups of Hosts
    7. Controlling Promise Execution Order
  9. 6. Advanced Topics
    1. Setting Up Multiple CFEngine Environments
      1. Using a Version-Control System to Separate Environments
      2. Flow of Development and Deployment
    2. CFEngine Testing
      1. Behavioral Testing for CFEngine Policies
      2. Unit Testing for CFEngine Policies
    3. Where to from Here?
  10. A. Editing CFEngine 3 Configurations in Emacs
    1. Setting Up
    2. Using the cfengine Mode
    3. Customizing Indentation in cfengine-mode
  11. B. Editing CFEngine 3 Configurations in Vim
    1. Setting Up
    2. Getting Help
    3. Using the Plugin
    4. Hacking the vim_cf3 Plugin
      1. Abbreviations
      2. Maps
    5. Installing vim_cf3 using CFEngine
  12. About the Author
  13. Copyright