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 config.ini.

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.

  1. The simplest topology is when you have a single Pioreactor, and so the leader is the only worker.

single pioreactor

  1. When you have multiple Pioreactors, you can nominate one to be the leader node, and retain it as a worker, too:

leader and worker

  1. 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.

leader not worker

How to edit roles

To tell the cluster which computer is the leader, you edit the config.ini's leader_hostname section (under network.topology):

where to edit the leader

Inventory is assigned in config.ini under network.inventory:

Adding new workers

See the instructions here to set up your RaspberryPi, and worker-specific installation instructions are here.

← Back to all documentation