Skip to content

Instantly share code, notes, and snippets.

@usrbinkat
Last active November 16, 2024 22:08
Show Gist options
  • Save usrbinkat/c6fccefb15db7a684f71c5f6d75664bf to your computer and use it in GitHub Desktop.
Save usrbinkat/c6fccefb15db7a684f71c5f6d75664bf to your computer and use it in GitHub Desktop.
TuringPi2 RK1 Build Journal

Turing Pi 2 + 4x RK1 32GB Kubevirt Cluster

In this gist we will attempt to capture the prominent steps in building an RK1 TPI2 Talos K8s Cluster for use with the github.com/ContainerCraft/Kargo kubevirt platform.

Info

If you try this and achieve success imaging your RK1 compute modules with the un-merged talos rk1 fork please report your success on this rfe issue: github.com/siderolabs/talos/issues/8187

Update Turing Pi 2 BMC Firmware

# download latest turingpi firmware
# - source: https://firmware.turingpi.com/turing-pi2
curl -LO https://firmware.turingpi.com/turing-pi2/v2.0.5/tp2-firmware-sdcard-v2.0.5.img

# Write firmware to microsd card
# - this command works on mac and linux
# - replace your firmware file name and disk path with your actual file and disk
# - use extreme caution this command can cause permanent data loss, mistakes can be costly
sudo dd if=tp2-firmware-sdcard-v2.0.5.img of=/dev/disk6 conv=sync bs=32k status=progress

# Insert microsd card on bottom of Turing Pi 2 board & power on
# Press the power button 3x after you observe all nic led lights solid on indicating it is ready to flash
# Node will auto reboot

# SSH to BMC
# root:turing
ssh [email protected]

# Open BMC WebUI
# root:turing
https://192.168.1.172/

# symlink sdcard storage
ln -s /mnt/sdcard ~

Flash Talos images to RK1 Compute Modules

  • ssh to tpi2 bmc
  • cd to your sdcard storage
# download talos metal rk1 arm64 image
# - source: https://github.com/nberlee/talos/releases
curl -LOk https://github.com/nberlee/talos/releases/download/v1.6.5/metal-turing_rk1-arm64.raw.xz

# Extract the xz compressed image
unxz metal-turing_rk1-arm64.raw.xz

# flash the 4 rk1 nodes
tpi flash --local --image-path /mnt/sdcard/img/metal-turing_rk1-arm64.raw --node 1
tpi flash --local --image-path /mnt/sdcard/img/metal-turing_rk1-arm64.raw --node 2
tpi flash --local --image-path /mnt/sdcard/img/metal-turing_rk1-arm64.raw --node 3
tpi flash --local --image-path /mnt/sdcard/img/metal-turing_rk1-arm64.raw --node 4

Boot all 4 nodes

tpi power on --node 1
tpi power on --node 2
tpi power on --node 3
tpi power on --node 4

Coffee break

Give these nodes a couple minutes to start up so you can collect the entire uart log output in one command. This is a great time to get a beverage, check on people and pets, and the RK1s will be ready for the next step when you get back :)

Pull serial uart console to find each node's IP address

tpi uart --node 1 get | tee /mnt/sdcard/uart.1.log | grep "assigned address"
tpi uart --node 2 get | tee /mnt/sdcard/uart.2.log | grep "assigned address"
tpi uart --node 3 get | tee /mnt/sdcard/uart.3.log | grep "assigned address"
tpi uart --node 4 get | tee /mnt/sdcard/uart.4.log | grep "assigned address"
image

It looks like I have the following DHCP assigned IP addresses

  • 192.168.1.172 [BMC]
  • 192.168.1.186
  • 192.168.1.199
  • 192.168.1.175
  • 192.168.1.174

Now you're ready to cluster your Talos nodes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment