Need help setting up mixed Blenderfarm(Win/Lin)

Blender's renderer and external renderer export

Moderators: jesterKing, stiv

fluetke
Posts: 8
Joined: Sat Aug 16, 2008 2:22 pm
Location: Bremen,Germany

Need help setting up mixed Blenderfarm(Win/Lin)

Postby fluetke » Tue Feb 21, 2012 10:17 am

Hi everyone,

I need your help in setting up a blenderfarm on one of our pools at the university.
The Workstations are Windows 7 Enterprise on i7 Quadcores, the Server will either be runnin a Debian based Linux or Solaris OpenIndiana, depending on Blender compatibility(so most likely linux).

While setting up Blender Netrender in a Desktop scenario is a breeze thanks to the Netrender Plugin, I'm having some problems to determine how to setup our special scenario which is:
* the blender slaves have to run as a service without user interaction on Win7
* the farm-master may only be controlled, from a certain IP-range
* the slaves may only be registered to a specific master(already included in netrender by setting masterip)
* the webinterface may only be reached either by one special admin pc, or some kind of user auth has to be included.

The only suitable renderfarm solution for our university atm seems to be the netrender, which (hopefully) has (almost) all the features we need.

My current ideas to implement this scenario, heavily depend on specific firewall rules on
master and clients, but to implement these rules i need to know which ports the netrender
uses for communication and data transfer.

Does it only use the port I specify in the Netrender-Panel (8000 for example),
thus would a simple rule allowing in and outgoing traffic from a certain ip range to
this port be sufficient to restrict the use of the farm, or do we need to consider other ports too?

Can I restrict block parts of the blender net render toolkit from accessing the
master server (like the client for example)?

How do I get to run blender with parameters as a service in windows 7, i tried doing it with instsrv.exe and srvany.exe as described in the microsoft knowledge base, but I can't find the master-server after starting the service, not even when using blender on the same machine.

And last but not least, any thoughts on establishing user auth for the webinterface, does blenders internal webserver read htaccess?

Any help on these points would be very appreciated, thanks.

PS: If anyone has any other suggestions on alternative renderfarm software that runs on linux, windows, and possibly solaris; features a web-interface with user auth(or maybe even per user render quota), is easy to setup and cheap, feel free to post.

fluetke
Posts: 8
Joined: Sat Aug 16, 2008 2:22 pm
Location: Bremen,Germany

Postby fluetke » Tue Feb 28, 2012 1:49 pm

Is there really no one who knows about the ports used for netrender?
Or if the webinterface/server supports htaccess?

SirDude
Posts: 941
Joined: Sun Oct 13, 2002 7:37 pm
Location: University of Minnesota (USA)
Contact:

Postby SirDude » Wed Feb 29, 2012 9:40 pm

Blender is so quick that most hobbiest's do not need to setup a network renderer, so I don't think a lot of people have used it. Both of your questions are easy to test though. (I would test them but its just as easy for you to test it as it is for me to, so your going to have to do the leg work) :)

Sorry...

