RENDER NODE MANAGER


Once your renderfarm created (how to do) it is necessary to manage your clients to open/close the applications you need. For example Vray Render Slave for distributed rendering with Vray, Afanasy's renders for your image sequences, or simply turn on/off your clients. These operations are common but can be tedious, especially if you have many clients.

To help my workflow I developed a small program (python script) to help automate these simple tasks and gain time to deploy my renderfarm when I need. It's called RNM for Render Node Manager, it's open source and you can use or modify its content as you like.

  What you can do :  

  1. Open and close Afanasy applications : server, renders , afwatch dailies , keeper .
  2. Remote your clients desktops using Anydesk (free) .
  3. Wake on lan or shutdown your clients using WakeOnLan ( open source).
  4. Run and kill applications using PsTools (free) .

   What does it look like :   





Originally I executed those tasks with .bat files, but given their increasing number I decided to combine them in a grid of buttons using the Python Tkinter module. I am not a programmer but I like to copy-paste, so if you see code errors feel free to report them to me. I use this script for several months now with no problems so everything should be fine.


  How to install :   

You need to download this archive then decompress it with 7zip (or other) and paste the RNM folder in your Workstation root directory (C:\RNM). done !


What's inside :

  • the icon folder with the photoshop file to modify them if necessary.
  • read_me.txt file.
  • the python script file RNM.pyw. This is what you need to run  to get the interface.
  • and RNMconfig.cfg to configure your clients network access

To use the script you must first:
  1. install Python 3 on your Workstation.
  2. install Afanasy on your Renderfarm (how to).
  3. install PsTools at your Workstation root directory (next the RNM folder).
  4. install Anydesk on every clients.
  5. install WakeOnLan on your workstation
Now you need to setup the paths of PsTools and WakeOnLan into your Windows environment variables (how to).


   Last step, configure RNM :   


Use Notepad++ or whatever script editor to modify RNMconfig.cfg. This file is used to store :

      1. RNM window position screen. 
You don't have to modify those values. This is just to let RNM remenber where it was before exit to reopen at the same place.

      2. your applications paths (RNM, Afanasy, WakeOnLan, Anydesk, Vray ...). 
By default RNM is designed to work with Afanasy, the Open Source Renderfarm Manager from CGRU, and for Distributed Rendering with VRay For Maya (launch Vray slaves on clients), but you can change to assiociate any application you want. Just change the path to the .exe you want to control and the .png in the icon folder (use ICONS.psd) but keep the same name or change it by editing RNM.pyw.

      3. your clients number.
 Set how many clients you have, the RNM interface will adapt. You can add as many clients as you want, the limit is your desktop.

      4. yous hostnames, users and passwords of your clients and workstation for network access.
If you need more nodes than the default config just add (or remove) [Node#]'s section with the correct number, hostname, user and password in order to give psTools full access to your network. Don't forget to set the correct node's number in the [Nodes] section.



  How to use it :  


Open afstarter to launch your jobs with Afanasy:





Workstation commands :



 
  • open the windows task manager
  • run afWatch
  • run afserver
  • kill afserver
  • run afrender 
  • kill afrender
  • run Make Movie
  • run Keeper

 

Clients commands :

At startup RNM  checks your network to see if your clients ar running or not and repeat it every minute.









  • run "psList.exe"  (display client running processus)
  • remote desktop with Anydesk
  • run Vray Render Slave
  • kill Vray Render Slave
  • run Afanasy Render 
  • kill Afanasy Render 
  • wake on lan your client  
  • shutdown your client

 

Renderfarm commands :

(on every clients, workstation not included) :



  • Ping network clients access
  • run Anydesk on every clients (in case it was'nt running)
  • run all Vray Render Slaves
  • kill all Vray Render Slaves
  • run all Afanasy Renders
  • kill all Afanasy Renders
  • wake on lan your renderfarm
  • shutdown your renderfarm





  • open shared folder
  • copy/paste workstation folder on all clients (must be on)
  • copy/paste workstation files on all  clients (must be on)
  • delete folder on clients (must exist on workstation)
  • delete files on clients (must exist on workstation)
  • delete copy/paste temporary folder (on shared folder)
  • open Afanasy folder
  • open RNM config file


Et voila !
Enjoy and feel free to make comments if you use it.

JR
creature-studio

Aucun commentaire:

Enregistrer un commentaire