PDA

View Full Version : Building your own BOINC farm (BOINC-RPC)



AMDave
05-07-2006, 09:10 AM
Building your own BOINC farm by using RPC to control your BOINC boxen.

I don't recall who mentioned it in the forum, but someone raised the question of remote control of BOINC clients across the network.

BOINC provides a Remote Procedure Call (RPC) interface to allow remote connection to clients by the BOINC Manager application, using TCP port 1043, but it takes a little preparation, which I will try to help with here.

BEFORE YOU START:
I run a fixed IP address network, so if you use DHCP the notes here don't apply. I am using version 5.2.13 of the Windows BOINC client and the 5.2.6 version for Linux. If you are doing this on a network that is not yours, ensure you have permission as any good network manager will spot this immediately. I offer no reparations to any problems you may encounter or create by following these instructions, so try it out at your own risk.

SECURITY:
The very first thing you want to do is log into your Router firewall and block access from the WAN to TCP port 1043, so that no one else can commandeer your hard working BOINC client from the other side of the world (or even worse - from another Team !!!). OK so now you are protected from the outside world. Please make sure that you do the external firewall protection item. The last thing you want is to introduce another unprotected port to your computer.

Next make sure that if you have firewall software running on your machines, that TCP port 1043 is open for business. I offer no further advice on this here, other than to consult your firewall software manual.

WINDOWS REMOTE CLIENT:
It seems that RPC only works when the client is installed as a service in Windows. If you have the client running in Single or Shared user mode you will need to re-install as a service. It should leave all your project configuration files alone – but to be safe make a backup copy of the whole folder. Run the BOINC installer, select "Remove" to remove the client software. Then, when it is finished, run it again and ensure you select "Install as service".

Now your client is installed as a service, but it will have started immediately, so right click on "My Computer", select "Manage" to open the "Computer Management" console. Open the "Services and Applications" folder, then open the "Services" folder. Find the BOINC service, right-click on it and select "Properties" or or double-click on it to open the properties dialog. Select "STOP". When the client is stopped you should be able to enter "-allow_remote_gui_rpc" into the "Start parameters" field. Don't re-start the service yet. We need to allow access to the client.

Go to the BOINC folder on the drive you installed BOINC into. Open the file "gui_rpc_auth.cfg". You will find a long code already there already as BOINC generates and inserts a new default password the first time you install. Replace this with a password of your choosing (don't lose it).

Next, in the same folder create a new file called "remote_hosts.cfg". In this file type in the IP address of your main workstation (the one that you want to control all your clients from) and the IP addresses of any other machines that you want to be able to control this client from. Each address should be on a new line. Save the file and close the text editor.

Now we should be ready. Go back to the "Computer Management" window and restart your BOINC service. That should be the job done on the client.

Go back to your main workstation (the one that you want to control all your clients from) and in the BOINC Manager window, select the "File" menu item "Select computer...". In the "Host" field enter the IP address of the remote client you just set up, and in the password field enter the password you chose and entered into the "gui_rpc_auth.cfg" file above. Click OK. Even at 100 Mbps, mine sometime take a couple of seconds to connect. If you are running a wireless network be patient.

If you get the message saying it could not connect, go back through the instructions: check the IP addresses, software firewalls, passwords, use Task Manager on the remote machine to check that BOINC is definitely running.

LINUX.
I am assuming that you know how to use the command line and already have BOINC running from the crontab, or at least a shell script and have mastered the art of ipchains or iptables to configure your own firewall, or at least have a helper program that you use to do this.

The rest is pretty much the same. Fix up your firewalls. Edit your batch script to add in the extra start parameter. Update the two files, as per above. Restart your BOINC client. Connect from a BOINC manager on a remote workstation.

NOTE:
With the client running as a service and RPC enabled the BOINC manager has no problems connecting to the client on the local host. So you still have local control on each machine you have just set up as a remote client.

CAUTION:
I was able to get 2 BOINC Managers to connect to the same remote client at the same time. Normally I like to test things to complete and utter destruction (as is my wont) but this time I did not try to break anything, as my clients are live at the moment, so I don't know what damage can be done by executing RPC commands to control a remote client from 2 hosts at the same time. I guess you will just have to be careful.

CONCLUSION
If you didn't get this to work, don't be put off. You may need to learn a little more about networking (Routers / DHCP / DNS / Firewalls and all that guff) but you too can get there. In the mean time, don't forget to re-install your BOINC client in Single or Shared user mode if you can't get the Manager to control it locally again.

If you jumped back in surprise yelling "w00t!", then like me you've probably been spending a little too much time at the computer keyboard, but let me be the first to congratulate you.

Happy BOINC'ING, you new BOINC farmer, you!

AMDave.

drezha
05-07-2006, 09:33 AM
http://img.photobucket.com/albums/v289/drezha/Simlies/worship.gif

Off to try it now. Been wanting to do that for a very long time! :D

mitro
05-07-2006, 02:32 PM
...or just use BOINCview (http://boincview.amanheis.de/)

EDIT: Only runs on Windows, but should monitor Linux clients.

AMDave
05-07-2006, 03:13 PM
thanks for the tip mitro.
I'd not seen that add-on yet.

Quick review:
In a windows environment works well to give a quick overview of what your clients are doing.
Does not support full control of the clients (bummer)
No intention to supply add-on for Linux, Unix or MacOS (poop!)
Not open source, so I can't mod the code.
Still, it probably statisfies the wants of 90% of BOINCers.

My thoughts:
You don't really need it - unless you have so many nodes that you lost count of them LOL
Once RPC is enabled on the remote clients, you can run multiple BOINC Managers on your main workstation (be it Linux, Solaris, MacOS, Windblows, whatever) simultaneously and see what all of them are doing at once and have all the control you get if you ran the Manager locally.

None the less, it's good to be able to see them all in a single view.
I like that they added in the hide/show columns feature.
ver 1.3 beta is available and you should try it.
It's more than double the size of ver 1.2.2 because the added the embedded MySQL server to handle all the data and logging.
To me that's overkill. They could do it smaller and faster in an encrypted text/XML file and I'm not happy about the security risks with the embedded DB (I can't check the security code and I can't see what they might have put in there - in short I don't trust it), so I removed it again.
Looked good though.

NVM
05-07-2006, 03:23 PM
BoincView, so easy. just make sure all your clients are in a shared folder.personally, i've given up on "centralized control" methods as they only increase network chatter and theoretically slow things down.

AMDave
05-07-2006, 03:40 PM
Running BOINC from a remote folder would cause more network chatter (logging, client and wu downloads and uploads etc.) than you would get if you opened the Manager once in a while to check on a remote host that was happily looking after itself, surely?

Have you had a different experience?