I am currently trying to set up network rendering with Blender using computers on different networks. I made a script that launches blender and connects to the host's computer. My problem is that I need to log into all of those computers remotely to launch the script and I am not sure what to use to do that. Optimally I would like to be able to do that with a single keystroke, instead of having to log into each computer separately to start the script.
-
3Possible duplicate of Is there an SSH client which duplicates commands to multiple terminals? – heemayl Jun 26 '16 at 19:59
2 Answers
Another option is Ansible. Like SaltStack, Ansible is a configuration management solution. Ansible was literally built to execute commands on multiple remote machines.
Ansible is nice because you don't have to install anything on the "target machines". You simply install it on the host machine (i.e. your computer), and it uses SSH to log into target machines and run shell commands on them.
Here are instructions to install Ansible on Ubuntu.
Let's say you want to run your script on 2 target machines, at ip1
and ip2
. You could create an Ansible playbook, playbook.yml
, as follows:
---
- hosts: "ip1:ip2"
user: "my_login_user"
tasks:
- name: "execute my script"
script: my_script.sh
Then, create your script, my_script.sh
or my_script.py
or whatever, in the same directory as playbook.yml
.
Finally, run the following from the command line:
ansible-playbook -u my_login_user -i "ip1,ip2" --private-key=<path_to_my_private_ssh_key> playbook.yml
If you have SSH access to the target machines via that user and SSH key, Ansible will SSH into them and will run your script. You can extend this to as many machines as you want.

- 121
One available option is to use saltstack to execute the same command on each minion. After adding salt to each computer you can run the same command on each machine with something like
salt '*' cmd.exec_code python 'import sys; print sys.version'
If you are using blender's network render addon then you could also configure a blend file to have network render enabled and setup as a client, then have blender start and open the setup file when the computer is turned on.
If you plan to do a lot of rendering you may be interested in doing a bit more setup and creating a render farm. One available from the blender developers is flamenco.

- 264
- 1
- 4