How to install Cozystack in Hetzner

How to install Cozystack in Hetzner

Switch your server into rescue mode

Login to the server using SSH

Check Disks:

# lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
nvme0n1     259:4    0 476.9G  0 disk
nvme1n1     259:0    0 476.9G  0 disk

Download Talos Linux asset from the Cozystack’s releases page, and write it into disk:

cd /tmp
wget https://github.com/aenix-io/cozystack/releases/latest/download/nocloud-amd64.raw.xz
xz -d -c /tmp/metal-amd64.raw.xz | dd of=/dev/nvme0n1 bs=4M oflag=sync

Resize the partition table and prepare additional partition for the cloud-init data:

# resize gpt partition
sgdisk -e /dev/nvme0n1

# Create 20MB partition in the end of disk
end=$(sgdisk -E /dev/nvme0n1)
sgdisk -n7:$(( $end - 40960 )):$end -t7:ef00 /dev/nvme0n1

# Create fat partion for cloud-init
mkfs.vfat -n CIDATA /dev/nvme0n1p7

# Mount cloud-init partition
mount  /dev/nvme0n1p7 /mnt

Write cloud-init configuration

echo 'local-hostname: us-talos-1' > /mnt/meta-data
echo '#cloud-config' > /mnt/user-data
echo 'version: 2' > /mnt/network-config

Edit network-config and specify your network settings using network-config-format-v2.

version: 2
ethernets:
  eth0:
    match:
      macaddress: 'a6:34:9e:c0:25:6b'
    dhcp4: false
    addresses:
      - "1.2.3.4/26"
      - "2a01:4f3:341:524::2/64"
    gateway4: "1.2.3.1"
    gateway6: "fe80::1"
    nameservers:
      search: [cluster.local]
      addresses: [8.8.8.8]

You can find more comprehensive example under the link

Umount cloud-init partition, sync changes, and reboot the server

umount /mnt
sync
reboot

Now, when it is booted to Talos Linux maintenance mode, you can use talos-bootstrap to bootstrap the cluster:

talos-bootstrap install -n 1.2.3.4

Where 1.2.3.4 is the IP-address of your remote node.

Now follow Get Started guide starting from the Bootstrap cluster section, to continue the installation.