Yunohost sbc cluster

motivation: running out of CPU and RAM on my SBC
idea: run systemd services on a 2nd/3rd SBC
intermediate solution: running a second SBC with containers which are exposed to the public IP by using YunoHost app store | Reverse Proxy

I’ll just sketch my thoughts here to get them out of my head. Maybe I’ll get back to this sometimes, maybe not. Any ideas and comments are very welcome.

general concept

Boot a second, diskless SBC using PXE from the main yunohost System.

yunohost main SBC

network

Configure tftp and dhcp server for booting.

Find a way to expose services listening to 127.0.0.1 or even sockets over network on the other SBCs.

boot files

Provide files needed for a PXE boot via tftp

root filesystem to be mounted by 2nd SBC

Create a root filesystem to be mounted by the 2nd SBC from the root filesystem of the main yunohost.

All parts of the filesystem exported should be read-only except for those that need to be different on the second SBC:

  • /etc/network/interfaces
  • /etc/hostname
  • /etc/ssh/: key files
  • /var directories

systemd.service

Find a way to change service files for services that should run on the 2nd SBC to start on the second SBC and to start not on the first SBC.

  • Order of starting
  • what if 2nd SBC out of order, not started, yet?
    • start on first one automatically?
    • have some 503-message on first one?

2nd SBC

boot

flash uboot including network boot to spi

run

All the configuration should be done on the yunohost main SBC.

There needs to be a way to call commands for

  • systemd daemon reload
  • systemd service control