I always find Christmas challenging when asked what I want. I do keep my Amazon wish list topped up with 200+ items, which is great for little things. But for special items I am not very good.
This/last year I did a bit of research and settled on the
Raspberry Pi Cluster Hat v2 inclusive. Great it comes with 4x Raspberry Pi Zeros! Not so great
Out Of Stock :(
But you could buy the
Raspberry Pi Cluster Hat v2 board on its own. OK, "add to basket" then add the Pi Zeros and the SD cards and "Order rejected"?!?
Turns out Pi Zeros are
Still restricted to one per customer, grrr.
So I ordered one from
pimoroni.com, one from
thepihut.com and a kit from
ModMyPi.com an another from
ModMyPi.com.
All came in plenty of time for Christmas and then Christmas came and went and I examined all the pieces but never got around to putting it together.
Until a week before my
super illness when I watched all the
Videos and actually built the thing. I even burnt all the SD Cards, but then got ill and forgot about it.
Now I am Back Baby!
Before I go any further the video is for the V1 and the USB power port has moved now in the V2.
Although there is this video
using no SD cards for the Pi Zeros I wanted to first get the basic setup working. I had bought all those SD cards, after all.
Had to download the
Master image and the
Slave image. I could have downloaded one image per Pi, ending up with 5 image files, but instead I opted to manually modify the slave images.
Once the slave image was written to each SD card I had to mount it and update the
cmdline.txt, just tweaking Pi Zero identifier.
" quiet init=/sbin/reconfig-clusterhat p1"
changing the p1 to p2, p3 ,p4 one for each Pi Zero.
Also enabled
ssh for each card
touch ssh
Both those changes are on the vfat boot partition so you could make the change on almost any computer.
The Pi Zeros are powered by the Cluster Hat and the Cluster Hat is powered by the Raspberry Pi 3, that in turn, it powered by an official Raspberry Pi Foundation power supply.
Plugged in a USB keyboard and HDMI monitor and booted up ...
There are no instructions but I noticed the commands used in the videos
clusterhat on p1
the first Pi on the Cluster Hat powered up, then I did the same with the 3 other Pis (you can just run
clusterhat on
to get them all to turn in one go)
now what? Strangely I cannot find any documentation on what to do next, but there was something in the videos about networking.
ifconfig only shows ipv6 addresses and I know nothing about ipv6. Tried to ping the ipv6 address and ping did not like it. But I know ping does support ipv6 as it has options for it so I am doing something wrong :(
Found a note on one of the videos that DHCP might be required. plugged in ethernet and rebooted.
Cool now can I ping(when up) p1.local, p2.local etc
the resolved ip addresses are directly from my local sub-net DHCP.
but I want to do this off the grid, so I try again with no network, reboot, ping works(p1.local, p2.local etc) and get
169.254. addresses
that look random
169.254.102.163
169.254.116.199
169.254.114.226
169.254.156.34
If I take down the Pis with
clusterhat off then on again, they have the same ip addresses. reboot whole Cluster Hat and still get the same weird ip addresses.
OK that's networking down, though I have never come across this
.local stuff before ...
Next step, make all the machines accept key less ssh connections.
ssh-keygen
Ran directly on the Master Pi (no parameters)
ssh-copy-id pi@p1.local
enter password:
now I can
ssh pi@p1.local
and get no password prompt
repeat for p2,p3,p4
FYI I wanted a short password and the
passwd command was giving me lip about lack of complexity and length, fix was
sudo passwd
also did not ask for current password.
now what ???
It is a mini self contained Pi network. Need to think on this.