RPi Bramble Help

Configure the cluster

SSH keys

Each machine has its own ssh key and these need to be distributed. I used a grid like this and ticked off each one as I did it.

ssh_grid.jpg

The keys are copied using:

ssh-copy-id user@ip_address

If you have already updated the hosts file for all the machines with the host names and IP addresses of all the machines in the system then you can use:

ssh-copy-id user@hostname

Hosts files

Once the ssh keys are copied the hosts files need to be update if they have not been already. Mine all look like this:

127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters #127.0.1.1 master 192.168.0.51 master 192.168.0.52 node1 192.168.0.53 node2 192.168.0.54 node3

Machine file

The machine file that was created when the master node was created now needs to be updated to list all the nodes you want to include in the cluster.

nano machinefile

It should list all the nodes:

master node1 node2 node3

Testing

An initial test can be done by running the following from the command line of the master node.

mpiexec -hostfile machinefile -n 4 hostname

If the following output occurs then the cluster is functioning correctly:

andrew@master:~ $ mpiexec -hostfile machinefile -n 4 hostname master node2 node1 node3 andrew@master:~ $
Last modified: 22 April 2024