Raspberry Pi Cluster: Phase 1

Jul 30, 2021 3-minute read

Raspberry Pi cluster

Disclaimer: As of phase 1, this is a ‘cluster’ in appearance only, the pi’s aren’t functioning as a cluster… yet.

Hardware

  • 1x Raspberry pi 3b (2gb)
  • 2x Raspberry pi 4 (4gb)
  • 2x Western Digital 500gb

Software

What’s it doing now?

The raspberry pi 3 was the first pi purchased and is running everything but emby. The first raspberry pi 4 is running the emby media server and the second raspberry pi 4, well, it’s powered on and doing nothing.

Pi-hole acts as a network-wide DNS sinkhole and ad-blocker without worrying about installing software on all the computers, phones, and laptops. This software was the sole reason I purchased my first pi.

Pi-hole Dashboard

Emby was next on the list. A super simple and easy to set up media server. Why emby? The emby client can be installed on android and roku, or be accessed from the browser. This is where the RAID1 was used as a short term solution to provide some level of redundancy incase of a hard drive failure. Longer term solution will include a nas device. The next step was to install PiVPN. This, with the help of WireGuard installed on phones, the music hosted on emby can now be listened to from anywhere.

Emby Desktop

Home Assistant was the latest pi project. It all started when strolling through costco and seeing smart led light bulbs, outlets and wall switches. Home assistant provides a nice all-in-one solution to home automation with a very active community and well written documentation. In my opinion, one of the best open source projects out there. This post will only highlight homeassistant, I will eventually do a more in-depth writeup on my setup and all the integrations, devices, blueprints, automations and all that jazz at a later date. But for now, here are few shots of what is set up so far.

Weather, sky and air quality

Network, pi-hole and roku

Lights

The Plan

So I’ve got all this hardware and software running now what? I plan on using this as a home lab to learn and expand my knowledge of container orchestration, CI/CD, distributed computing, and DevOps. I also plan on turning the cluster into a personal cloud that can be accessed from anywhere via PiVPN + WireGuard. In other words, goodbye dropbox, google drive and amazon photos and hello nextcloud, Syncthing, and vaultwarden (self-hosted bitwarden).

  1. Create a kubernetes cluster with k3s, or microk8s.
  2. Let traefik handle all the networking, routing and proxying.
  3. Redeploy all services as containerized applications.
  4. Attach the 500gb RAID1 as an NFS persistent volume in kubernetes cluster.

To be continued…