setup-node.md
1 Based on this excellent guide: https://datavirke.dk/posts/bare-metal-kubernetes-part-1-talos-on-hetzner/ 2 3 First, run the workflow for building the Talos image and note the link to the artifact: https://github.com/superfishial/abyss/actions/workflows/build-talos-image.yaml 4 5 The convention is to set the hostname of the worker nodes to `nereid-$index` where the index starts from 1 6 7 ```bash 8 # Use a version older than latest if you want to test an upgrade 9 export TALOS_VERSION=v1.6.1 10 # Keep in mind that device paths might change between reboots so either 11 # double-check the device path, or use one of the udev paths instead. 12 export TARGET_DISK="/dev/nvme0n1" 13 14 # OPTIONAL in case you need to stop RAID 15 mdadm --stop /dev/md/* 16 # wipe drives 17 wipefs -a /dev/nvme*n1 18 wipefs -a /dev/sd* 19 # Download the artifacts from our action run 20 # Update <GITHUB_TOKEN> with the output of `gh auth token` 21 # Update <ARTIFACT_ID> with the last section of the url of the artifact of the action run 22 wget --header "Authorization: Bearer <GITHUB_TOKEN>" -O images.zip https://api.github.com/repos/superfishial/abyss/actions/artifacts/<ARTIFACT_ID>/zip 23 unzip images.zip 24 unxz metal-amd64.raw.xz 25 # Write the raw disk image directly to the hard drive. 26 dd if=metal-amd64.raw of=$TARGET_DISK && sync 27 28 mount LABEL=BOOT /mnt 29 sed -i 's/console=ttyS0//g' /mnt/grub/grub.cfg 30 # Remove the console=ttyS0 from the kernel parameters for both entries 31 # Based on https://github.com/siderolabs/talos/discussions/7465 32 33 shutdown -r now 34 ``` 35 36 Get configuration from `neptune` terraform project via: `terraform output -raw talos_worker_machine_configuration > ../worker-configuration.yaml` 37 For each of the nodes: 38 39 - change the `machine.network.hostname` to include the index of the node such as `nereid-1` and `nereid-2` 40 - run `talosctl apply-config --insecure -n 88.198.53.24 --file worker-configuration.yaml`