How a Terraform + Salt + Kubernetes GitOps infrastructure enabled a zero downtime hosting provider switch

The switch It has been a busy weekend: I switched the hosting provider of my whole cloud infrastructure from DigitalOcean to Hetzner. If you are reading this it means that the switch is completed and you are being served by the Hetzner cloud. The interesting fact about the switch is that I managed to complete … Continue reading How a Terraform + Salt + Kubernetes GitOps infrastructure enabled a zero downtime hosting provider switch

TLS-terminated Bitlbee with custom protocols

Five years ago I started a small GitHub project aimed to run Bitlbee seamlessly in a container. Why Bitlbee? Back in the day, I was relying heavily on IRC for my daily communications and the plethora of other protocols that were starting to get traction was too much: I wanted to have a bridge between … Continue reading TLS-terminated Bitlbee with custom protocols

Startup order in Docker containers

Motivation I recently dealt with an application that is comprised of multiple services running in containers. Even though every part of this application is correctly split into each separated microservice, the independence of each service is not enforced. This lack of independence has several drawbacks, one of which is that containers must be started by … Continue reading Startup order in Docker containers

On servers timezone and tmux

A while ago I was fighting with a timezone set on a server because of the daylight saving time kicked in: during the ghost hour I had troubles with finding automated jobs. Moreover, the server was located overseas and depending on when I was checking the remote date and time, I could get a different … Continue reading On servers timezone and tmux

Automatic (or unattended) upgrades in openSUSE, CentOS and Fedora, Debian and Ubuntu

Each one of us is a system administrator: for at least your workstation (or notebook) you can decide when and how to administrate it. In the special case in which you are being elected to administer servers too, the matter becomes thorny: what is the workflow in terms of patching, time of reaction to security … Continue reading Automatic (or unattended) upgrades in openSUSE, CentOS and Fedora, Debian and Ubuntu

Send an email from a Docker container through an external MTA with ssmtp

I packaged a standard application (think of it as a standard PHP or <insert your preferred framework here>) into a Docker container. So far, it was working flawlessly, but then a problem arose: send an email from the Docker container (the event is triggered within the container). As you may know, a good Docker container … Continue reading Send an email from a Docker container through an external MTA with ssmtp

Linux: using bind mount to move a subset of root subdirectories to another partion or disk

I was in the situation dealing with a Linux box with two hard disks: /dev/sda: fast hard drive (SSD), small size (~200 GB) /dev/sdb: very big hard drive (HDD), large size (~4 TB) The operating system was installed on /dev/sda, so I had /dev/sdb empty. I knew I could create a mountpoint (e.g. /storage) and … Continue reading Linux: using bind mount to move a subset of root subdirectories to another partion or disk

Automatically add SSH keys to SSH agent with GNOME and macOS

I am using passwordless login via SSH on every box that I administer. Of course, my private SSH key is protected with a password that must be provided when accessing the key. Modern operating systems incorporate the usage of ssh-agent to “link” the user account to the SSH key(s), in order to unlock the SSH … Continue reading Automatically add SSH keys to SSH agent with GNOME and macOS

Accessing remote libvirt on a non-standard SSH port via virt-manager

Scenario: you are using a remote host as a virtualization host with libvirt and you want to manage it via ”Virtual machine manager” (virt-manager) over SSH. But SSH is listening on a non-standard port, and virt-manager does not offer you to connect to a remote libvirt instance on a non-standard port. Fear not, the option … Continue reading Accessing remote libvirt on a non-standard SSH port via virt-manager

Automatically update your Docker base images with watchtower

I’m an avid user of Docker containers, using base images pulled from the public registry DockedHub. As you may know, Docker containers are based on Docked base images, e.g. I run postgres containers that are based on Postgres base image. It occurs that base images could get updated by their respective author (in our case Postgres team) and pushed to DockerHub. … Continue reading Automatically update your Docker base images with watchtower