replica-omnisciente/infrastructure/fleet
Raphael Cautus (Maestro) 39fb44fe0e feat(infra): proxmox IaC, firmware, savearth realm, lab-gateway ESP, CI
- infrastructure/proxmox/: CT provisioning configs
- infrastructure/fabric/gitops/: GitOps layer
- fleet.yaml: GPU inventory (Dell GTX 1050 vfio-pci passthrough)
- firmware/: ESP32 firmware tree (67 files, 6.9MB)
- realms/savearth/: Savearth team realm with heteronyms
- lab-gateway: ESP client + manager
- CI: Forgejo + GitHub Actions workflows

Co-authored-by: Álvaro de Campos <campos@portugalfuturista.org>
2026-07-31 14:57:41 +01:00
..
fleet.yaml feat(infra): proxmox IaC, firmware, savearth realm, lab-gateway ESP, CI 2026-07-31 14:57:41 +01:00
gen-ansible.py feat(fleet): unified fleet control plane — pfctl, inventory, identity 2026-07-31 00:08:26 +01:00
identity.md feat(fleet): unified fleet control plane — pfctl, inventory, identity 2026-07-31 00:08:26 +01:00
inventory.yml feat(fleet): unified fleet control plane — pfctl, inventory, identity 2026-07-31 00:08:26 +01:00
pfctl.py feat(fleet): unified fleet control plane — pfctl, inventory, identity 2026-07-31 00:08:26 +01:00
prometheus.yml feat(fleet): unified fleet control plane — pfctl, inventory, identity 2026-07-31 00:08:26 +01:00
README.md feat(fleet): unified fleet control plane — pfctl, inventory, identity 2026-07-31 00:08:26 +01:00

PF Fleet Control — Unified Infrastructure Management

Single source of truth for all Portugal Futurista infrastructure: Proxmox CTs/VMs, Hetzner cloud, and physical hosts — all treated equally.

Quick Start

# List all nodes
pfctl ls

# List only running nodes
pfctl ls --running

# List nodes on a specific host
pfctl ls --host gigabyte

# SSH into any node (by VMID or name)
pfctl ssh 223
pfctl ssh pf-edge

# Run a command on one node
pfctl exec 223 "systemctl status pf-gbrain"

# Run a command on EVERY running node
pfctl exec all "uname -r"

# Start/stop/restart any node
pfctl start 208
pfctl stop 223
pfctl restart 217

# Detailed status (with live uptime)
pfctl status 223

# Cloud cost summary
pfctl cost

# Live dashboard (auto-refresh)
pfctl dashboard

# Rescan Proxmox and update inventory
pfctl update-inventory

Files

File Purpose
fleet.yaml Master inventory — all nodes, specs, IPs, roles
pfctl.py Unified CLI (pfctl)
gen-ansible.py Generates Ansible inventory from fleet.yaml
prometheus.yml Unified Prometheus scrape config
inventory.yml Generated Ansible inventory (run gen-ansible.py --write)

Architecture

pfctl (CLI)
  ├── fleet.yaml (single source of truth)
  │
  ├── Proxmox nodes → SSH tunnel to ASUS → pct exec / qm guest exec
  ├── Hetzner VMs   → direct SSH (public IP)
  └── Physical hosts → SSH via tunnel

pfctl auto-detects the node type and routes commands through the right backend. No knowledge of Proxmox internals or hcloud needed — just pfctl exec 223.

Adding a New Node

  1. Provision (via OpenTofu or manually)
  2. Add entry to fleet.yaml under the right section (hosts, cloud, or nodes)
  3. Run pfctl update-inventory to sync specs from Proxmox API
  4. Run python3 gen-ansible.py --write to update Ansible inventory

Ansible Integration

# Generate inventory
python3 infrastructure/fleet/gen-ansible.py --write

# Use with ansible
ansible -i infrastructure/fleet/inventory.yml all -m ping
ansible -i infrastructure/fleet/inventory.yml aurelio -m shell -a "systemctl status gbrain"
ansible -i infrastructure/fleet/inventory.yml cloud_vms -m shell -a "uptime"

Groups: proxmox_hosts, cloud_vms, containers, running, aurelio, media, savearth, monitoring.