mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-09-04 03:05:32 +00:00
08ee3ae249
The local dev environment had drifted badly from CI. Remove the parts that no longer describe anything real, and make the rest match how CI actually runs. Delete tests/dev.ps1. It wrapped run-integration.sh, which CI calls directly, and duplicated the module build that script already performs internally. As a second entry point it drifted: it still offered the PVE 8 leg retired in #88, mounted the Docker socket for storage containers replaced by the storage VM in #87, and pointed its remote-host examples at a runner decommissioned in the ARC migration. All four documents describing it used a positional syntax that bound the bare word to -Tests and then fell through to -Shell, so every documented command silently opened a container shell. Recorded as D019. Delete tests/infrastructure/runner/, a self-hosted-runner-in-Docker superseded by Actions Runner Controller. Make disk_storage and iso_storage required. Their defaults named a NAS that the lab replaced with Ceph, and CI overrides both from repository variables, so the defaults only ever misled local runs. require_env now fails at the top of a run rather than at terraform apply, and the descriptions point at tests/.env.test because cmd_provision deletes terraform.tfvars before applying. preflight-cleanup.sh no longer falls back to the literal "local" storage. An unset TF_VAR_iso_storage now skips only the ISO branch, leaving VM destroy and state cleanup intact, and emits a workflow annotation: force-cleanup is the only cleanup CI runs and it wipes Terraform state, so a silent skip strands the uploaded ISO with nothing left to reclaim it. Drop docker-ce-cli and the /var/run/docker.sock mount. Nothing in the container has called docker since #87 moved storage into a VM; the remaining docker calls run inside that VM over SSH. The CI job image is built from the same target, so this also removes a third-party apt repository from its supply chain. Rewrite tests/.env.test.example against what the code now requires, and fix the documented commands in CLAUDE.md, README.md, copilot-instructions.md and the integration README.
102 lines
3.2 KiB
Terraform
102 lines
3.2 KiB
Terraform
variable "proxmox_endpoint" {
|
|
description = "URL of the existing Proxmox VE API (e.g. https://pve.example.com:8006)"
|
|
type = string
|
|
}
|
|
|
|
variable "proxmox_api_token" {
|
|
description = "API token for authenticating with the existing Proxmox host (user@realm!tokenid=secret)"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "proxmox_insecure" {
|
|
description = "Whether to skip TLS verification when connecting to the Proxmox API"
|
|
type = bool
|
|
default = true
|
|
}
|
|
|
|
variable "target_node" {
|
|
description = "Name of the Proxmox node where the nested PVE VMs will be created"
|
|
type = string
|
|
}
|
|
|
|
variable "pve_instances" {
|
|
description = "Map of PVE instances to provision. Key is a node label (e.g. '9a'), value defines the VM."
|
|
type = map(object({
|
|
pve_version = string
|
|
vm_id = number
|
|
vm_name = string
|
|
mac_address = string
|
|
}))
|
|
}
|
|
|
|
variable "pve_isos" {
|
|
description = "Map of PVE version to the local path of the generic HTTP auto-install ISO."
|
|
type = map(string)
|
|
default = {}
|
|
}
|
|
|
|
variable "cores" {
|
|
description = "Number of CPU cores to allocate to each nested PVE VM"
|
|
type = number
|
|
default = 4
|
|
}
|
|
|
|
variable "memory" {
|
|
description = "Amount of memory in MB to allocate to each nested PVE VM"
|
|
type = number
|
|
default = 8192
|
|
}
|
|
|
|
variable "disk_size" {
|
|
description = "Size of the primary disk in GB for each nested PVE VM"
|
|
type = number
|
|
default = 64
|
|
}
|
|
|
|
variable "disk_storage" {
|
|
description = "Proxmox storage pool for VM disks (must support raw format). Required, no default. run-integration.sh removes terraform.tfvars before applying, so set TF_VAR_disk_storage in the environment (tests/.env.test)."
|
|
type = string
|
|
}
|
|
|
|
variable "iso_storage" {
|
|
description = "Proxmox storage pool for uploads (must accept the iso AND import content types — import is not enabled by default on most storages). Required, no default. run-integration.sh removes terraform.tfvars before applying, so set TF_VAR_iso_storage in the environment (tests/.env.test)."
|
|
type = string
|
|
}
|
|
|
|
variable "network_bridge" {
|
|
description = "Network bridge on the host to attach the nested PVE VMs to"
|
|
type = string
|
|
default = "Core"
|
|
}
|
|
|
|
variable "test_vm_password" {
|
|
description = "Root password for the nested PVE instances. Set via TF_VAR_test_vm_password env var."
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "storage_vmid" {
|
|
description = "VMID for the shared storage VM (must be inside the CI pool's reserved range)"
|
|
type = number
|
|
default = 5080
|
|
}
|
|
|
|
variable "storage_vm_ssh_public_key" {
|
|
description = "SSH public key granted to the storage VM's ubuntu user (cloud images refuse password SSH; required for provision, unused on destroy)"
|
|
type = string
|
|
default = ""
|
|
}
|
|
|
|
variable "cloud_image_path" {
|
|
description = "Local path to the Ubuntu cloud image imported as the storage VM's disk (required for provision; unused on destroy)"
|
|
type = string
|
|
default = ""
|
|
}
|
|
|
|
variable "pool_id" {
|
|
description = "Resource pool the nested VMs are created in (a pool-scoped API token can only allocate here)"
|
|
type = string
|
|
default = null
|
|
}
|