This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Pve

Proxmox cluster configuration, resource pools, and VM bootstrap

This archived diagram preserves the historical source topology. The Mermaid source is authoritative; Bazel renders its light and dark SVGs.

Archive/Proxmox architectureArchive/Proxmox architecture

bazel run //infra/pve/ansible # host setup
bazel run //infra/pve/tf/tf.apply # tf setup
bazel run //infra/pve/tf:tf.apply -- --replace module.vm_cloudinit_test.proxmox_vm_qemu.vm
bazel run //infra/pve/ansible -- --tags pve_snippets
  • Create an EAB:
    bazel run //infra/dc1/vault -- write -f pki/ica_servers/roles/src_infra_dc1_pve1_pki_server/acme/new-eab
    
  • Login as root@pam
  • Go to Datacenter -> ACME
  • Create a new account with the EAB and a directory:
    https://vault.dc1.alwaldend.com:8200/v1/pki/ica_servers/roles/src_infra_dc1_pve1_pki_server/acme/directory
    
  • Create a token with Privilege Separation
  • Grant it required roles
  • Create json:
    {
      "token_id": "",
      "token_secret": ""
    }
    
  • Write the data:
    bazel run //infra/pve:vault.kv_put alwaldend.com/vault1/approles/src_infra_dc1_pve1/pve_token @"${PWD}/data.json"
    

1 - Ansible

Ansible setup

2 - OpenSpec

2.1 - Specifications

2.1.1 - Infra pve

2.1.1.1 - Proxmox infrastructure Specification

Specify the Proxmox cluster configuration, resource pools, and bootstrap test VM owned by infra/pve. The baseline is checked-in source at revision 550d7e79b1f5fdbc2b6017b75178471d6914082f, observed on 2026-09-08. It describes declared infrastructure and packaged operator entry points; deployment and cluster health have not been observed for this baseline.

The Terraform configuration SHALL resolve the members of Vault’s approles identity group and declare one Proxmox pool per resolved entity, keyed and named by that entity’s name. It SHALL also declare a separate templates pool.

Sources: project documentation and resource pool definitions.

  • WHEN Terraform resolves the entities in the Vault approles group
  • THEN the desired configuration includes a pool with each entity’s name and the dedicated templates pool.

The PVE Ansible entry point SHALL package the inventory and deployment playbook and apply the shared host and PVE roles to the pve1 inventory group. It SHALL package the canonical shared cloud-init files under files/cloud_init.yaml and files/cloud_init_min.yaml, preserving the existing snippet update flow.

Sources: deployment target, playbook, and snippet variables.

  • WHEN the Ansible binary’s source package is built
  • THEN it includes the playbook, inventory, shared role collection, and both shared cloud-init files under their established aliases.

The Terraform configuration SHALL declare its cloud-init test VM through the shared pve_vm_qemu module, derive its hostname and address from the project’s DNS configuration, and place it in the src_infra_dc1_pve1 AppRole pool. The baseline declaration SHALL use VM ID 100, a 5G scsi0 disk, and the test tag.

Sources: VM definition and DNS configuration.

  • WHEN Terraform evaluates module.vm_cloudinit_test
  • THEN its name and /24 address derive from cloudinit_test DNS fields, and its pool resolves to the declared PVE AppRole pool.

PVE Terraform commands SHALL use the project’s AL configuration and the declared Terraform, PVE-login, and Vault-environment plugins. The package SHALL include the lockfile, Terraform source, shared backend and VM modules, and required Vault helper targets. PVE Ansible commands SHALL likewise use the project AL configuration and packaged injector.

Sources: Terraform wrapper and Ansible wrapper.

  • WHEN a repository Terraform command target is invoked with authorization for its operation
  • THEN the wrapper supplies the declared modules and helper inputs and selects the tf, pve_login, and vault_env=default_default plugins.

3 - Proxmox DNS

Owner-local DNS Terraform

This root manages the records in dnsconfig.json using //infra/pve/dns:tf.<operation>. Follow the shared transfer procedure before operating this root.

4 - Tf

Terraform config

This root manages Proxmox infrastructure and retains its ordinary Proxmox authentication. Manage records through the dedicated DNS root.