Leaders, workers and inventory
Pioreactors are able to be used as individual units, or in concert with other Pioreactors. In either case, some RaspberryPi on the network needs to be assigned as a leader. The leader unit controls other Pioreactors (and that may include itself), stores the database, hosts the PioreactorUI, and is the interface between users and the hardware.
A leader will communicate and control the all workers (non-leader Pioreactors) in the inventory. The inventory is a list, defined in
config.ini, of available workers. For example, when you want to remove a Pioreactor from your cluster temporarily, you can disable it as part of your available inventory in
For solo Pioreactors, the leader is also the (only) worker. When used in concert with others, a leader can be assigned (and need not be a worker).
Possible cluster topologies
This gives us a few different possible topologies of what your cluster of Pioreactor(s) might look like.
- The simplest topology is when you have a single Pioreactor, and so the leader is the only worker.
- When you have multiple Pioreactors, you can nominate one to be the leader node, and retain it as a worker, too:
- You can also choose not to have the leader be a worker. This is useful if you have a spare RaspberryPi without the Pioreactor hardware, or the number of Pioreactors grows large and you wish to keep one out of the worker inventory.
How to edit roles
To tell the cluster which computer is the leader, you edit the
leader_hostname section (under
Inventory is assigned in