The initial two-VM run against a real Proxmox host found three real
bugs in the obmp-docker stack, plus one design issue in this test:
Fixed in obmp-docker (deploy-refinement branch):
- 745f066 deploy.sh: probe sudo with `sudo -n true` instead of
`sudo -v` / `sudo -n -v`; the latter demands a credential
timestamp that NOPASSWD never produces, so both fail on
cloud-init / CI even with NOPASSWD:ALL configured.
- 6df67a7 .env.example: quote GNMI_ADDRESSES with single quotes so
docker compose's .env parser doesn't choke on the mid-line
comma in the double-quoted list form.
Fixed here:
- bmpgen cloud-init: add `port = 1179` under [global.config] to
avoid gobgpd's 179 listener bind failing under Ubuntu 24.04 +
Docker even with --network host and default NET_BIND_SERVICE cap.
We don't accept BGP peers on bmpgen so the port value doesn't
matter as long as it's unprivileged.
- run-test.sh: fix column name for bgp_peers.state -- the opstate
enum uses lowercase 'up', not uppercase 'UP'.
Verified against the live run: 6/6 assertions pass, ip_rib landed
251,760 routes from the store VM's own gobgp connecting to Bromirski's
public full-table feed via --profile test.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
195 lines
5.7 KiB
HCL
195 lines
5.7 KiB
HCL
############################################################################
|
|
# Proxmox connection
|
|
############################################################################
|
|
|
|
variable "pve_endpoint" {
|
|
description = "Proxmox VE API endpoint, e.g. https://pve.lab.example:8006/"
|
|
type = string
|
|
}
|
|
|
|
variable "pve_api_token" {
|
|
description = "PVE API token in the form USER@REALM!TOKENID=UUID"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "pve_insecure" {
|
|
description = "Skip TLS verification for the PVE API (lab / self-signed only)"
|
|
type = bool
|
|
default = false
|
|
}
|
|
|
|
variable "pve_ssh_username" {
|
|
description = "Username the provider uses for PVE SSH-side operations (snippet uploads)"
|
|
type = string
|
|
default = "root"
|
|
}
|
|
|
|
variable "pve_ssh_private_key_path" {
|
|
description = "Path to the SSH private key the provider uses to reach the PVE host. Its matching pubkey must be in /root/.ssh/authorized_keys on the PVE node."
|
|
type = string
|
|
default = "~/.ssh/id_ed25519"
|
|
}
|
|
|
|
variable "pve_ssh_address" {
|
|
description = "Address the provider uses for SSH to the PVE node. Defaults to the endpoint host. Set explicitly if the PVE cluster returns a different bridge/hostname than the one that's reachable from here."
|
|
type = string
|
|
default = ""
|
|
}
|
|
|
|
variable "pve_node" {
|
|
description = "PVE node name to schedule VMs on (as shown in the PVE cluster tree)"
|
|
type = string
|
|
}
|
|
|
|
############################################################################
|
|
# VM shape
|
|
############################################################################
|
|
|
|
variable "store_vm_id" {
|
|
description = "PVE VMID for the OBMP store VM"
|
|
type = number
|
|
default = 9001
|
|
}
|
|
|
|
variable "bmpgen_vm_id" {
|
|
description = "PVE VMID for the GoBGP BMP-source VM"
|
|
type = number
|
|
default = 9002
|
|
}
|
|
|
|
variable "vm_cpu_cores" {
|
|
description = "vCPU count per test VM. Store is IO-bound at ingest, keep to 2-4."
|
|
type = number
|
|
default = 2
|
|
}
|
|
|
|
variable "vm_memory_mb" {
|
|
description = "Memory per VM in MB. 4096 covers the compose stack for a light BMP test."
|
|
type = number
|
|
default = 4096
|
|
}
|
|
|
|
variable "vm_disk_gb" {
|
|
description = "Root disk size per VM in GB. Store needs headroom for postgres/kafka."
|
|
type = number
|
|
default = 32
|
|
}
|
|
|
|
############################################################################
|
|
# Storage + image
|
|
############################################################################
|
|
|
|
variable "vm_storage_pool" {
|
|
description = "PVE storage pool for VM disks, e.g. local-lvm, local-zfs"
|
|
type = string
|
|
}
|
|
|
|
variable "image_storage" {
|
|
description = "PVE storage that holds ISOs / cloud images (typically local)"
|
|
type = string
|
|
default = "local"
|
|
}
|
|
|
|
variable "snippet_storage" {
|
|
description = "PVE storage that supports snippets content type (typically local)"
|
|
type = string
|
|
default = "local"
|
|
}
|
|
|
|
variable "ubuntu_image_url" {
|
|
description = "Ubuntu cloud image URL. Pinned to noble by default; override for a snapshot."
|
|
type = string
|
|
default = "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img"
|
|
}
|
|
|
|
variable "ubuntu_image_checksum" {
|
|
description = "SHA256 of the Ubuntu image. Set to enforce; empty to skip check."
|
|
type = string
|
|
default = ""
|
|
}
|
|
|
|
############################################################################
|
|
# Network
|
|
############################################################################
|
|
|
|
variable "vm_bridge" {
|
|
description = "PVE Linux bridge the VMs attach to, e.g. vmbr0"
|
|
type = string
|
|
default = "vmbr0"
|
|
}
|
|
|
|
variable "vm_vlan_tag" {
|
|
description = "802.1q VLAN tag; 0 = no tag"
|
|
type = number
|
|
default = 0
|
|
}
|
|
|
|
variable "store_vm_ip_cidr" {
|
|
description = "Static IPv4/CIDR for the store VM, e.g. 10.40.40.220/24. Leave empty for DHCP."
|
|
type = string
|
|
default = ""
|
|
}
|
|
|
|
variable "bmpgen_vm_ip_cidr" {
|
|
description = "Static IPv4/CIDR for the bmpgen VM, e.g. 10.40.40.221/24. Leave empty for DHCP."
|
|
type = string
|
|
default = ""
|
|
}
|
|
|
|
variable "vm_gateway" {
|
|
description = "Default gateway for both VMs. Ignored when using DHCP."
|
|
type = string
|
|
default = ""
|
|
}
|
|
|
|
variable "vm_dns_servers" {
|
|
description = "DNS servers for both VMs. Ignored when using DHCP."
|
|
type = list(string)
|
|
default = ["1.1.1.1", "8.8.8.8"]
|
|
}
|
|
|
|
############################################################################
|
|
# SSH access
|
|
############################################################################
|
|
|
|
variable "ssh_public_key_path" {
|
|
description = "Path to the public key that will be authorized on both VMs' ubuntu user."
|
|
type = string
|
|
default = "~/.ssh/id_rsa.pub"
|
|
}
|
|
|
|
variable "ssh_username" {
|
|
description = "Cloud-init user created on both VMs (has passwordless sudo, ssh key auth)."
|
|
type = string
|
|
default = "ubuntu"
|
|
}
|
|
|
|
############################################################################
|
|
# obmp-docker under test
|
|
############################################################################
|
|
|
|
variable "obmp_repo_url" {
|
|
description = "obmp-docker repo URL to clone on the store VM."
|
|
type = string
|
|
default = "http://10.40.40.143:3000/sam/obmp-docker.git"
|
|
}
|
|
|
|
variable "obmp_repo_ref" {
|
|
description = "Git ref (branch, tag, or commit) to check out on the store VM. Pin this for reproducibility."
|
|
type = string
|
|
default = "deploy-refinement"
|
|
}
|
|
|
|
variable "router_facing_port" {
|
|
description = "BMP port routers connect to. Defaults to 1790 (IANA BMP port); mirrors obmp-docker .env."
|
|
type = number
|
|
default = 1790
|
|
}
|
|
|
|
variable "test_local_asn" {
|
|
description = "AS number the GoBGP-side stand-in router uses. Private (64512-65534)."
|
|
type = number
|
|
default = 65099
|
|
}
|