A great addition to any homelab is being able to track your internet speeds over time and have a nice dashboard to visualize the data for download/upload speeds, latency, and jitter.
We'll use the speedtest.net API for the test itself, a time series database to store our test results, and a dashboard to visualize them from other machines on the network.
To make the deployment easier we'll take advantage of Docker containers to package our apps, Kubernetes for orchestration, and Helm to deploy everything.
You'll need a Raspberry Pi or some other low-cost, low-energy consumption computer you'd like to leave on to do the speed monitoring. You won't need a graphical desktop on it since you can ssh into it to carry out all tasks.
Note: MicroK8s by default uses Dqlite as its storage backend instead of etcd. Further securing of Secret objects with encryption at rest for either storage backend is outside the scope of this project.
Install
Prepare your Raspberry Pi's local storage for both the database and dashboard
# On your Pi
sudo mkdir -p /var/lib/influxdb2
sudo mkdir -p /etc/influxdb2
sudo mkdir -p /var/lib/grafana
If installing from the repository
# On your Pi
helm repo add santisbon https://santisbon.github.io/charts/
# or
helm repo update
CHART="santisbon/speedtest"