Setting up the software

There are three different methods to setup the ClusterCTRL software - you only need to follow ONE of these guides below (Simple/Intermediate/Manual).

The pre-created images (Simple/Intermediate) for each node (Raspberry Pi Zero/Compute Module/A+) and the Controller below are currently based on Raspbian Buster with Desktop (FULL and STD[Recommended]) and Lite (2019-09-26).

NEW It's now possible to mix/match booting nodes with or without an SD card. See the HOWTO for details on setting this up once you're running one of the CBRIDGE or CNAT images below on the controller.

 

Download an image for each Pi (Controller/P1/P2/P3/P4) and write to the SD cards. We have Controller versions available as Buster with desktop Graphical interface and recommended software (FULL), Buster with desktop (STD) and Buster Lite (LITE), you only need to download one version.

The CBRIDGE images below bridge the USB Gadget Ethernet from the Pi Zeros to eth0 on the Controller allowing them to obtain an IP address from a DHCP server on your local network.

The CNAT image uses NAT (Network Address Translation) to automatically share either Ethernet or Wifi connection on the Controller with the Pi Zeros. See the official documentation for details on how to setup WiFi on the controller. The Pi Zeros will automatically be assigned a 172.19.181.X IP address where X is the pX number (172.19.181.254 will be used on the controller).

See the HOWTO if you wish to boot the Pi Zeros without SD cards.

OR you can download all of the images in a single .zip file (CBRIDGE).

  • Desktop Combined Buster (FULL) with Desktop Controller and Lite P1/2/3/4 images.
  • Desktop Combined Buster (STD) with Desktop Controller and Lite P1/2/3/4 images.
  • Lite Combined Buster Lite Controller and Lite P1/2/3/4 images.

Follow the standard instructions to unzip and write each of the above images to the corresponding SD Card.

Username: pi
Password: clusterctrl

We strongly advise changing the pi users password and resizing the filesystem using the raspi-config tool on your first login.

SSH

SSH is no longer enabled by default on any of the images, to enable SSH you will need to create a file named "ssh" in the boot partition - see the Raspberry Pi blog entry for more details, this needs to be done on both Controller and Pi Zero images (from the Controller Pi the Pi Zeros can be accessed via the serial console when SSH is disabled).

 

Download the images below (depending on the mix of FULL/STD/LITE) for the controller and Pi Zeros.

Follow the standard instructions to unzip and write the above images to your SD Cards for Controller/P1/P2/P3/P4.

To convert the controller image you need to append " quiet init=/sbin/reconfig-clusterctrl TYPE" to the cmdline.txt file in the boot (first) partition using either a Windows, Mac or Linux machine. Replacing "TYPE" with either "cnat" for a controller with NAT (Network Address Translation) or "p1", "p2", "p3, "p4", etc. for a Pi Zero nodes.

See the HOWTO if you wish to boot the Pi Zeros without SD cards.

Username: pi
Password: clusterctrl

We strongly advise changing the pi users password and resizing the filesystem using the raspi-config tool on your first login.

SSH

SSH is no longer enabled by default on any of the images, to enable SSH you will need to create a file named "ssh" in the boot partition - see the Raspberry Pi blog entry for more details, this needs to be done on both Controller and Pi Zero images (from the Controller Pi the Pi Zeros can be accessed via the serial console when SSH is disabled).

The images above are configured to obtain an IP address automatically using DHCP (Pi Zero network is bridged to eth0 on the Controller Pi).

 

Manually configure the software for Controller/P1/P2/P3/P4, this can be used to customise your own images or to "port" to different distributions.

Below are a list of steps we take when creating a new image. You should be able to follow these as a base to create/modify your own custom images.

  • Copy base Raspbian image file and rename for the controller.
  • Setup variables for the build.
  • Use losetup to create a loop device for the new file.
  • Enable access to the partitions on the loop device using kpartx
  • mount both root and boot filesystems
  • Install any updates, remove dhcpcd5 and install required tools
  • Force boot to be text mode
  • Setup getty on ttyGS0 (The USB gadget device)
  • Setup the hostname and /etc/hosts file
  • Download/Extract ClusterHAT software/config files
  • Copy controller config file into place
  • Disable auto filesystem resize
  • Setup /boot/config.txt file
  • Cleanup
  • Unmount, cleanup partitions and loop devices
  • Copy the controller image for p1/p2/p3/p4
  • Use losetup to create a loop device for the new file.
  • Enable access to the partitions on the loop device using kpartx
  • mount both root and boot filesystems
  • Setup the cmdline.txt for P1 or P2/P3/P4.
  • Unmount, cleanup partitions and loop devices

The build script can be downloaded/viewed here.

Once the controller image has been created this can be modified to change into images for p1/p2/p3/p4 by editing the cmdline.txt file.

The scripts above should not be ran before reviewing the code and understanding exactly what they're going to do on your system. AKA don't blame me if they cause data loss/etc.


Use of our images is optional if you prefer to setup the OS/network to your requirements. A copy of our controller script is available to download