Skip to content

Preparing Nodes

Install Ubuntu

Download Ubuntu Server 21.04 ISO and install Ubuntu on each node.

VLAN Config

Select the required VLAN (100) during the server setup

For raspberry pi/ARM edit the file

sudo vi /etc/netplan/50-cloud-init.yaml

Update the yaml file with the content

# /etc/netplan/50-cloud-init.yaml
network:
  ethernets:
    eth0:
      dhcp4: true
  vlans:
    vlan100:
      id: 100
      link: eth0
      dhcp4: true
  version: 2

Validate the network settings

sudo netplan try

Save the network settings

sudo netplan apply

Generate SSH Key on host machine

ssh-keygen -t ed25519 -C "rogerrum@gmail.com"

Copy over SSH key from the host machine

ssh-copy-id -i ~/.ssh/id_rsa.pub rsr@192.168.50.100

Ubuntu use all partition space

lsblk
sudo parted /dev/sda print
sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
sudo resize2fs /dev/ubuntu-vg/ubuntu-lv

Prepare Disks for Longhorn

Prepare/mount the additional disks for Longhorn

wget https://raw.githubusercontent.com/rogerrum/homelab-infrastructure/main/k3s/ha/setup-disks.sh \
 -O setup-disks.sh  && chmod +x setup-disks.sh

run setup-disks.sh for each additional disk

./setup-disks.sh sdb storage