Topics include Supply Chain Security, Vulnerability Management, Neat Tricks, and Contributor insights.
I recently started building a Cloud Native Environment on three Raspberry Pi 4 B’s with a Synology DS413j NAS (ARMv5 architecture) running the latest firmware update DSM 6.2.4-25556 Update 7 Release Notes and so far its been quite a journey. In this blog post I would like to share my undertakings in a series of blog posts.
Raspberry Pi 4 B’s pack a punch with a Broadcom Quad Core ARMv8 processor and 8 GB ram. They are very light on electricy thus saving on cost and only require a single small UPS (uninterruptable power supply) to stay online. They are very mobile and take up extremely little space in my man cave.
Use this article from Toms Hardware for microSD card benchmarking. I can also recommend Jeff Geerling for all things Raspberry Pi.
OR
3X 32GB USB 3 flash drives but this comes with some caveats performance wise which I will discuss further on
1X Screen HDMI
1X Keyboard USB
1X 8 Port Switch
Networking | Use DHCP or static IP addresses in a private range.
1X UPS (Uninterruptable Power Supply) for the Pis and switch | Something like this Mecer 650VA. Please note this is a South African brand of UPS but I am showing this for example purposes. The Mecer brand is extremely good and all my lead acid battery UPS’s are from Mecer. I have a combination of the 650VA, 2000VA and 3000VA to keep me going (7 in all)
The imaging utility will be used to install Ubuntu onto your SD Card or USB flash drive.
brew install raspberry-pi-imager
sudo apt install raspi-config -y
If you use USB flash drives you will need to do the following as mentioned in this post. It all comes down to the implementation of the UAS specification.
/boot/cmdline.txt
but on my Pi4 I had to go here /boot/firmware/cmdline.txt
/boot/firmware/cmdline.txt
sudo apt install dmesg -y
/boot/firmware/cmdline.txt
sudo raspi-config
and you will get a screen like thisLexmark 32GB USB
Product: USB Flash Drive
[ 2.885515] usb 2-2: Manufacturer: Lexar
[ 2.885527] usb 2-2: SerialNumber: AA0G3FCUYDI06HNV
[ 3.007270] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[ 3.157900] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21
[ 3.157922] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
sudo dmesg | grep usb-storage
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=1600 bcm2708_fb.fbheight=900 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:B1:5D:DF vc_mem.mem_base=0x3eb00000 vc_mem.mem_size=0x3ff00000 usb-storage.quirks=05dc:a838:u cgroup_enable=memory cgroup_memory=1 console=ttyS0,115200 dwc_otg.lpm_enable=0 console=tty1 root=LABEL=writable rootfstype=ext4 rootwait fixrtc quiet splash
[ 2.958568] usb-storage 2-2:1.0: USB Mass Storage device detected
[ 2.958964] usb-storage 2-2:1.0: Quirks match for vid 05dc pid a838: 800000
[ 2.959059] scsi host0: usb-storage 2-2:1.0
[ 2.959390] usbcore: registered new interface driver usb-storage
usb-storage.quirks=05dc:a838:u
/boot/firware/cmdline.txt
aka Pi 4 BIOS fileusb-storage.quirks=05dc:a838:u cgroup_enable=memory cgroup_memory=1 console=serial0,115200 dwc_otg.lpm_enable=0 console=tty1 root=LABEL=writable rootfstype=ext4 rootwait fixrtc quiet splash
CHOOSE DEVICE
| CHOOSE OS
| CHOOSE STORAGE
Choose Raspberry Pi4 models B, 400 and Compute Modules 4, 4s
Choose Other general-purpose OS
Choose Ubuntu
Choose Ubuntu Server 22.04.4 LTS (64-bit)
Note: This will look different on your machine especially if you are using either SD Card or USB flash drive
Next
Use OS Customization by clicking: EDIT SETTINGS
HOSTNAMES
pi01
| pi02
| pi03
before each installation of Ubuntu on the SD CardAllow public-key authentication only
which I would recommend you need to do some extra steps/Users/<your username>/.ssh
if you are using a Mac or LinuxC:\Users\username\.ssh
if you are using Windowsssh-keygen -t ed25519 -C "you-email@domain.com" -f <public key name>`
ssh-keygen -t ed25519 -C "i-love-aliens@ortelius.com" -f pi8s
private key
which you never ever share and the other will be the public key
public key
before each installation of Ubuntu to Allow public-key authentication only
for each Pi.ssh/config
Host pi01.yourdomain.com
HostName pi01.yourdomain.com
AddKeysToAgent yes
IdentityFile ~/.ssh/<private key name>
User <your user>
Host pi02.yourdomain.com
HostName pi02.yourdomain.com
AddKeysToAgent yes
IdentityFile ~/.ssh/<private key name>
User <your user>
Host pi03.yourdomain.com
HostName pi03.yourdomain.com
AddKeysToAgent yes
IdentityFile ~/.ssh/<private key name>
User <your user>
This will allow SSH without a password onto each Pi like this ssh -i ~/.ssh/<your private key name> <your pi username@<your private ip or domain name>
for example ssh -i ~/.ssh/pis ortelius@pi01.pangarabbit.com
You can also reference this document from Github for an alternative explanation
Check the boxes specific to your needs.
Click YES
to apply the OS customisation settings
Rinse and repeat for each SD Card or USB flash stick.
By this stage you should have three Pi 4 B’s running with Ubuntu 22.04.4 LTS each configured for SSH with a password or preferably a SSH private key and public key. Stay tuned for part 2 where we will dive into DHCP, NextDNS, NFS and install MicroK8s.
How to Bake on Ortelius Pi | Part 2 | The Preparation