My First Cluster

By Daniel Samson · 2025-02-17

So around 2022, I made my server (old desktop pc), so I could run my own Jellyfin server using NGINX reverse proxy and docker. I had the idea, that I could automate the process of downloading new movies, without having to manually look for them myself. I still pay for streaming services like Netflix and regularly attend my local cinema, but this would allow me to watch things all from one place.

old_server.jpg

Discovering The Movie Database API (TMDB)

I made a NodeJS project that would periodically check for new episodes, and movies from TMDB API. It would take the items found that were above 70% rating, then place them into JSON database file.

Walking the plank

I then created an other NodeJS project (plankwalker), to take the json file and search to the best possible torrents online. Plankwalker would then generate a list of magnets to submit to transmission.

Transmission Loud and Clear

Transmission is a Fast, Easy and Free open source Bittorrent Client. After learning that transmission had a web mode, I discovered that its RPC API was also well documented. So plankwalker could automate submitting new magnets to be downloaded to transmission. I then made a script that could have it organise the downloads into a folder that Jellyfin could pick up automatically. Seems perfect right?

My First Raspberry Pi

Around winter time, I got really into youtube channels like @JeffGeerling. So i bought the cheapest raspberry pi zero kit I could find on amazon. After realising how little amount of energy it took to power it and how much you can do with it, I began to consider moving Jellyfin over to a cluster of Raspberry Pis. Compared to the 600 watts my "server" was consuming, I could run 4 Raspberries at around 100 watts, saving 500 watts of energy.

K3S For the Win!

K3s is a highly available, certified Kubernetes distribution. It runs super well on Raspberry Pi. Plus it works really well with rancher, a web based management service for Kubernetes. K3s enabled this DevOps hating engineer, setup his very own cluster, with minimal hassle. I was able to easily port my docker containers over to it. Jellyfin ran well, but due to the low compute power of a raspberry pi, i could not use it to transcode the video in real time. So i would have to convert my videos into mp4 h264 AAC, in order to view them in any browser.

original-cluster.jpg

The results were better than I expected. It turned out, that my cluster only uses 30 watts of power, via Power over Ethernet. I am hooked!