Homelab
Table of Contents
Project Genesis #
At the beginning, my Homelab was composed of a single Raspberry Pi 3.
Its purpose was mainly to run Home Assistant, Deconz and Pi-hole docker containers as part of DOMO project. Someday, my Home automation stopped working. After a quick investigation I understood that the Raspberry Pi micro-SD card died.
It would have been easy to replicate it since everything was dockerized / on github but this misadventure was the perfect excuse to build an almost prod-ready infrastructure based on Kubernetes (who said overkill?).
Almost two years later here where are 😄 :
This project allowed me to mix several hobbies of mine:
- 3D Modeling & Printing
- System administration
- Home automation
- Some basic electronic
Mini racks are made up of a structure divided into units (1.5cm high) capable of accommodating rack mounted stuff, exactly like datacenter conventional racks. It is made this way so it’s easy to individually replace parts in the event of failure.
This “mini data center” is composed of 3 types of rack: Compute / Network / Storage.
Compute mini racks - C01 and C02 #
Hardware side #
From top to bottom, each of them is composed of:
- 2 Crucial BX500 SSDs (240GB),
- 1 Empty 2U placeholder,
- 1 Raspberry Pi 3 (1GB RAM),
- 3 Raspberry Pi 4 (4GB RAM),
- A TPLink TL-SG105 switch (5 ethernet ports, GIGABIT),
- An Anker PowerPort charger (6 USB ports, 60W)
Without forgetting a Noctua NF-A9x14 fan on the left side.
As you may see, each Raspberry Pi enclosure also includes a colored power button and a 1" OLED screen on the front to display information about CPU usage, RAM usage, etc.
Software side #
On software side, these 8 Raspberry Pi form a Kubernetes (K3S) cluster.
Their configuration is done using multiple tools:
- Packer: To build a ready to use Raspberry Pi OS image that includes SaltStack,
- SaltStack (Ansible equivalent): To configure users, setup screen, install K3S, deploy Kubernetes system resources like ArgoCD etc,
- ArgoCD: To automatically deploy applications on Kubernetes based on Git repositories.
All of that is stored in Git repositories following GitOps methodology.
This setup is almost production ready with:
- 3 “master nodes”,
- Load Balancing between nodes using MetalLB
- Distributed and redundant persistent storage based on Longhorn,
- Monitoring, logging and alerting using Prometheus and Grafana,
- Backups perfomed on Storage mini rack every night,
- Servers plugged on a UPS monitored with nut
On application side, these mini racks are used to run Home Assistant and Deconz of course but also *arr suite (Bazarr, Sonarr, Radarr, Prowlarr), Plex, Pihole, Gitlab, … locally served but still accessible from outside through Wireguard VPN.
Network mini rack - N01 #
Hardware side #
From top to bottom, N01 mini-rack is composed of:
- A WiFi 6 Lite Unifi Access point,
- An Empty 1U placeholder,
- A Philips Hue Bridge,
- A Fiber to ethernet converter TPLink MC220L (GIGABIT),
- A Mini PC Odyssey X86J4125864 (8GB RAM, Celeron J4125 CPU),
- A Unifi switch mini (5 ethernet ports, GIGABIT),
- A Unifi POE Adapter (Needed for the Access point),
- A Anker USB-C PowerPort charger (4 USB-A ports, 1 USB-C Port, 60W)
Software side #
The Mini PC Odyssey X86J4125864 act as a router running pfSense.
This setup allowed me to:
- Replace the need of the ISP router using the TPLink Fiber to ethernet converter,
- Access my local network remotely using Wireguard,
- Create multiple VLAN: One for IOT objects, one for guests, …
- Setup DHCP Static mappings,
- …
But mostly to learn Network related stuff!
Storage mini rack - SO1 #
Hardware side #
From top to bottom, S01 mini-rack is composed of:
- 1 Empty 1U placeholder,
- 1 8TB Western Digital Hard drive,
- 1 Mini PC Odyssey X86J4125864 (8GB RAM, Celeron J4125 CPU),
- 2 8TB Western Digital Hard drives,
- 1 Power brick (12V, 9A)
Software side #
This rack act as a 14TB NAS using TrueNas CORE.
It is used to store data but also to store Kubernetes volumes backups.
About 3D Printing #
More to come…