Skip to content

Commit ec269aa

Browse files
Merge pull request #81 from pascalinthecloud/update-docs
fix: enhance setup documentation
2 parents 5c135d3 + 9343fd1 commit ec269aa

File tree

2 files changed

+93
-2
lines changed

2 files changed

+93
-2
lines changed

docs/astro.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export default defineConfig({
1515
label: 'Guides',
1616
items: [
1717
// Each item here is one entry in the navigation menu.
18-
{ label: 'Upgrade talos', slug: 'guides/upgrade_talos' },
1918
{ label: 'Setup talos cluster', slug: 'guides/setup' },
19+
{ label: 'Upgrade talos', slug: 'guides/upgrade_talos' },
2020
],
2121
},
2222
{
Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,95 @@
11
---
22
title: Setup talos cluster
33
description: A guide for setting up talos cluster with this module.
4-
---
4+
---
5+
6+
```terraform
7+
module "talos_cluster" {
8+
source = "git::https://github.com/pascalinthecloud/terraform-proxmox-talos-cluster.git?ref=main"
9+
cluster = {
10+
vm_base_id = 700
11+
name = "cluster-prod"
12+
datastore = "local-lvm"
13+
node = "pve01"
14+
config_patches = [file("${path.module}/config_patch.yaml")]
15+
}
16+
image = {
17+
version = "v1.9.3"
18+
extensions = ["qemu-guest-agent", "iscsi-tools", "util-linux-tools"]
19+
}
20+
network = {
21+
cidr = "10.10.100.0/24"
22+
gateway = "10.10.100.1"
23+
dns_servers = ["10.0.10.1", "1.1.1.1"]
24+
vlan_id = 1100
25+
}
26+
controlplane = {
27+
count = 1
28+
specs = {
29+
cpu = 2
30+
memory = 6192
31+
disk = 80
32+
}
33+
}
34+
worker = {
35+
count = 2
36+
specs = {
37+
cpu = 2
38+
memory = 6192
39+
disk = 80
40+
}
41+
}
42+
}
43+
```
44+
45+
That's our base configuration. Beginning from the top, we specify all cluster-related information, like the `vm_base_id` (needed for Proxmox), the datastore, and the node the VMs are placed on. We can specify additional config patches, for example, for installing extra manifests and activating some Talos-specific configs. For more infos about configuration patches look at the [talos documentation](https://www.talos.dev/v1.9/talos-guides/configuration/patching/).
46+
47+
We can deploy single worker and control plane nodes on a different Proxmox host by specifying overrides or adjust datastore, network configuration, CPU, and RAM configurations as needed.
48+
49+
```terraform
50+
module "talos_cluster" {
51+
// ...existing code...
52+
controlplane = {
53+
count = 1
54+
specs = {
55+
cpu = 2
56+
memory = 6192
57+
disk = 80
58+
}
59+
overrides = {
60+
"controlplane-1" = {
61+
node = "pve02"
62+
network = {
63+
cidr = "10.10.100.0/24"
64+
ip_address = "10.10.100.150"
65+
gateway = "10.10.100.1"
66+
dns_servers = ["10.0.10.1", "1.1.1.1"]
67+
vlan_id = 1100
68+
}
69+
}
70+
}
71+
}
72+
worker = {
73+
count = 2
74+
specs = {
75+
cpu = 2
76+
memory = 6192
77+
disk = 80
78+
}
79+
overrides = {
80+
"worker-1" = {
81+
cpu = 1
82+
node = "pve02"
83+
network = {
84+
cidr = "10.10.100.0/24"
85+
ip_address = "10.10.100.160"
86+
gateway = "10.10.100.1"
87+
dns_servers = ["10.0.10.1", "1.1.1.1"]
88+
vlan_id = 1100
89+
}
90+
}
91+
}
92+
}
93+
}
94+
```
95+

0 commit comments

Comments
 (0)