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

  2. And my /etc/hosts file for node1

    # /etc/hosts localhost
    ::1 localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters node1
    ## Comment out the node you are on
    # node1 node2 node3 node4 node5 node6 node7 node8 node9 node10 node11 node12 node13 node14 node15 node16 node17

Leave a Reply

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

19 + twenty =

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