Infrastructure@Home: A new Project

Raspberry Pi4

It is time for a new project! For some time, I have been playing with the idea to automate my array of Linux servers and Raspberry Pi boards. In this article, I provide the motivation, explain my infrastructure and formulate the requirements. See this post as my project kick-off!

This article appeared originally at my personal blog.

What is Infrastructure Automation?

Infrastructure automation is the idea of using specifications to configure, deploy and maintain servers, services and applications. These specifications include commands (read CPU and IO stats), application installation, application configuration (template configuration files, install plugins), application & service management (start, restart, stop), and system administration tasks (add users, update OS packages or Kernel).

Infrastructure specifications are files. By executing the specifications, the servers, applications and services are brought towards the desired state. When we treat these specifications as code inside a version control system such as Git, it becomes Infrastructure as Code (IAC).

My goal is to have the same level of automation at my home. I want to use tools that help me with system administration, application configuration and application management on my infrastructure.

My Infrastructure

  • Linux Server: 4x1.5GHz , 6 GB Ram, 64GB Disk
  • RPi Zero W: 1x1GHz ARM11, 512MB Ram, 32GB Disk
  • 2x RPi 3 B+: 4x1.4GHz Cortex-A72, 1GB Ram, 32GB Disk
  • 2x RPi 4: 4x1.5GHz Cortex-A72, 4GB Ram, 32GB Disk

I assembled the Raspberry Pi in a neat stack:

Raspberry Pi Stack

The Linux server runs with Manjaro, an Arch Linux derivate. The system is installed with the graphical tool, so I have a named user, a dedicated hostname and SSH.

For the raspberry Pi, SDD cards are flashed with a fresh copy of Raspbian Buster. I boot each system to enable SSH and to set a custom hostname for each machine (raspi-0, raspi-3–1, raspi-3–2, raspi-4–1, raspi-4–2). All systems are connected to the same switch.

Now we can start to automate the infrastructure!

Requirements for infrastructure automation

First, let’s define infrastructure: a cluster of individual servers on which applications are running. Second, lets group all tasks into different groups:

Infrastructure Management

  • IM1: A task to update the operating systems
  • IM2: A generic task to install additional software
  • IM3: A task to install and update SSH keys
  • IM4: An interface in which I see the status of all nodes (online/offline, CPU, RAM)

Application Management

  • AM1: Applications can be deployed as binaries or docker container
  • AM2: Applications can be deployed on specific nodes
  • AM3: Applications can be deployed somewhere inside the cluster
  • AM4: An interface in which I see the status of each application (health, exposed endpoints)

Application Discovery

  • SD1: Applications can be accessed with a domain name independent of where they are running

Now, we can start with the project!


IT Project Manager & Developer