Script TeamRender server and client
On 17/11/2015 at 17:38, xxxxxxxx wrote:
I'm looking for a way to integrate TeamRender more fluidly into our pipeline. We use Squidnet as our farm management software, so I'm trying to figure out if we can launch a server and clients on the command line using it instead of having to set things up manually. TeamRender in general seems to be designed backwards with regards to integration in a larger render farm...clients/slaves should connect to masters/servers, not the way TeamRender does it.
I assume I'd need to start a server first (pointing to the scene file I want rendered along with other job details), then start clients and point them to the server. Is this possible to script or implement using Python in C4D now? I have a small amount of experience in using Python in the main app, but I don't know what options, if any, the TeamRender apps have. Any info is appreciated.
On 18/11/2015 at 01:41, xxxxxxxx wrote:
the Team Render Server and clients are typically running all the time. New render jobs are assigned using the server's web interface.
This web interface is implemented as a Python HTTP server running inside the server application. You can send your own HTTP commands to that server to configure the server:
Create your own Team Render Front-End
The HTTP server is written in Python and is delivered in Cinema in plain text so you can analyze or extend its functionality directly:
Extend the Team Render Server
The best way to extend the server is to add a new plugin that adds a new functionality to it:
Extending the Team Render Server with Plugins
On 18/11/2015 at 07:59, xxxxxxxx wrote:
Woof...I wouldn't exactly call that integration....
Seems like it would be somewhere on the order of infinitely simpler if the server accepted the normal CLI switches that the command line or GUI C4D executables accepted and the client accepted only one CLI switch that pointed it to the name/IP of the server. If no CLI switches are provided, they operate as they do now.
Yes, in small, C4D-only environments, TeamRender can be running all the time. In every other scenario, though, that's not an option. Given the information you provided, it looks like we'd have to write our own plug-ins for both the server and the client to give them this functionality? Given what I know of the current state (lack) of Python documentation, that seems...difficult.
Has anyone done something similar to what I'm trying to do already?
On 19/11/2015 at 08:57, xxxxxxxx wrote:
if you want that a client automatically connects to the server on startup you can define a text file c4d_net_server.txt next to the client. In that text file you can define the IP adress, port and token of the server it should connect to. This is described in the Team Render documentation in the Cinema help.
It seems that there are not special command line arguments for the client and server. You could implement you own command line arguments with a custom plugin that catches the given arguments and sets up the render job. But I haven't tried that myself yet.
On 19/11/2015 at 12:52, xxxxxxxx wrote:
Thanks! I don't know why I've never run across that .txt file hack in the months I've been searching for a solution, but that should help me to some degree.
On 10/12/2015 at 12:28, xxxxxxxx wrote:
So, after some work with this, I've run into a couple problems. For starters, your documentation (at least for R17) disagrees with itself on the formatting of the line that goes in c4d_net_server.txt. The correct format of the two displayed is machinename:port;securitykey. That threw me for a loop until I read over it again and realized I was using two colons to separate the options as one of the indications in the documentation incorrectly made.
Next, I've configured the preferences of C4D to start the Team Render server by default, which it does when I launch the GUI version of the app. It does NOT do that, however, when I run the command line version of the app. Why?
I need to be able to start a command line instance as normal and have it become the server so the clients can connect to it.
On 10/12/2015 at 12:39, xxxxxxxx wrote:
Additionally, if I start the GUI app so that the Team Render master service starts when the render starts, the client will connect as expected. Nothing happens, however, on the client after it connects and is verified. It just sits there. Isn't it supposed to join the fun and help render what is rendering on the master?
On 07/01/2016 at 09:20, xxxxxxxx wrote:
I'm terribly sorry! I talked to our support about your issues and then... well, then I forgot you, or rather lost you in my pile of notes. So sorry!
Of course you are right about the wrong documentation. It is already scheduled to be fixed.
The Team Render Server can not be started without a GUI. Sorry. I have forwarded this as an idea for improvement.
Lastly, I'd recommend to get in contact with our user support as these are not really development or SDK related questions. I think, support will be able to help far better and faster, than we are here.
On 07/01/2016 at 09:24, xxxxxxxx wrote:
Yeah, this has grown to more of a support issue than an SDK issue. I'll go that route.