# CUBE Compute
I experimented with Kubernetes, spending a week of my employer-allotted professional development time learning the basics. It's powerful, but way overkill for my needs. For now I'm happy enough with Docker Swarm, which I also learned just in time for this project.
The one manager and three workers of the swarm are the nodes in a [[TuringPi]] cluster. It's mounted in the rack on a [$20](https://deskpi.com/products/deskpi-rackmate-accessory-mini-itx-shell?_pos=1&_psq=itx&_ss=e&_v=1.0) DeskPi ITX 1U shelf (which incidentally does not fit the power brick).
- [ ] #project #cube-lab Does the [$35](https://frame.work/products/deskpi-rackmate-10-inch-2u-mini-itx-shelf) shelf from Framework fit the TuringPi cluster board and power supply? (if just the cluster board, could I use the [$149](https://frame.work/products/desktop-power-supply-400w) Framework Desktop power supply brick?)
- [ ] #project #cube-lab I should pick up two more RK1 nodes
## Primary Services
The manager node is running Portainer, which is how I click-ops all the other configuration.
- [ ] #project #cube-lab host ebook collection on the media server
Some of the services (_:cough: [Jellyfin](https://jellyfin.org/docs/general/administration/hardware-selection/#potentially-problematic-hardware) :cough:_) state that they shouldn't run on an SBC. "If you really want to run Jellyfin on an SBC, you may wish to consider models based on the following platforms: Rockchip RK3588 / RK3588S, Intel Core, Intel 12th gen N series". I have it on the RK1 board now, but if I have a chance to upgrade that, I should take it.
## Secondary Services
I would like to run some monitoring and display services on the cluster. A node dedicated to monitoring the CPU/memory/network usage of the other nodes, various metrics from the NAS, etc. And it should display its information on a WOPR-style LED grid. It should also be able to create a print-out on thermal receipt paper.
Do like [this person did](https://imgur.com/a/led-load-display-pLlge7e) ([repo](https://github.com/glhughes123/ledload)), or [this one](https://mwworks.uk/project/gallium-photonic-computer/build), but with adafruit parts ([amber w I2C backpack](https://www.adafruit.com/product/1854), [bi-color w I2C backpack](https://www.adafruit.com/product/902) (bi-color may need a second I2C bus to run the quantity I want))
- [ ] #project #cube-lab ensure a CM4 node is in slot 1. Get it talking to an LED matrix through its GPIO. Don't run primary services on it. Also get it talking to a thermal receipt printer. Power the printer somehow (I [[Thermal-Receipt-Printers#Printing garbage?!|recall]] it wants a very clean power supply)
## Appendix A: other nodes/clusterboards
There is room in the rack for more compute. I'm considering a few options that I already own:
- LattePanda, if I don't use that for [[Anima]].
- home assistant yellow
- one Raspberry Pi 5 (currently reserved for [[OctoPrint]])
- two Raspberry Pi 4Bs
I don't know what other resources the lab needs, but I can't help myself thinking about these other fun toys anyway.
- I have two macbook air laptops I could repurpose to be headless servers. They're already so thin, and don't expect active cooling!
- I have a [[Helm-v1]], which is not suited for rack-mounting. Its main draw to me is its unconventional shape.
- A ton of RPi 3A+ left over from [[LeucoSpex]], but clustering those without a ton of cables will be difficult? They'd need to communicate over Wi-Fi, which would mean changing out the network switch. And I don't know if my limiting factor is CPU anyway. Let's put a pin in this.
- Framework 12 mainboard in custom enclosure (search #frameblade)
- computeblade.com looks awesome
- https://www.willwhang.dev/Miniature-CM4-Cluster/
- https://clusterhat.com/
- https://pipci.jeffgeerling.com/
- $200 this [DeskPi Super6C](https://deskpi.com/products/deskpi-super6c-raspberry-pi-cm4-cluster-mini-itx-board-6-rpi-cm4-supported) holds 6 compute modules flat to the motherboard (with 6 M.2 2280 slots (PCIe Gen 2 x1))
- (100W power supply included!)
- $39 it fits on a 1U shelf ([DeskPi has one of those](https://deskpi.com/products/deskpi-rackmate-accessory-mini-itx-shell?variant=44565523202204#3))
- $57 it fits in a case, which might also fit on the shelf ([DeskPi has that too](https://deskpi.com/collections/deskpi-super6c/products/deskpi-itx-case-kit-for-deskpi-super6c-raspberry-pi-cm4-cluster-mini-itx-board#2))
- (fans and CM heat sinks included!)
- $510 (6) CM5 8GB RAM, 32GB eMMC ([pishop](https://www.pishop.us/product/raspberry-pi-compute-module-5-8gb-ram-32gb-emmc-cm5008032/))
- $1090 (6) 2TB PCIe Gen 3.0 x4 SSDs ([newegg](https://www.newegg.com/samsung-970-evo-plus-2tb/p/N82E16820147744))
- board + shelf + case + 6\*CM5 = $806
- https://github.com/JaredC01/LabStack