Topics include Supply Chain Security, Microservice Management, Neat Tricks, and Contributor insights.
I recently started building an entire Cloud Native environment on three Raspberry Pi 4 B’s with an old Synology DS413j (ARMv5 architecture) running the latest firmware update, DSM 6.2.4-25556 Update 7 Release Notes, and so far its been quite a journey.
To help other Ortelius open-source contributors build private development and testing environments, I would like to share how I have created a local environment in a series of blog posts. In this first blog, I will cover the Raspberry Pi hardware, NFS and setup. In subsequent post, I will move on to Canonicals MicroK8s (Kubernetes), Traefik (Cloud Native Proxy and Load Balancer) and Ortelius the ultimate evidence store. While you do not need all of these tools for running Ortelius, this stack gives you a complete DevOps environment for expanding your skills.
Why Raspberry Pi’s you ask? First of all I live in Cape Town South Africa where we are experiencing some of the worst electricity outages in years. We need to share electricity by taking turns through rotational blocks of time commonly know to locals as “Load Shedding.” We use an application like this one Load Shedding App to inform ourselves when the next bout of load shedding will be hitting our area. 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.
or
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 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 DEVICE
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
Use OS Customization by clicking: EDIT SETTINGS
Fill in the required info according to your specifications. Remember to change the:
HOSTNAMES
pi01
| pi02
| pi03
(You can use whatever hostnames make sense to you)
Allow 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
each time on the line under Allow public-key authentication only
for each Pissh -i ~/.ssh/<your private key name> <your pi username@<your private ip or domain name> | ssh -i ~/.ssh/pi8s ortelius@pi01.pangarabbit.com
.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>
Check: all 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
How to Bake an Ortelius Pi - Part 3 The Configuration
Disclaimer: Any brands I mention in this blog post series are not monetized. This is my home setup!