Recent Blog Posts

Review: Nikon Z50

I've been shooting Nikon DSLRs since the D40 came out, and currently shoot with D700 and D750 FX bodies which have served me well for years.

In the past, I've rented a Z6—Nikon's first foray into pro-level mirrorless cameras—for a couple events, and I also own a Sony a6000 and have rented a Sony A7iii for a couple events. I have been very interested in the relentless march of technology in photography. From a couple old nice film bodies I started with, to the earliest digital cameras which had terrible IQ but the ability to instantly review and share photos, to DSLRs which quickly surpassed the quality of 35mm film photography, it has been an eventful 25 years.

Ansible for Kubernetes, my second self-published book

Ansible for Kubernetes book cover - by Jeff Geerling

Five years ago, I set out to write a book. For a topic, I picked Ansible, since I was familiar with the software, and noticed there weren't any other books about it. I struck gold with Ansible for DevOps, and have since sold over 22,000 copies between eBook and paperback copies.

I've written about self-publishing before, and my opinion about publishing technical works is stronger than ever:

Debugging networking issues with multi-node Kubernetes on VirtualBox

Since this is the third time I've burned more than a few hours on this particular problem, I thought I'd finally write up a blog post. Hopefully I find this post in the future, the fourth time I run into the problem.

What problem is that? Well, when I build a new Kubernetes cluster with multiple nodes in VirtualBox (usually orchestrated with Vagrant and Ansible, using my geerlingguy.kubernetes role), I get everything running. kubectl works fine, all pods (including CoreDNS, Flannel or Calico, kube-apiserver, the scheduler) report Running, and everything in the cluster seems right. But there are lots of strange networking issues.

Sometimes internal DNS queries work. Most of the time not. I can't ping other pods by their IP address. Some of the debugging I do includes:

Another year, another Crohn’s hospitalization

Being in the hospital with Crohn’s disease is miserable.

But before I get too negative, I have to confirm one major benefit to having an ostomy and being hospitalized: it’s a lot easier to give stool samples now. I don’t even need a toilet!

Anyways, while a lot of us who have chronic diseases often laugh it off or put on a happy face, and post to our social media accounts, it’s a slog. It’s not fun. You think long and hard and try anything and everything to avoid a hospitalization—and sometimes the stress you get from that makes the situation even worse!

How to idempotently change file attributes (e.g. immutable) with Ansible

I recently needed to force the /etc/resolv.conf file to be immutable on a set of CentOS servers, since the upstream provider's DHCP server was giving me a poorly-running set of default DNS servers, which was getting written to the resolv.conf file on every reboot.

There are a few different ways to force your own DNS servers (and override DHCP), but one of the simplest, at least for my use case, is to change the file attributes on /etc/resolv.conf to make the file immutable (unable to be overwritten, e.g. by the network service's DHCP on reboot).

Typically you would do this on the command line with:

chattr +i /etc/resolv.conf

And Ansible's file module has an attributes (alias: attr) parameter which allows the setting of attributes. For example, to set the attributes to i, you would use a task like:

Drupal VM 5.1 ('Recognizer') brings PHP 7.4 support

PHP 7.4.0 running on Drupal VM with Drupal 8's status report page

Drupal VM 5.1.0 was just released (release name Recognizer), and the main feature is PHP 7.4 support; you can now begin running and testing your Drupal sites under PHP 7.4 to check for any incompatibilities.

PHP 7.4 includes some new features like typed properties, arrow functions, and opcache preloading which could help with certain types of code or site deployments (I'm interested to see if opcache preloading could help the startup time of Drupal inside container environments like Kubernetes!).

Pages

Subscribe to Jeff Geerling's Blog