I'm guessing that 8000 is the inital listening port just like other servers, and probably all you will need, otherwise there would probably be a setting to allow you to configure other port #'s... (youl'll have to test it though)
I would look up theeth's email address and email him with questions if
your having problems.

It uses the builtin python3.0 http.server module so if that supports .htaccess or something similar then the answer is yes. You'll have to do some digging to see if it does or not though.

fluetke
Posts: 8
Joined: Sat Aug 16, 2008 2:22 pm
Location: Bremen,Germany

Postby fluetke » Thu Mar 01, 2012 12:24 am

Thanks, after quite some time experiementing with netrender and commandline options I found nearly all options I needed:
starting blender on the commandline as either master or slave can be accomplished by using "blender -b slave.blend/master.blend --addons netrender -a -noaudio -nojoystick" where --addons enables netrender and the noaudio and nojoystick flags are only there to prevent some warnings.

Traffic seems to go through the specified port only, thus one simple firewall rule on the master was enough to prevent unauthorized machines from using the farm.

And I finally found a way to run blender as a service-like-thingy on windows 7 without using old incompatible windows xp trickery, so all is well.

I might do a tutorial or describe my setup at some point in the future(if anyone's interested)

Emo
Posts: 2
Joined: Mon Mar 05, 2012 7:29 pm
Location: Oklahoma USA

Postby Emo » Mon Mar 05, 2012 7:31 pm

I would absolutely be interested in a tutorial. I'm trying to figure out which distributed rendering route I'm going to try to take.

fluetke
Posts: 8
Joined: Sat Aug 16, 2008 2:22 pm
Location: Bremen,Germany

Postby fluetke » Mon Mar 05, 2012 8:49 pm

Ok, I think I'll do a video tutorial as soon as time allows.
In the meantime here the description of my setup:
1x Linux Server as master(I'm using debian here)
6x Windows 7 Workstations(i7 SandyBridge) as Slaves

Setting up a renderfarm with blender is amazingly straight forward.

Creating the master:
1a. Setting up the master server is a pretty easy task, you open blender with the default scene.
1b. Delete the cube and the lights but not the camera(this is just to keep the filesize down, you can skip this step)
2. Open the "User-Preferences"-window and navigate to the Render-section in the Addons-tab.
3. Then enable the "Network Render"-addon by clicking the apropriate checkbox and close the preferences window.
4. Select "Network Render" from the render dropdown-menu in the toolbar.
5. Open a Properties-pane(f.k.a. Buttons-Window) and switch to the render buttons, now select Master and enter the ip-adress, portnumber and path for temporary files into the respective fields, you can select further options like broadcasting the server-ip on the network if you want, but that's not necessary.
6. Save your blender scene as master.blend and put in on your master machine in a directory thats writable and readable by the user running the blender master.
7. Now you can start your blender master by using the following command in a terminal:

Code: Select all

blender -b /path/to/master.blend --addons netrender -a -nojoystick -noaudio

8. If you wish to restrict access to your renderfarm to certain computers, just add a firewall rule that will block all traffic on the blender port except from your authorized machine.(I'll dive deeper into the details when i do the video tutorial)

Setting up the slaves:
1. For setting up the slaves, repeat steps 1 to 4.
2. Same as step 5 above, with the exception that you click slave in the Properties-Pane and enter the information about the master(ip and port) into the respective boxes. The temporary directory should point to a directory on your slave pc, that belongs to the user running blender. (No shared folder needed)
3. Save your blender scene as slave.blend and put it onto the slave machines.
4. On each slave, depending on the os do the following:
Linux: run "blender -b path/to/slave.blend -a --addons netrender -noaudio -nojoystick"
Windows: run the command above in your command shell or open the file with blender in gui mode and hit render
Alternatively open the windows Taskplanner and create a new task "Blender Slave" with the command above as an action and set the trigger to the value you like(start when idle for example). Save the task and voila - you just created your very own renderfarm.

5. If you find yourself unable to detect the master from a blender slave or no slave shows up in blenders webinterface, check the firewall settings and allow blender full access on your renderfarm port.

That's it for a quick summary on how to setup blenders netrender, the video tutorial will provide more detailed information on how to setup the system daemon on linux and windows and how to set the firewall rules and tasks, but for the moment i hope that this short overview will suffice.

you-and-me
Posts: 2
Joined: Tue Apr 17, 2012 6:08 pm

CPU or GPU RENDER FARM

Postby you-and-me » Tue Apr 17, 2012 6:24 pm

fluetke

Any reason why you did not opt for a render management, like, DrQueue (another layer?) and netrender takes care of this through CMD.

I am looking to set-up a budget Farm, but with so many pips having problems with GPU rendering, i am not sure which route to take.

Do you know, if you set on the master (.blend), the rendering to be through GPU, that all the slaves will do so too? This is lay question and i obviously don't have access to a farm to try?

The underlining question is do i go for dual/quad core cpu based nodes or a single cpu with Nvidia 96 core cuda or RD multi-thread GPU nodes?

Any thoughts and thanks for the heads up on setting up a network. I too would be interested in A video Tutorial as i suspect would a lot of pip on youtube too.

fluetke
Posts: 8
Joined: Sat Aug 16, 2008 2:22 pm
Location: Bremen,Germany

Postby fluetke » Wed Apr 18, 2012 4:31 pm

Hi,

Any reason why you did not opt for a render management, like, DrQueue (another layer?) and netrender takes care of this through CMD.


The reason I picked blender netrender, instead of drqueue or any other separate management layer, is that, at our university, the computer pool we use for rendering runs a wild mixture of different blends of linux(debian, ubuntu, fedora, arch,...), solaris, macos and windows(xp, vista, 7). And there simply weren't any good and free(as in free beer) alternatives that support all plattforms we currently operate on. While Dr.Queue does support most, if not all of them, it's a pain i.t.a to setup and configure correctly and the last release of drqueue dates back nearly 2 years.
For me thats enough time to consider drqueue a dead project, despite efforts of porting it to python(nobody knows when or if there'll ever be a usable release of the python version).
All other options that I know of, like ,for example, Farmerjoe or Renderpal, either don't offer the features we need(SSL support, status website, direct submission from within blender, support for baking on network, etc.) or cost to much money.
Thus, the only feasible way, that provides us with an easy way to setup, configure and update a renderfarm was blenders integrated netrender.
We do not plan to support any other 3D-Suite apart from blender, btw.

I am looking to set-up a budget Farm, but with so many pips having problems with GPU rendering, i am not sure which route to take.

Do you know, if you set on the master (.blend), the rendering to be through GPU, that all the slaves will do so too? This is lay question and i obviously don't have access to a farm to try?

I'm afraid I can't be of much help when it comes to GPU rendering, as far as I know Cycles is the only render engine supported by netrender, that has the gpu rendering support build in. Considering the settings for GPU rendering, I'd say you have to enable this in all slave.blends and the master.blend. One thing that could help you in testing your settings is to run multiple instances of blender on the same machine, which act as your master and slaves, or to use a virtual machine to test multiple setups.

The underlining question is do i go for dual/quad core cpu based nodes or a single cpu with Nvidia 96 core cuda or RD multi-thread GPU nodes?

At the moment, with GPU rendering support in Blender at an early stage, I would definitely go for the multi-core/multi-cpu approach, an don't focus to much on the GPU side. With current GPUs costing nearly 500€ or more, and CPUS with decent multithreading/multicore capabilitys available at 200€, the cpu approach makes more sense to me, especially since you can easily upgrade your nodes with GPUs later on, if you need the additional processing power.

Any thoughts and thanks for the heads up on setting up a network. I too would be interested in A video Tutorial as i suspect would a lot of pip on youtube too.

Your welcome, I'm currently working on my first video tutorial, about setting up a farm, this will take a while to complete, I'll post it here when it's ready.

Jeager
Posts: 3
Joined: Thu Aug 16, 2012 11:09 am

Postby Jeager » Fri Aug 17, 2012 1:59 pm

fluetke are you still alive ? i have some question for you but i can't pm you :(

fluetke
Posts: 8
Joined: Sat Aug 16, 2008 2:22 pm
Location: Bremen,Germany

Postby fluetke » Fri Aug 17, 2012 7:05 pm

Hi,
I'm still here, unfortunately I've not yet been able to do the video tutorial, since I had other things on my mind(bachelor report).
Surprisingly I never got any notification about PMs, hm strange. Anyhow, how may I help you?

noblend
Posts: 3
Joined: Tue Apr 23, 2013 1:24 pm

Details on Blender as service on Win 7

Postby noblend » Tue Apr 23, 2013 1:29 pm

fluetke wrote:And I finally found a way to run blender as a service-like-thingy on windows 7 without using old incompatible windows xp trickery, so all is well.


Hello fluetke,
i was wondering if you could explain this part : running Blender as a service on Windows 7 for the slaves part.
From now i have a configuration where all PCs (Master, clients & slaves) run on win 7 64bits, it works well, but need this service part for the slaves. I'm also in an educationnal environement.

The topic is a bit old, but...
Anyway thanks for this feedback post.

fluetke
Posts: 8
Joined: Sat Aug 16, 2008 2:22 pm
Location: Bremen,Germany

Re: Details on Blender as service on Win 7

Postby fluetke » Tue Apr 23, 2013 3:06 pm

noblend wrote:
fluetke wrote:And I finally found a way to run blender as a service-like-thingy on windows 7 without using old incompatible windows xp trickery, so all is well.


Hello fluetke,
i was wondering if you could explain this part : running Blender as a service on Windows 7 for the slaves part.
From now i have a configuration where all PCs (Master, clients & slaves) run on win 7 64bits, it works well, but need this service part for the slaves. I'm also in an educationnal environement.

The topic is a bit old, but...
Anyway thanks for this feedback post.


Well we're not exactly running it as service, that proved to cumbersome.
Instead we're now using the Windows Task Scheduler to run blender when the computers are idle. It basically executes the blender command line "blender -b path/to/slave.blend -a --addons netrender -noaudio -nojoystick".
You should be able to easily find the task scheduler, using the search function of the win7 start menu.

BTW: Unfortunately I won't be able to do the tutorial video.

noblend
Posts: 3
Joined: Tue Apr 23, 2013 1:24 pm

Postby noblend » Tue Apr 23, 2013 4:35 pm

Thanks for your quick reply, after trying for hours to start it as service i finally give up (it could be launched as service but the parameters seems to break the command)

I write the commands here, perhaps someone will make it works:

This one works to start it as service but missed the parameters to specify the scene ect...

Code: Select all

sc create blendernode binpath= C:\tmp\blender\blender.exe displayname= "BlenderNode" start= auto


And this one with parameters seems to break the syntax

Code: Select all

sc create blendernode binpath= C:\tmp\blender\blender.exe -b "C:\tmp\slave.blend" -a displayname= "BlenderNode" start= auto


If anyone try it, to delete the service (you can view it in the task manager) type:

Code: Select all

sc delete blendernode



And for my case i will use distant scripts to start / stop the slaves i think.
Good blend !

farbw3rk
Posts: 49
Joined: Tue Sep 18, 2012 7:03 am

Postby farbw3rk » Sat May 04, 2013 7:32 pm

maybe you could use a servicewrapper like instsrv or srvany. never tried it with blender, but it should work (...ok, last time i used the above was on an nt4-server ^^).
what about calling a batchfile as a background-process? psexec on the master for the slaves would to the job, too.

noblend
Posts: 3
Joined: Tue Apr 23, 2013 1:24 pm

Postby noblend » Thu May 09, 2013 4:38 pm

There is a new service wrapper since NT5, it's the "sc create blahblah"

Can't manage to run it properly, even for the batch in startup: end up with error code when psexec distant (code 11).

Environment is a bit secured, and didn't find a suitable way to this.

So i think i look at other network services.

Thanks anyway.


Return to “Rendering”

Who is online

Users browsing this forum: No registered users and 0 guests