Day Against DRM at O'Reilly: 50% discount on "Learning CFEngine 3" and all other ebooks

Today, May 4th, 2012, O'Reilly Media is participating in support of the FSF's Day Against DRM. All O'Reilly ebooks and videos are DRM-free, and to celebrate this, you can get 50% off on any purchase by using the code DRMFREE.

I'm proud to participate. Learning CFEngine 3 is also available as a DRM-free ebook, and you can use this code to get it at half price.

Here's the message from O'Reilly. Find out more at http://shop.oreilly.com/category/deals/day-against-drm.do

In Celebration of *Day Against DRM*

Save 50% on ALL Ebooks & Videos – Use Code: DRMFREE

Having the ability to download files at your convenience, store them on all your devices, or share them with a friend or colleague as you would a print book, is liberating, and is how it should be. If you haven't tried a DRM-free ebook or video, we encourage you to do so now. And if you're already a fan, take advantage of our sale and add to your library. For one day only, you can save 50% on all O'ReillyNo Starch, and Rocky Nook ebooks and videos. Learn more about Day Against DRM

Ebooks from oreilly.com are DRM-free. You get free lifetime access, multiple file formats, free updates. 
Deal expires May 4, 2012 at 11:59pm PT and cannot be combined with other offers.

CFEngine talks at PICC'12 conference

There will be several CFEngine-related classes and talks at the PICC'12 conference (Professional IT Community Conference) on May 11-12th, in New Jersey. I will be talking about using CFEngine as part of your security infrastructure. My colleague Joe Netzel will be talking about migration from CFEngine 2 to CFEngine 3, so if you are using CF2 and have been considering (or dreading) the migration, make sure to come by! Aleksey Tsalolikhin will give an introductory class to CFEngine. And Mark Burgess will give a class not related to CFEngine, but to the perils and skills needed to survive as a technical person in the "business world".

If you are coming to the conference, we look forward to seeing you there!

A full shelf

I got this photo of a bookshelf at the CFEngine office in Palo Alto. Looks awesome, doesn't it? :)

Photo

CFEngine tip #001: Modularize complex policies using methods: calls

Welcome to the new "CFEngine tip" series. In this series of posts I will explore different tips, tricks and techniques for making better use of CFEngine. For now I will post weekly, but the frequency may change as time goes by. If you have any suggestions for topics that I should cover in this series, please let me know!

For our first installment, we will talk about methods: promises, and how they can be used to make policies both clearer and more extensible.

As your CFEngine policies grow in complexity, they become harder to read if all your promises are in a single bundle, or if you split them among bundles, to have all those bundles listed in the bundlesequence declaration.

Enter the methods: promise type. Promises of this type allow you to call other bundles in sequence, passing arbitrary parameters. For example, consider the following example (from Chapter 5 of "Learning CFEngine 3"):

{% gist 2471468 methods_ex1.cf %}

The methods: section makes it very easy to see the sequence of actions that will take place: backup some files, configure sysctl, sshd, inittab and users in sequence. This helps both in clarity and in code reusability: each bundle can perform logically different functionality, and they could potentially be reused in different settings and with different parameters. The promiser string in a methods: promise is an arbitrary string. The CFEngine documentation uses "any", but you can also use it, as in this example, to indicate the purpose of the promise.

Furthermore, you can use CFEngine's implicit looping to create generic promises that will call as many other bundles as necessary. Consider this revised code:

{% gist 2471468 methods_ex2.cf %}

Now the list of bundles to call (edit_sysctl, edit_sshd and edit_inittab) is being built on the fly from the contents of the files array, and used through implicit looping to call the bundles in the methods: promises. Note how you can even pass arguments to these calls. This makes it very easy to extend the functionality by simply adding new elements to the files array (and of course, defining the appropriate edit_* bundle).

Until next time!

New "reviews" page

I have started collecting some of the nice things I have read people say about the book, and put them in the Reviews page. Check it out!

My first batch of print books arrived

I'm visiting Purdue University today to give a talk and to visit old friends and colleagues. And the first box of books arrived here! It's incredible to have the physical book in my hand.

Img_0515

This is the building where I spent most of my grad school years.

Img_0514

The bird on the cover of "Learning CFEngine 3"

A lot of people have asked me about the bird on the cover of the book, and I had to admit I didn't know. Unfortunately, the book (even in the print version) does not include a description of the cover in the Colophon, like most other O'Reilly books. But today I got the information directly from Karen Montgomery at O'Reilly, who designed the cover:

The bird is a Tui, a kind of bird that leaves in New Zealand, also known as a Parson Bird. Here's a photo of a real Tui bird:

Tui_on_flax
(photo by Matt Binns, reused under the Creative Commons Attribution 2.0 Generic license)

CFEngine-related speaking engagements from March 26th-28th, 2012

I will be giving three CFEngine related talks this week. I would love to see you at any one of them!

March 26th - Purdue University, Lawson CS Building 3102, West Lafayette, IN, 1:30PM

"CFEngine 3: Empowering the Next-Generation SysAdmin"

March 27thChicago Devops Meetup, Morningstar, Chicaco, IL, 5:30PM

"CFEngine 3: Empowering the Next-Generation SysAdmin"

March 28thCampIT conference on IT Infrastructure & Operations Management, Chicago, IL, 9:00AM

"Achieving IT Infrastructure and Operational Excellence"

Book status: released!

Cat

I am ecstatic to announce that the book is now officially released! You can get it here: http://shop.oreilly.com/product/0636920022022.do. If you purchased the Early Release version, you should automatically be able to download the final version from your "Your products" page at oreilly.com.

It's been an incredible ride, and it's an incredible feeling to see it come to this big milestone (I won't say "the end", because I know this book will keep evolving).

There have been so many people who helped me through this process, including my editor (Andy Oram), all the staff at O'Reilly, who have been so professional and helpful, my very competent tech reviewers (Mark Burgess and Jesse Becker), all my colleagues at CFEngine AS, all the readers of intermediate and partial versions of the book, all the people who purchased the Early Release, and of course, my lovely wife and my two beautiful daughters, who were so patient while I worked on "the book". Everyone gave me encouragement, incredible feedback, and tons of guidance and support. Thank you everyone!

Book status: print-ready

I am very happy! I got the notification today that the final book draft has been produced and sent to the printer. This means that over the next few days the final version will be available for purchase, both as e-book and in print form. I will of course let you know when this happens.

For now, time to enjoy a relaxing weekend, the first with no book-related work in a long time :)