Over the last couple of years we’ve experienced a global shortage of Raspberry Pis. The reason has been the COVID19 pandemic and Oracle building the largest Rpi cluster (that we know of). It’s still hard to find devices and the few available are really expensive. Are there any alternatives? Well, our friends from Arm have developed virtual Rpi on Arm Virtual Hardware that will make your life easier. You will need to enroll in the Arm Developer Program.
What is Arm Virtual Hardware?
Arm Virtual Hardware provides models of Arm-based processors, systems, third party hardware in the cloud. They have created
Deploying Virtual Raspberry Pi 4
We will create a Raspberry Pi 4 Virtual Machine. In DEVICES in the menu click on CREATE DEVICE.
You will find the different virtual devices available, from generic Android up to STM32US IoT discovery team. We will select the RPi 4 VM device and then click NEXT.
Select the lite firmware option if not already selected. Then click SELECT.
Check the BOX of Set advanced boot options... and click CREATE DEVICE:
Select CUSTOM vMMIO if you want an external (over the network) MMIO handler. For the purpose of this article we will not be using it. Click CREATE DEVICE:
It will take couple of minutes before you get the device Up and Running:
The quickest way to connect is to click on CONSOLE. You will have to use the default credentials and once entered you will have full access to your virtual Rpi4:
Alternatively, you can SSH your virtual Rpi using (or not) a VPYou can now login with default user/password (pi/raspberry) .
First thing to do, update the packages. Type sudo apt-get update and click return.
Running Minikube
Now that we are running latest versions, let’s install minikube.
We are ready to start our cluster by typing: minikube start –force. Once up and running, let’s check the cluster status with minikube kubectl –get po -A
Time to create a deployment inside our K8s cluster and expose with a NodePort service
There we Go! Our hello-minikube is now ready.
You can try same approach with K3s or just upload your own firmware and build your own applications on top of that.
Thoughts
While the Arm Developer Program is still in BETA, the ability to deploy different devices without the need of a physical board is a huge game changer. It still needs some development . I’ve found that things that were working as a charm suddenly gives you dependency issues or failed permissions. Like in Windows, restarting the box will solve some of the issues..but you might end yourself troubleshoot stuff. It’s a new version of Learning the Hard Way.
On the other hand, if you are interested in the story of the largest Raspberry Pi cluster, Chris Bensen (the inventor) wrote a set of great articles. You can find them at: https://chrisbensen.medium.com