This repo intends to help me when I need it to setup my raspberry cluster again. The process is not hard at all, but some tools and apps have some details that I will certainly forget.
- use the official Raspberry Imager
- image: select OS 64 Lite
- config: for my case, I prefer to enable just the ssh through GUI and enable Wifi with wpa_supplicant.conf
Use a good quality usb-c cable. Sometimes the rpi will fail to read the sd card, in my case, it was a faulty usb cable. Seriosly.
1 - Discover your rpi IP through your gateway and SSH into it
sudo apt update
sudo apt full-upgrade
sudo reboot
- vim /etc/dhcpcd.conf
interface wlan0
static ip_address=192.168.15.180/24
static routers=192.168.15.1
static domain_name_servers=8.8.8.8
where interface, routers will depend of wifi/eth and your router gateway.
nmcli con add con-name "anyname" type wifi ifname wlan0 ssid "<ssid>" -- wifi-sec.key-mgmt wpa-psk wifi-sec.psk "<password>" ipv4.method manual ipv4.address 192.168.15.190/24 ipv4.dns 8.8.8.8,8.8.8.4 ipv4.gateway 192.168.15.1
With rpi-clone it's possible to copy your SD card to a newly formatted SSD drive. The approach that worked for me is to first create the SD card with the Raspberry Imager, make sure it is working and you can SSH, then run rpi-clone.
- Create an SD card with your image
- Make sure you can boot with it and SSH
- Use rpi-cloner to copy SD card content into the SSD drive
- Run raspi-config and change boot order (A6)
- Shutdown your rpi
- Unplug the SD card and left only the SSD.
I choose k3s as my main kubernetes flavor just for testing purposes. And, as the cluster itself does not have much RAM available, I thought it would be a good idea to experiment with something lighter than the official.
k3s come with their load balancer and lb service named traefik and klipper, respectively. Although I have never play with them before, I want my cluster as close as possible to what we do on Cloud, so I chose nginx with MetaLB. Install k3s without the default tools:
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --no-deploy=traefik --disable servicelb" sh -s -
cat /var/lib/rancher/k3s/server/node-token
On the second raspberry - or node:
curl -sfL https://get.k3s.io | K3S_URL=https://masterip:6443 K3S_TOKEN=mastertoken sh -
- Find the images in http://www.orangepi.org/html/serviceAndSupport/index.html
- Prefer Debian releases as the Ubuntu one doesn't have the nand-sata-install
- Orange PI 5 doesn't have Wifi so after checking if everything is running ok, just plug in the ethernet cable and go discover the IP.
The current version of Debian for the OPI5 has the following default users:
- orangepi@orangepi
- root@orangepi
Future me, now you can head to /terraform and apply the other apps.
- metallb
- postgres
- kafka
- airflow