Using Plugins in a Cluster

I’m running two leader images (L1, L2) and a worker image (W1). They all connect to L1 and are displayed as active on the Pioreactor page. When I install a plugin on L1, I place my_script.py in ~/.pioreactor/plugins/ and I place my my_script.yaml in ~/.pioreactor/plugins/contrib/ui/jobs. These have only been installed on L1, and have not been installed on L2 or W1.

If I want to run this job (for example, your od_reference.py job) on L2 and W1, do I need to also transfer the script to L2 and W1 as well? How about the .yaml?

Currently, I have only placed the files on L1, but when I click “Manage” on L2 and W1, the job is visible. I think that this means I only need to have the .yaml installed on the host (i.e., L1), but do I need to also install the script on the other pio’s (L2, W1) in the cluster as well?

Good question, and plugin distribution is something I’m working on making better.

For python plugins and scripts in the .pioreactor/plugin folder¹, you’ll need to duplicate the files to all the workers. I’m working on a utility to make this easier, New cli command: `pios copy` · Issue #390 · Pioreactor/pioreactor · GitHub, but it’s not ready yet.

For yaml files, only the leader needs them.

I think that this means I only need to have the .yaml installed on the host (i.e., L1), but do I need to also install the script on the other pio’s (L2, W1) in the cluster as well?

To answer this: yes.

¹ Alternatively, the plugins that are installed via the plugins webpage are already distributed to all workers in the cluster, and don’t need anything copied.