Artisanal Kubernetes Cluster
If you want to be the envy of your neighbors, build an organic, artisanal cloud. Really impress people by using reclaimed laptops. Give your local compute cluster a rustic flair that only antique Inspirons can provide.
Thanks to family hand-me-downs, over the passing years I have become a repository of unwanted laptops. Some of them barely boot anymore, but three-quarters of them have two cores and 2 GB of RAM or more. One actually had four cores and 8 GB of RAM... making it a veritable workhorse. I could make them disposable workstations, but instead I wove them together and created a personal Kubernetes cluster.
The base OS for the nodes is Ubuntu's latest LTS release. Rather than using Conjure on MaaS to set up the cluster (which required an isolated network for bootp and DNS and meh), I leveraged Kubespray's flurry of Ansible scripts to prep an inventory of machines over SSH. This ended up being surprisingly low impact and worked perfectly for the use case of building a test lab with piecemeal hardware.
Laptops work just fine as server nodes with a few tweaks:
- Even if you use the server distribution of Ubuntu, laptop events such as closing the lid will still result in a suspend/hibernate/resume action. Edit /etc/systemd/logind.conf to make sure the laptop keeps running when closed.
- The display will remain on once you start ignoring LidSwitch events - run a script at startup to turn the display off and save energy.
- Even if you are running in console mode, NVIDIA Optimus laptops will go nuts and seemingly run the discrete and on-chip GPUs nonstop, overheating the machine. Install Ubuntu's Bumblebee packages to prevent this.
- As with all Kubernetes nodes, disable swap. Since you will no longer need to resume from hibernate mode on the laptop, it can be safely disabled.
Add in a metal document sorter from an office supply store and I now have a rack of adequately ventilated cluster nodes under my desk. Quite chic.
Chief Information Officer at Devox Software
1 年John, thanks for sharing!
Executive Technologist & Advisor specializing in the intersection of Biz, Tech, and Fun!
5 年Love this. Nice effort on the cluster.