Encrypt an existing Linux installation with zero downtime (LUKS on LVM)

During the bi-yearly review of my setup, I realized I was running a Linux machine without full disk encryption. The encryption of the disk needed to be done ASAP, but I was not willing to reinstall the whole operating system to achieve that. Solution? I came up with an interesting way to encrypt my existing … Continue reading Encrypt an existing Linux installation with zero downtime (LUKS on LVM)

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 mount point (e.g. /storage) … 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