Warning: Declaration of syntax_plugin_alertbox::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /homepages/38/d684553722/htdocs/clickandbuilds/spatialecology_wiki/lib/plugins/alertbox/syntax.php on line 22
Warning: Declaration of syntax_plugin_alertbox::render($mode, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /homepages/38/d684553722/htdocs/clickandbuilds/spatialecology_wiki/lib/plugins/alertbox/syntax.php on line 45
Warning: Declaration of syntax_plugin_bliki::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /homepages/38/d684553722/htdocs/clickandbuilds/spatialecology_wiki/lib/plugins/bliki/syntax.php on line 75
Warning: Declaration of syntax_plugin_bliki::render($mode, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /homepages/38/d684553722/htdocs/clickandbuilds/spatialecology_wiki/lib/plugins/bliki/syntax.php on line 379 wiki:grappolo 
Grappolo is a project designed to teach cluster computation.
We have prototyped and developed a portable micro cluster computer (replicating the functioning of the biggest cluster computer facility in the southwest UK ). This tool is similar to the Raspberry pi cluster developed at Southampton University but is aimed towards teaching Geographic Information Systems methods rather than raw computation, it is very low cost ( ~ £130), portable and a perfect replica of an operating system running on a true high performance cluster computer.
This is still an an ongoing project! Not finished yet. We are working on the OS/ software installation and we will update this page as soon as grappolo will work smoothly fine.
Grappolo in press check out the official raspberry pi magazine (issue 46 - 2016) documenting a showcase use of Grappolo.
Project team and collaborators:
Stefano Casalegno, University of Exeter (Project leader)
Andrew Cowley, University of Exeter (brainstorming - software / OS installation)
Oliver Hatfield, Falmouth University (box design and construction)
Andy Smith, Falmouth University (software ideas support / cabling)
Victoria O'Brien, Spatial Ecology (software OS / installation)
Giuseppe Amatulli, Yale University (software applications for teaching)
Build a micro cluster compurer with the same operating system and software of a real HPC (High Performance Computer) for simulating big data processing.
Make it as small as possible so that grappolo can fligh in your hand lugage toghether with your laptop, book, toothbrush and newspaper.
Make it awsome so when you test supercomputing in a pub it will attract people's attention and they might want to learn more about it.
Make it low cost and open source so that is potentially replicable in schools or by any V2 open minded citizens willing to learn new amazing stuff.
List of material
We used 3 Raspberry pi's running a light distribution of Linux operating system. Below you can find codings for software installation and hardware assembling.
For the best box ever conceived in the history of boxes….
We used an awesome reddish acrylic Perspex and sawed an alluminium squared box section 15×15. Shopping list:
TOTAL HARDWARE COSTS : 136.75 shipping and VAT included
beside hardware costs, to assemble and install grappolo require much time and effort. If you like us to assemble a grappolo for you, please contact us
Template operating system
Grappolo consist of 3 raspberry pi we will call them
master (Grid schedler)
node1 (slave or processing node1)
node2 (slave or processing node2)
Each of these raspi share a template operating system which we will prepare in the following step. Successively, we will clone the template operating system and in a next step we will guide you through the customization of clones into different master and processing nodes.
df -h # find out for a partition that matches the roughly 1.something GB
# in our case is sdb2
sudo parted /dev/sdb
# enter in parted
$ sudo parted /dev/sdd
(parted) unit chs
(parted) rm 2
(parted) mkpart primary 8,40,32 866,80,9 # begin and end of the partition depend on your sd card size
Plug Ethernet cable from raspi 1 to home router
Insert SD in raspberry,
Power raspi 1
Open a terminal using a computer connected to the home router (via wireless or cable)
sudo nmap -sP 192.168.1.1-255
Starting Nmap 5.21 ( http://nmap.org ) at 2015-05-23 15:24 BST
Nmap scan report for Unknown-28-32-c5-ae-4e-19.home (192.168.1.64)
Host is up (0.0029s latency).
MAC Address: 28:32:C5:AE:4E:19 (Unknown)
Nmap scan report for ace.home (192.168.1.68)
Host is up.
Nmap scan report for Unknown-e8-06-88-9c-0f-66.home (192.168.1.70)
Host is up (0.10s latency).
MAC Address: E8:06:88:9C:0F:66 (Unknown)
Nmap scan report for raspberrypi.home (192.168.1.80)
Host is up (0.015s latency).
MAC Address: B8:27:EB:65:6C:FF (Unknown)
Nmap scan report for BThomehub.home (192.168.1.254)
Host is up (0.013s latency).
MAC Address: D0:84:B0:D7:AC:30 (Unknown)
Nmap done: 255 IP addresses (5 hosts up) scanned in 5.44 seconds
You are now ready to connect to raspi1 via ssh, default login and pass are pi, raspberry.
you are loged in the raspberry pi. Next steps are easy to do with the raspi-config GUI:
Change password to masterpi
Set time zone : internationalisation –> london
Set the memory split and change the value to 16 (in advanced options)
change hostname “ raspberry” to “grappolo” (in advanced options)
Add user admin (administartor) and remove user pi.
Password for user “admin” = “admin” …old pass for pi was masterpi
sudo useradd -m admin
sudopasswd admin #adminsudonano/etc/group
# Go through the file adding ,ad to the end of all of the groups that pi is in. eg: " adm:x:4:pi,admin "exitssh-X email@example.com
chsh-s/bin/bash#default terminal is bashsudo userdel pi
Set connections configurations
Connect the grappolo cluster to the outside world
We will generate a dynamic ip address to connect to the head node “grappolo” to the outside world. This will be be physically done ether via wifi dongle or via a usb-ethernet adapter depending on our working environment.
Connect nodes within the grappolo cluster
Within the cluster we create a static ip network using the Ethernet ports of each of the 3 raspi.
The /etc/network/interface configuration file determine the above parameters. We need to insert the name of the wifi network and password wile connecting using the wifi dongle or we need to uncomment the two eth1 lines if we are using an ethernet connection from the cluster to the external world. The grappolo configuration using the wifi dongle looks like this:
pi@grappolo ~ $ cat/etc/network/interfaces
iface lo inet loopback
iface eth0 inet static
#gateway 10.141.255.254# To connect via usb ethernet adaptor instead of wifi, uncomment the next two lines#auto eth1#iface eth1 inet dhcp
iface wlan0 inet dhcp
Next we need to reboot and log in via the usb dongle or ethernet-usb:
ssh -X firstname.lastname@example.org
And the resulting connection configuration is the following
We use the 10.141.255 internal static ip address to avoid any inconvenient ip-adress overlap between the dhcp extrnal and static internal cluster network configurations.
Grappolo is specifically designed to process spatio-temporal data nonetheless could provide excellent teaching platform for cluster processing other data sources not geographically related. We start to install geographic information systems and geospatial libraries and tools:
Data processing software
PROG.4 - Gdal/Ogr - GRASS
sudoapt-get install grass grass-doc grass-dev
Openforis Geospatial toolkit
sudoapt-get installgccg++ gdal-bin libgdal1-dev \\
libgsl0-dev libgsl0ldbl libproj-dev python-gdal \\
python-scipy python-tk python-qt4
# some of the above are already installedwget foris.fao.org/static/geospatialtoolkit/releases/OpenForisToolkit.run
sudochmod u+x OpenForisToolkit.run
PKtools - Processing Kernel for geospatial data
sudoapt-get install pktools
AWK, Python and friends
AWK, Python, Numpy and Scipy are installed as default Raspian-Jessie OS and as dependencies form the previous libraries.
R language and environment for statistical computing
mv R-3.1.2.tar.gz R_HOME/cd R_HOME/tar zxvf R-3.1.2.tar.gz
cd R-3.1.2/sudoapt-get install gfortran libreadline6-dev libx11-dev libxt-dev
makesudomakeinstall# get a coup of tea and start watching Battleship Potemkin you have an hour to wait
Insatall screen to eventually launch several process in different teminals and leave them open on the background. Screen : Multiplex a physical terminal between several processes (typically interactive shells)
sudo apt-get install screen
Setting Up an NFS Server
The default installation of Grid Engine assumes that the executables corresponding to the sge command are found on a $SGE_ROOT directory sitting on a shared filesystem accessible by all hosts in the cluster more info here.
For this purpose, we use a Network File System (NFS) which is a distributed file system allowing a user on a client computer to access files over a network. We are going to create and share the /usr/local/apps folder between master and slave nodes and be able to install the Grid engine executables and configuration files in the slave nodes. We first install the nfs server in the master:
sudoapt-get install nfs-kernel-server portmap nfs-common
# append "/usr/local/apps 10.141.0.0/16(rw,sync)" to the end of /etc/exports filesudo service rpcbind restart
/etc/init.d/nfs-kernel-server status to check nfs service status
In previous versions of Debian (ex.: Weezy) it was applied the concept of Run levels now replaced by target units. If using Raspbian Weezy, the run level need to be switched from 2 to 3
runlevel # to check your default run level
Follow the following steps if you need to switch into appropriate Linux Run Level (e.g. A run level is a state of init and the whole system that defines what system services are operating.)
Raspi by default is set to a state of run level 2 - Local Multiuser with Networking but without network service (like NFS) - and we want to switch to run level 3 - Full Multiuser with Networking. Once we are in level 3 we can use the two update-rc.d command below to allow automatic starting of the nfs servers at reboot.
# to set default runlevel = 3# change id:2:initdefault with: id:3.... it should look like this:# The default runlevel.# id:3:initdefault:sudo update-rc.d nfs-kernel-server defaults
sudo update-rc.d rpcbind defaults
sudoapt-get install nfs-kernel-server portmap nfs-common
sudonano/etc/exports # add the export as abovesudo service portmap start
if NFS is still not running at reboot try the lines below
sudoapt-get purge rpcbind
sudoapt-get install nfs-kernel-server portmap nfs-common
sudonano/etc/exports # edit the exports as abovesudo service portmap start # this didn't actually workedsudo reboot
Later we will create a folder in the client server @node1 and mount in as shared with the correspondent folder in grappolo.
Shut down grappolo, remove the sd card and insert it in a linux machine. Copy sd image file to computer disk as back up and clone template.
This image is also usefull as back up OS template file.
Now copy the clone template jessieandsoftwares.img image in two different SD cards.
Insert successively the new micro sd cards into a laptop (in our case is mounted at /dev/sdb ; unmount the card and copy the “.img” using the dd command.