ansible

Podcast interview with Len Epp on the LeanPub podcast

Today LeanPub published it's 25th episode of the LeanPub Podcast, and in it, Len Epp asked me about a wide range of topics, including AI, the impact of smartphones on interpersonal relationships, how I got started in computing, and how I self-published a bestseller, Ansible for DevOps, on LeanPub.

A few decent quotes from the interview:

[On how I learned technical/tutorial writing:] Go sit down, sit through all the tutorials, and then write up a guide that will help people to quickly get up to speed on it”. Because the manuals you get with the manufacturer are pretty much junk.

As a technical person I hate the idea of DRM on a book. Because it’s like, when I go to a bookstore and buy a book, I don’t have like a locking mechanism that I have to unlock to read it.

Use Vagrant 1.8's new ansible_local provisioner for Ansible provisioning

I build a lot of local development VMs in a typical week, and need to support Ansible provisioning on Mac, Linux, and Windows workstations (with or without Ansible installed)—Vagrant 1.8.0 was an early Christmas gift for me!

In the past, when I wanted to build a Vagrantfile to provision a VM using an Ansible playbook, I added the following, which used the JJG-Ansible-Windows shell script to install Ansible inside the VM, install role dependencies, and run a given Ansible playbook:

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 http://www.pidramble.com/). 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.

Finished writing my first book, Ansible for DevOps

After almost two years of writing, editing, and rewriting my book, I've finally completed the first edition of Ansible for DevOps, and it's available for sale on Amazon, LeanPub, and iTunes!

Ansible for DevOps cover - book on Ansible by Jeff Geerling

The book is 400 pages long, just shy of 80,000 words, and was a huge effort. It's such a relief to finally have it 'out the door', though publishing-as-I-write has been a great experience. Pre-first-edition, I've already sold over 2,200 copies of Ansible for DevOps on LeanPub!

Here are a few blog posts from Server Check.in where I describe more of the publication process:

$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.

New features in Ansible 2.0: Blocks

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

Introduced in Ansible 2.0.0 (still in active development, currently in alpha), Blocks allow you to group related tasks together and apply particular task parameters on the block level. They also allow you to handle errors inside the blocks in a way similar to most programming languages' exception handling.

Here's an example playbook that uses blocks with when to run group of tasks specific to one platform without when parameters on each task:

Nginx Load Balancer Visualization on a Raspberry Pi Cluster

After some more tinkering with the Raspberry Pi Dramble (a cluster of 6 Raspberry Pis used to demonstrate Drupal 8 deployments using Ansible), I finally was able to get the RGB LEDs to react to Nginx accesses—meaning every time a request is received by Nginx, the LED toggles to red momentarily.

This visualization allows me to see exactly how Nginx is distributing requests among the servers in different load balancer configurations. The default (not only for Nginx, but also for Varnish, HAProxy, and other balancers) is to use round-robin distribution, meaning each request is sent to the next server. This is demonstrated first, in the video below, followed by a demonstration of Nginx's ip_hash method, which pins one person's IP address to one backend server, based on a hash of the person's IP address:

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:

Teaching Ansible with six Raspberry Pis

Originally posted on the Server Check.in blog:

Over the course of this year, I've acquired six Raspberry Pi model 2 B computers, and configured them in a cluster (or 'bramble') so I can use them to test different infrastructure configurations, mostly for running Drupal 8. All the Ansible playbooks and instructions for building the cluster are available on the GitHub project page for the Raspberry Pi Dramble. [...]

The video demonstrates Ansible's simple and powerful model of SSH-based infrastructure management visually. It's been a lot of fun building the Dramble and hacking both the hardware and the software to make this presentation possible!

And the video, Ansible 101 - on a cluster of Raspberry Pi 2s: