I suggest looking at Dispy - the distributed computation python module.
To run a program on a number of Raspberry Pi's (nodes) from a PC (server - assume IP is 192.168.0.100
):
Install an operating system on each RasPi
Attach each RasPi to your network. Find the IP (if dynamic), or set up static IPs.
(Let's assume that you have three nodes, and their IPs are 192.168.0.50-52
)
Set up Python (if not already), install dispy
, then run dispynode.py -i 192.168.0.100
on each RasPi. This will tell dispynode to receive job information from the server.
On the PC (the server), install dispy
, then run the following python code:
#!/usr/bin/env python
import dispy
cluster = dispy.JobCluster('/some/program', nodes=['192.168.0.50', '192.168.0.51', '192.168.0.52'])
You can also replace /some/program
with a python function - e.g. compute
.
You can also include dependencies such as python objects, modules and files (which dispy
will transfer to each node) by adding depends=[ClassA, moduleB, 'file1']