New Book: CFEngine 3 Beginner's Guide

Posted by Mahesh Kumar
December 2, 2011

***Editor’s Note: Packt Publishing has just come out with a new title, “The CFEngine 3 Beginner’s Guide”. In this guest blog, the book’s author, Rajneesh, gives an overview of the subject, his motivations, and its intended audience. *

The publisher kindly offers blog readers access to a free e-chapter and a discount for purchasing the book.

[The opinions expressed in this blog are the writer’s own. CFEngine AS does not endorse or validate its content.]

CFEngine 3 Beginner’s Guide

About the book**

CFEngine 3 Beginner’s Guide is the only book dedicated to CFEngine 3, as of now. It covers all the aspects of installing, configuring and using CFEngine 3. I have tried to build this book upon tasks which System Engineers or System Administrators or anyone maintaining large or small heterogeneous networks perform on a daily basis. The effort we put in maintaining a sane state of systems is huge and CFEngine 3 is one such framework which may be used to make our lives easier. The book starts with examples for automating small day to day tasks such as configuring virtual IP addresses on the NIC, checking status of services and moves on to configuring and auditing the systems. As we move on we see how CFEngine may be used for monitoring systems and applications. I have also tried to explain how CFEngine may be used for reading logs and alerting if there is an anomalous system state. The last sections of the book dive into configuring your cloud infrastructure and the best practices. I have also included a small section of the CFEngine ‘Nova’ the enterprise version of CFEngine which provides enhanced monitoring, visualization and configuration utilities. All throughout the book, I have tried to explain the philosophy of ‘convergence’ which forms the base of CFEngine.

What you will learn from this book?

The book is organized in a way so that, you learn installation, configuration and usage of CFEngine in a step-by-step manner. After going through the first two chapters you will be ready to install and configure CFEngine server and client. Post this, the third chapter dives into using CFEngine for system audits. Further chapters deal with various other aspects of System life cycle management where CFEngine may ease our job. Few such aspects are

1. Security Audit or maintaining a “secure” system state.

2. Using CFEngine as an advanced task scheduler.

3. Logging and reporting using CFEngine

4. Using CFEngine in advanced workflows to execute independent or interdependent tasks.

After you learn how CFEngine may help us in complete system life cycle management, you will try to standardize a lot of such tasks and this is where the chapter on best practices is handy. It lists a few of the easy to follow best practices such as use of generic templates, use of a version control system, using CFEngine inbuilt functions and variables etcetera which help CFEngine to perform optimally. Apart from this I have also listed a few points to be considered while writing the promises so that they are easily understood by the team.

Who is this book is written for?

I am sure the book will be useful for System Engineers and System Administrators who deal with a large number of systems on a regular basis. There are a lot of tasks which are repetitive and need to be performed on a large number of systems simultaneously or in an order - CFEngine can take care of both. We may execute tasks simultaneously or in an order using CFEngine. The book is also useful for folks who maintain the standard stack for all the hosts in a network. They may use the CFEngine framework not only to deploy the standard stack on large number of hosts but also to audit the hosts and check for anomalies. The framework is so powerful that it may be extended to perform all sorts of automation tasks, one such example is - backup administrators may configure backups using the CFEngine framework.

Why did I want to write this book?

When I started using CFEngine 2 a few years back and found it very useful. Although, version 2 had its own set of limitations, it served my purpose. And then came out the all new CFEngine 3 with loads of changes, functions and variables and learning it was again an uphill task. While I was going through the learning curve, I always looked out for literature which may help me understand the basics and the usage with easy to follow examples and explain the “whys” and “hows” of the CFEngine promises. The CFEngine documentation is a very good source but again the information was scattered and you needed to search for it. I wanted the information, easy to understand examples, functions, promises, and variables to be available at one place. The thought of gathering the information, topping it up with my own experiences and making it available to all who are new to CFEngine or are using CFEngine was always there on my mind. Finally, with the help of Packt publishing, I was able to give shape to the thought in the form of this book.

Hope you like the effort.

Get 15% off!

Packt Publishing is offering a 15% discount to any Yahoo! Developer Blog reader, and the book is available in both eBook and traditional formats. To receive your discount, simply purchase CFEngine 3 Beginner’s Guide through Packt Publishing, and provide the code CFENGINE15**** at checkout. (Note: customer must be logged in for code to work)

Want a Sample?

To help you get a feel for the content provided within this book, Packt is generous enough to provide sample content of what you can expect from reading this book:

Security Audit with CFEngine