Skip to content

Commit 1bc9081

Browse files
authored
Document Hetzner installation (#11)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
1 parent b80f5e4 commit 1bc9081

File tree

2 files changed

+104
-0
lines changed

2 files changed

+104
-0
lines changed

content/en/docs/how-tos/_index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: "How Tos"
3+
linkTitle: "How Tos"
4+
description: "Cozystack how tos."
5+
weight: 45
6+
---

content/en/docs/how-tos/hetzner.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
title: How to install Cozystack in Hetnzer
3+
linkTitle: Hetzner
4+
description: "How to install Cozystack in Hetzner"
5+
weight: 10
6+
---
7+
8+
{{% alert color="warning" %}}
9+
:warning: Secure Boot is currently not supported.
10+
11+
If your server configured to use Secure Boot, you need to disable this feature in your BIOS. Otherwise, it will block the server from booting after Talos Linux installation.
12+
{{% /alert %}}
13+
14+
Switch your server into rescue mode
15+
16+
Login to the server using SSH
17+
18+
Check Disks:
19+
20+
```console
21+
# lsblk
22+
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
23+
nvme0n1 259:4 0 476.9G 0 disk
24+
nvme1n1 259:0 0 476.9G 0 disk
25+
```
26+
27+
Download Talos Linux asset from the Cozystack's [releases page](https://github.com/aenix-io/cozystack/releases), and write it into disk:
28+
29+
```bash
30+
cd /tmp
31+
wget https://github.com/aenix-io/cozystack/releases/download/v0.2.0/metal-amd64.raw.xz
32+
xz -d -c /tmp/metal-amd64.raw.xz | dd of=/dev/nvme0n1 bs=4M oflag=sync
33+
```
34+
35+
Resize the partition table and prepare additional partition for the cloud-init data:
36+
37+
```bash
38+
# resize gpt partition
39+
sgdisk -e /dev/nvme0n1
40+
41+
# Create 20MB partition in the end of disk
42+
end=$(sgdisk -E /dev/nvme0n1)
43+
sgdisk -n7:$(( $end - 40960 )):$end -t7:ef00 /dev/nvme0n1
44+
45+
# Create fat partion for cloud-init
46+
mkfs.vfat -n CIDATA /dev/nvme0n1p7
47+
48+
# Mount cloud-init partition
49+
mount /dev/nvme0n1p7 /mnt
50+
```
51+
52+
Write cloud-init configuration
53+
54+
```bash
55+
echo 'local-hostname: us-talos-1' > /mnt/meta-data
56+
echo '#cloud-config' > /mnt/user-data
57+
echo 'version: 2' > /mnt/network-config
58+
```
59+
60+
Edit network-config and specify your network settings using [network-config-format-v2](https://cloudinit.readthedocs.io/en/latest/reference/network-config-format-v2.html).
61+
62+
```yaml
63+
version: 2
64+
ethernets:
65+
eth0:
66+
match:
67+
macaddress: 'a6:34:9e:c0:25:6b'
68+
dhcp4: false
69+
addresses:
70+
- "1.2.3.4/26"
71+
- "2a01:4f3:341:524::2/64"
72+
gateway4: "1.2.3.1"
73+
gateway6: "fe80::1"
74+
nameservers:
75+
search: [cluster.local]
76+
addresses: [8.8.8.8]
77+
```
78+
79+
You can find more comprehensive example under the [link](https://github.com/siderolabs/talos/blob/10f958cf41ec072209f8cb8724e6f89db24ca1b6/internal/app/machined/pkg/runtime/v1alpha1/platform/nocloud/testdata/metadata-v2.yaml)
80+
81+
Umount cloud-init partition, sync changes, and reboot the server
82+
83+
```bash
84+
umount /mnt
85+
sync
86+
reboot
87+
```
88+
89+
Now, when it is booted to Talos Linux maintenance mode, you can use [talos-bootstrap](https://github.com/aenix-io/talos-bootstrap) to bootstrap the cluster:
90+
91+
```
92+
talos-bootstrap install -n 1.2.3.4
93+
```
94+
95+
Where `1.2.3.4` is the IP-address of your remote node.
96+
97+
98+
Now follow **Get Started** guide starting from the [**Bootstrap cluster**](/docs/get-started/#bootstrap-cluster) section, to continue the installation.

0 commit comments

Comments
 (0)