ansible for devops

Ansible for DevOps is $0.99 for Black Friday/Cyber Monday 2016!

I decided to discount Ansible for DevOps on LeanPub to $0.99 for Black Friday and Cyber Monday. The book has already been purchased by over 8,000 people on Amazon, LeanPub, and the iBooks Store, and is the only book available that covers the latest version of Ansible—and is continuously updated!

I've written a lot about the process of self-publishing, in case you're interested. I'm hoping to keep updating Ansible for DevOps every quarter or so indefinitely, to make it the best resource now—and as long as possible—for learning infrastructure automation!

How I test Ansible configuration on 7 different OSes with Docker

The following post is an excerpt from chapter 11 in my book Ansible for DevOps. The example used is an Ansible role that installs Java—since the role is supposed to work across CentOS 6 and 7, Fedora 24, Ubuntu 12.04, 14.04, and 16.04, and Debian 8, I use Docker to run an end-to-end functional test on each of those Linux distributions. See an example test run in Travis CI, and the Travis file that describes the build.

Ansible Java role - Travis CI Docker-based test results

Self-Publish, don't write for a Publisher

I'm not a writer. I'm a software developer who communicates well. Because I'm a developer and software architect, I spend time evaluating solutions to find the best one. There are often multiple good options, but I try to pick the best among them.

When I chose to write a book two years ago, I evaluated whether to self-publish or seek out a publisher. I spent a lot of time evaluating my options, and chose the self-publishing route.

Because I'm asked about this a lot, I decided to summarize my reasons in a blog post, both to posit why self-publishing is almost always the right option for a beginning author, and to challenge publishers to convince me I'm wrong.

AnsibleFest 2016 Review and Ansible Roles for Fun and Profit video online!

It's been a few weeks since AnsibleFest San Francisco, and Ansible just posted the video recordings of all the sessions from AnsibleFest SF 2016! I was honored to be able to speak about Ansible Roles at this year's west coast AnsibleFest, and I also arrived a little early so I could participate in the Ansible Contributor Conference on July 27.

Ansible Roles - Jeff Geerling presenting at AnsibleFest SF 2016
Picture from my session courtesy of The Appnel Group.

Reintroducing the sanity of CM to container management

Recently, Ansible introduced Ansible Container, a tool that builds and orchestrates Docker containers.

While tools that build and orchestrate Docker containers are a dime a dozen these days (seriously... Kubernetes, Mesos, Rancher, Fleet, Swarm, Deis, Kontena, Flynn, Serf, Clocker, Paz, Docker 1.12+ built-in, not to mention dozens of PaaSes), many are built in the weirdly-isolated world of "I only manage containers, and don't manage other infrastructure tasks."

The cool thing about using Ansible to do your container builds and orchestration is that Ansible can also do your networking configuration. And your infrastructure provisioning. And your legacy infrastructure configuration. And on top of that, Ansible is, IMO, the best-in-class configuration management tool—easy for developers and sysadmins to learn and use effectively, and as efficient/terse as (but much more powerful than) shell scripts.

From Ansible Container's own README:

Ansible for DevOps - available now!

Ansible is a simple, but powerful, server and configuration management tool. Ansible for Devops is a book I wrote to teach you to use Ansible effectively, whether you manage one server—or thousands.

Ansible for DevOps cover - Book by Jeff Geerling

I've spent a lot of time working with Ansible and Drupal over the past couple years, culminating in projects like Drupal VM (a VM for local Drupal development) and the Raspberry Pi Dramble (a cluster of Raspberry Pi computers running Drupal 8, powering I've also given multiple presentations on Ansible and Drupal, like a session at DrupalCon Austin, a session at MidCamp earlier this year, and a BoF at DrupalCon LA.

$25K in book sales, and I'm almost ready to publish

I started writing my first book almost two years ago. At the beginning of the project, I set an ambitious goal: Write a 90-page introductory-level technical book on some relatively new software, and sell 200 copies.

As a developer and dabbling entrepreneur, I calculated that if I sold the book for around $10-20, and wrote the book based on real-world scenarios I'd already encountered (meaning very little extra research/discovery required), I could make enough money to keep things interesting while helping a few hundred developers pick up the new software more quickly.

Almost two years later, Ansible for DevOps is almost 400 pages long and has sold over 2,000 copies—and I haven't yet published the book.

Books sold per month

What follows is an analysis of what led to this success, and some cautions for those considering writing a book.

Simple GlusterFS Setup with Ansible

The following is an excerpt from Chapter 8 of Ansible for DevOps, a book on Ansible by Jeff Geerling.

Modern infrastructure often involves some amount of horizontal scaling; instead of having one giant server, with one storage volume, one database, one application instance, etc., most apps use two, four, ten, or dozens of servers.

GlusterFS Architecture Diagram

Many applications can be scaled horizontally with ease, but what happens when you need shared resources, like files, application code, or other transient data, to be shared on all the servers? And how do you have this data scale out with your infrastructure, in a fast but reliable way? There are many different approaches to synchronizing or distributing files across servers:

Creating custom dynamic inventories for Ansible

The following is an excerpt from Chapter 7 of Ansible for DevOps, a book on Ansible by Jeff Geerling.

Most infrastructure can be managed with a custom inventory file or an off-the-shelf cloud inventory script, but there are many situations where more control is needed. Ansible will accept any kind of executable file as an inventory file, so you can build your own dynamic inventory however you like, as long as you can pass it to Ansible as JSON.

You could create an executable binary, a script, or anything else that can be run and will output JSON to stdout, and Ansible will call it with the argument --list when you run, as an example, ansible all -i my-inventory-script -m ping.

Let's start working our own custom dynamic inventory script by outlining the basic JSON format Ansible expects:


Subscribe to RSS - ansible for devops