Command line interface
For those interested, you can use the command line to interact with the Pioreactors. This is called the command line interface (CLI). Log onto either the leader or worker and you can execute the following commands. Full options and up-to-date documentation are available with pio <command> --help.
Worker commands
Interacting with the Pioreactor on the command line are through the pio tool. Available arguments are:
pio logswill produce a stream of recent logs events. Logs are stored in/var/log/pioreactor.log.pio kill --job-name <job>orpio kill --all-jobsto end jobs.pio run <job> <options>will run the<job>. Each job may have specific command line arguments.pio versionprint the version of the PioreactorApp software.pio update appwill update the software to the latest version.pio update uiwill update the ui to the latest version.pio updatewill update both the app and ui to the latest version.pio blinkwill blink the Pioreactor's onboard LED.pio log -m <message>will log a messagepio cache view <cache>will print out the contents of the specified cache.pio cache clear <cache> <key>will remove<key>from cache<cache>.pio plugins --helpfor managing pluginspio calibrations --helpfor managing calibrations.
Leader-only commands
The leader also has their own unique set of pio commands (these commands do not interact with the workers):
pio db: open the sqlite3 CLI of the Pioreactor database.pio mqtt: tail the MQTT broker.pio workershas many subcommands for manager your cluster. For example:pio workers add <hostname>: add a Pioreactor to your cluster, with given (unique) name. Need a worker Pioreactor on the network first. See instructions here.pio workers remove <hostname>: remove a Pioreactor from your cluster.pio workers discoverwill return a list of workers on the network (may be a superset of the current cluster.)pio workers statuswill report to the user each Pioreactor in the cluster, and metadata like status, IP, and state.
Leader-only commands to control workers
The leader Pioreactor interacts with the worker computers using the pios command. Unless otherwise noted, the pios will target all worker computers. Available pios commands on the leader Pioreactor are the following:
pios kill --job-name <job>terminate the job<job>on the workers. Ex:pios kill --job-name dosing_automation.pios run <job>on each worker, run the job<job>in the background. Job specific arguments can be specified after. Ex:pios run add_media --ml 1.pios updateinstall the latest Pioreactor software on each worker.pios sync-configsdeploy the config.ini files to workers.pios plugins install <plugin name>will install the plugin on each worker and the leader.pios plugins uninstall <plugin name>will uninstall the plugin on each worker and the leader.pios rebootwill reboot all workers, by default, in the cluster. See--unitsarg below.pios shutdownwill shut down all workers, by default, in the cluster. See--unitsarg below.pios cp <filepath>will copy (and possibly overwrite)filepathon the leader to all the workers.pios rm <filepath>will removefilepathon all the workers.
In each of the above commands, specific workers can be invoked with --units (which can be used multiple times. Ex: pios run stirring --units pio1 --units pio2.
-y will skip user confirmation of the command to run.
--json will display json output of the callbacks to each worker.