Homelab Part I: Hardware
For hardware, I settled on Raspberry Pi 4Bs. They support up to 8GB of RAM (enough power to run the k3s master nodes) and USB 3.0 for fast external SSD I/O. The only downside of the 4Bs is that they require more power than the 3Bs, and the same multiport USB power supplies that could support a 3B cluster couldn’t support a 4B cluster. To solve for this, I decided on PoE hats and a PoE switch. This halves the number of cables that need to be run to each Pi, which makes the Pi cluster that much more enjoyable and easy on the eyes.
Here’s my current bill of materials:
|Raspberry Pi 4B||$90||2|
|4 PoE port switch||$70||1|
|6 pack cat6 cable||$14||1|
|Samsung 500GB SSD||$85||1|
|M.2 NVMe SSD case||$24||1|
I have 2 Raspberry Pi 4Bs and 2 PoE hats, but I expect to procure more of these incrementally. The 8GB nodes probably aren’t necessary, but I wouldn’t get 1GB nodes despite the tempting price point.
Since I’m using PoE for a power supply, if I exceed the 4 PoE ports allowed by my PoE switch, I’ll have to buy another PoE switch or upgrade. TP-Link, the manufacturer of my current switch, also makes an 8-port PoE switch (these switches are a little confusing because they’re actually 8-port and 16-port switches respectively, but only half of the ports are PoE–I’m listing them here by their PoE port count which is more interesting for our purposes).
My storage solution was informed by Jeff Geerling’s excellent blog posts:
Notably, by using an NVMe-to-USB-3 case that speaks UASP, we can take advantage of much of an NVMe SSD’s performance (note that a SATA SSD is also probably fast enough to saturate a USB 3.0 connection, but UASP appears to be significant).
I only have one disk for now, and I’ll either simply sync (rclone) that with S3 for backups or I’ll get another disk or two and do some sort of replication (such as RAID or Longhorn.io or similar) or both.
This pretty much covers it for the hardware. Next time we’ll dig into some simple automation to allow us to maintainably set up hosts to join the cluster.