@@ -53,37 +53,53 @@ packer build -var-file="vars/local.pkrvars.hcl" -var-file="vars/gpu.pkrvars.hcl"
5353
5454### 3. Terraform - Provisioning Infrastructure
5555
56- The Terraform setup is now declarative. All node configurations are managed in one place.
56+ The Terraform setup is fully declarative with all node configurations managed in one place.
5757
58581 . ** Navigate to the Terraform directory:**
5959 ``` bash
6060 cd iac/terraform/talos-cluster/
6161 ```
6262
63632. ** Set up credentials:**
64- Create a ` credentials.auto.tfvars` file. This file is ignored by Git and should contain your Proxmox secrets.
64+ Create a ` credentials.auto.tfvars` file (automatically loaded by Terraform) . This file is git- ignored and contains your Proxmox secrets:
6565 ` ` ` hcl
6666 # iac/terraform/talos-cluster/credentials.auto.tfvars
67-
6867 proxmox_api_url = " https://<your-proxmox-ip>:8006/api2/json"
69- proxmox_api_token = " <your-proxmox-api-token>" // e.g., root@pam! iac=...
68+ proxmox_node = " <your-proxmox-node-name>"
69+ proxmox_api_token = " <your-api-token-id>=<your-api-token-secret>"
70+ proxmox_pool = " "
7071 proxmox_ssh_password = " <your-proxmox-ssh-password>"
7172 ` ` `
73+
74+ ** Example:**
75+ ` ` ` hcl
76+ proxmox_api_url = " https://192.168.10.11:8006/api2/json"
77+ proxmox_node = " proxmox-threadripper"
78+ proxmox_api_token = " root@pam!iac=c30cfedb-0cd8-4c0f-932b-6aded8a1c3ae"
79+ proxmox_pool = " "
80+ proxmox_ssh_password = " your-ssh-password"
81+ ` ` `
7282
73833. ** Configure your cluster nodes:**
74- Open ` variables.tf` and review the ` nodes` variable. This is the single source of truth for your cluster' s infrastructure.
75- - Adjust IPs, MAC addresses, cores, memory, and disk sizes as needed.
76- - **Crucially, ensure the MAC addresses here match the `hardwareAddr` selectors in `iac/talos/talconfig.yaml`**.
84+ Node configurations are defined in ` variables.tf` in the ` nodes` variable. This is the single source of truth for your cluster infrastructure.
85+ - Review and adjust IPs, MAC addresses, cores, memory, and disk sizes as needed
86+ - ** Important** : Ensure MAC addresses match the ` hardwareAddr` selectors in ` iac/talos/talconfig.yaml`
87+ - VM IDs and roles are pre-configured for a 3-master + 3-worker cluster
7788
78894. ** Initialize and apply Terraform:**
7990 ` ` ` bash
80- # Initialize Terraform
91+ # Initialize Terraform (only needed once)
8192 terraform init -upgrade
8293
83- # Create execution plan
94+ # Plan and apply changes
8495 terraform plan -out=.tfplan
96+ terraform apply .tfplan
97+ ` ` `
8598
86- # Apply the plan
99+ ** For targeted deployments** (e.g., recreating a single VM):
100+ ` ` ` bash
101+ # Target specific resources
102+ terraform plan -target=' proxmox_virtual_environment_vm.vm["talos-master-00"]' -out=.tfplan
87103 terraform apply .tfplan
88104 ` ` `
89105
@@ -193,6 +209,7 @@ cilium install \
193209 --helm-set=l2announcements.enabled=true \
194210 --helm-set=externalIPs.enabled=true \
195211 --set gatewayAPI.enabled=true \
196- --helm-set=devices=e+
212+ --helm-set=devices=e+ \
213+ --helm-set=operator.replicas=1
197214` ` `
198215
0 commit comments