Yet Another Raspberry Pi Cluster

Parallel PiI finally got around to building my Raspberry Pi cluster. I am interested in networking, microcomputers, security, and wanted a low-cost platform to play with.

It was surprisingly easy to set up, 7 RPIs, a Dog Bone Stack Case, heat sinks, some cables, and an inexpensive network switch.

img_20161116_163004After purchasing my Raspberry Pi microcomputers, (thanks MicroCenter!) assembling the Dog Bone Case took less time than I expected.

I set upĀ Raspbian OS on one computer and copied the image to my laptop so I could image new nodes quickly. There are enough guides on how to set them up online that I won’t bother doing a step-by-step guide.

Basically the setup was:

  1. Install OS & update.
  2. Change default password.
  3. Set timezone, keyboard, etc…
  4. Set LAN IP statically.
  5. Set hostname and make hosts file.
  6. Generate SSH keys.
  7. Install software:
    1. sudo apt-get install mpich2 mpich python-mpi4py -y
  8. Mount NFS share on boot.
  9. Remove unneeded software:
    1. sudo apt-get update
    2. sudo apt-get purge libreoffice-impress libreoffice-draw libreoffice-math -y
    3. sudo apt-get purge wolfram-engine penguinspuzzle scratch dillo squeak-vm squeak-plugins-scratch sonic-pi idle idle3 netsurf-gtk netsurf-common python-pygame -y
    4. sudo rm -R /home/pi/python_games
    5. sudo apt-get autoremove -y
    6. sudo apt-get clean
  10. Disable X Server.
  11. Reboot.

img_20161118_125447I picked up a SainSmart relay to control the cluster. I have a powered USB hub to power the Pis and I use the relay to supply or cut power to the hub. This way it’s easy to power on the stack remotely (via SSH.)

 

2 thoughts on “Yet Another Raspberry Pi Cluster”

  1. Here is an example of my .nodelist file (which lives in /home/pi and is needed by MPICH.)
    # .nodelist
    192.168.11.9
    192.168.11.11
    192.168.11.12
    192.168.11.13
    192.168.11.14
    192.168.11.15
    192.168.11.16
    192.168.11.17
    192.168.11.18
    192.168.11.19
    192.168.11.20
    192.168.11.21
    192.168.11.22
    192.168.11.23
    192.168.11.24
    192.168.11.25
    192.168.11.26
    192.168.11.27

  2. And my /etc/hosts file for node1

    # /etc/hosts
    127.0.0.1 localhost
    ::1 localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters

    127.0.1.1 node1
    ### MY SMB NETWORK SHARE
    192.168.11.222 VIDEO
    ### MY NFS NETWORK SHARE AND NODE0
    192.168.11.9 BEOWULF
    ## Comment out the node you are on
    #192.168.11.11 node1
    192.168.11.12 node2
    192.168.11.13 node3
    192.168.11.14 node4
    192.168.11.15 node5
    192.168.11.16 node6
    192.168.11.17 node7
    192.168.11.18 node8
    192.168.11.19 node9
    192.168.11.20 node10
    192.168.11.21 node11
    192.168.11.22 node12
    192.168.11.23 node13
    192.168.11.24 node14
    192.168.11.25 node15
    192.168.11.26 node16
    192.168.11.27 node17

Leave a Reply

Your email address will not be published. Required fields are marked *

4 × 3 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.