Running Drupal in Kubernetes with Docker in production

Update: Since posting this, there have been some interesting new developments in this area, for example:

Since 2014, I've been working on various projects which containerized Drupal in a production environment. There have always been a few growing pains—there will for some time, as there are so few places actually using Docker or containers in a production environment (at least in a 'cloud native' way, without tons of volume mounts), though this is changing. It was slow at first, but it's becoming much more rapid.

Monitoring Kubernetes cluster utilization and capacity (the poor man's way)

If you're running Kubernetes clusters at scale, it pays to have good monitoring in place. Typical tools I use in production like Prometheus and Alertmanager are extremely useful in monitoring critical metrics, like "is my cluster almost out of CPU or Memory?"

But I also have a number of smaller clusters—some of them like my Raspberry Pi Dramble have very little in the way of resources available for hosting monitoring internally. But I still want to be able to say, at any given moment, "how much CPU or RAM is available inside the cluster? Can I fit more Pods in the cluster?"

So without further ado, I'm now using the following script, which is slightly adapted from a script found in the Kubernetes issue Need simple kubectl command to see cluster resource usage:

Usage is pretty easy, just make sure you have your kubeconfig configured so kubectl commands are working on the cluster, then run:

Kubernetes' Complexity

Over the past month, I started rebuilding the Raspberry Pi Dramble project using Kubernetes instead of installing and configuring the LEMP stack directly on nodes via Ansible (track GitHub issues here). Along the way, I've hit tons of minor issues with the installation, and I wanted to document some of the things I think turn people away from Kubernetes early in the learning process. Kubernetes is definitely not the answer to all application hosting problems, but it is a great fit for some, and it would be a shame for someone who could really benefit from Kubernetes to be stumped and turn to some other solution that costs more in time, money, or maintenance!

Raspberry Pi Dramble cluster running Kubernetes with Green LEDs

Raspberry Pi microSD card performance comparison - 2018

Raspberry Pi microSD cards Noobs Samsung Kingston Toshiba Sony SanDisk SD SBC

Back in 2015, I wrote a popular post comparing the performance of a number of microSD cards when used with the Raspberry Pi. In the intervening three years, the marketplace hasn't changed a ton, but there have been two new revisions to the Raspberry Pi (the model 3 B and just-released model 3 B+). In that article, I stated:

One of the highest-impact upgrades you can perform to increase Raspberry Pi performance is to buy the fastest possible microSD card—especially for applications where you need to do a lot of random reads and writes.

Interview with Cal Evans on Voices of the elePHPant

A few months ago, when I spoke at php[tek] in St. Louis, I had the honor of being interviewed by Cal Evans on the Voices of the elePHPant podcast! In the interview, we discussed Drupal 8, Acquia, the Raspberry Pi Dramble, and the PHP community.

Check out the interview: Interview with Jeff Geerling - Voices of the elePHPant.

There's also a video recording of the podcast, embedded below:

Highly available Drupal on a Raspberry Pi Cluster - phptek 2016 session

Raspberry Pi Dramble Cluster with Mini Raspberry Pi Zero Cluster

Another year, another field trip for the Pi Dramble—my 5-Raspberry-Pi cluster! I presented a session titled Highly available Drupal on a Raspberry Pi Cluster at php[tek] 2016, which just so happens to have moved to my hometown, St. Louis, MO this year!

For this presentation, I remembered to record the audio using a lav mic plugged into my iPhone, as well as iShowU to record what was on my screen. Sadly, I didn't have a secondary camera to capture the Pi Dramble itself, but you can glance at all the other 'Let's build a Pi Cluster' videos if you want to see it in action!

Here's a video recording of the presentation:

Review: Raspberry Pi model 3 B, with Benchmarks vs Pi 2

Raspberry Pi 3 - Front

Raspberry Pi 3 - Back

On Pi Day (3/14/16), I finally acquired a Raspberry Pi model 3 B from my local Micro Center (I had ordered one from Pimoroni on launch day, but it must be stuck in customs). After arriving home with it, I decided to start running it through its paces. Below is my review and extensive benchmarking of the Pi 3 (especially in comparison to the Pi 2).

Hardware changes

There are a few notable hardware changes on the Pi 3:

Happy #PiDay 2016 - Celebrating with the Raspberry Pi

I think today was my most Pi-full π day, ever! Let's see:

Early in the morning, I finished upgrading all the Ansible playbooks used by the Raspberry Pi Dramble so my cluster of five Raspberry Pis would run faster and better on the latest version of official Raspberry Pi OS, Raspbian Jessie.

Later, opensource.com published an article I wrote about using Raspberry Pis placed throughout my house to help my kids sleep better:

Orange Pi Plus Setup, Benchmarks, and Initial Impressions

tl;dr: The Orange Pi Plus offers much better specs, and much better performance, than a similarly-priced Raspberry Pi. Unfortunately—and this is the case with most RPi competitors at this time—setup, hardware support, and the smaller repository of documentation and community knowledge narrow this board's appeal to enthusiasts willing to debug annoying setup and configuration issues on their own.

Orange Pi Plus - Front

Orange Pi Plus - Back

A few months ago, I bought an Orange Pi Plus from AliExpress. It's a single-board Linux computer very similar to the Raspberry Pi, with a few key differences:

Speaking at php[tek] in St. Louis May 25 and 26!

php[tek] 2016 logo

I'm thrilled to announce that I'll be delivering two sessions at php[tek] this year:

Both topics are near and dear to me, as I've had more time to refine the Ansible roles and performance of Drupal 8 on a Raspberry Pi (see Drupal Pi and the Raspberry Pi Dramble website for more info), and I've also been spending some time lately optimizing my WFH environment (the nice cave-like office in my basement, where I spend the majority of my waking hours!).


Subscribe to RSS - dramble