From b33bd5f25251a4c1cbb2c08885378d2ee29b05e2 Mon Sep 17 00:00:00 2001 From: Ryan Blundon Date: Wed, 25 Feb 2026 21:06:32 -0600 Subject: [PATCH] feat(netbox): add custom field, VLAN, and prefix initializers (Phase 1.1-1.4) --- netbox/initializers/.gitkeep | 0 netbox/initializers/custom_fields.yml | 55 +++++++++++++++++++++++++++ netbox/initializers/prefixes.yml | 8 ++++ netbox/initializers/vlans.yml | 10 +++++ 4 files changed, 73 insertions(+) delete mode 100644 netbox/initializers/.gitkeep create mode 100644 netbox/initializers/custom_fields.yml create mode 100644 netbox/initializers/prefixes.yml create mode 100644 netbox/initializers/vlans.yml diff --git a/netbox/initializers/.gitkeep b/netbox/initializers/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/netbox/initializers/custom_fields.yml b/netbox/initializers/custom_fields.yml new file mode 100644 index 0000000..d1b3028 --- /dev/null +++ b/netbox/initializers/custom_fields.yml @@ -0,0 +1,55 @@ +# NetBox Custom Fields for VM Provisioning Pipeline +# Object type: Virtualization > Virtual Machine +# +# These fields must be created in NetBox before the pipeline can function. +# Operators must populate these fields before setting VM status to Staged. +# +# To apply: NetBox Admin > Custom Fields > Import (or create manually) + +custom_fields: + - name: proxmox_template + label: Proxmox Template + type: selection + object_types: + - virtualization.virtualmachine + required: true + description: VM template to clone on Proxmox. Must match an available template on the target node. + choices: + - ubuntu-24.04-small + - ubuntu-24.04-medium + - ubuntu-24.04-large + - ubuntu-24.04-large-plus + - ubuntu-24.04-xlarge + - ubuntu-24.04-xlarge-plus + + - name: proxmox_node + label: Proxmox Node + type: selection + object_types: + - virtualization.virtualmachine + required: true + description: > + Target node for final VM placement. VM is always cloned from templates + on fantasyland, then migrated to this node by Terraform automatically. + choices: + - fantasyland + - main-street-station + - tomorrowland + + - name: proxmox_datastore + label: Proxmox Datastore + type: selection + object_types: + - virtualization.virtualmachine + required: true + description: Storage backend for the VM disk on the target Proxmox node. + choices: + - liberty-tree + + - name: provisioning_notes + label: Provisioning Notes + type: text + object_types: + - virtualization.virtualmachine + required: false + description: Free-text field for operator notes during provisioning. diff --git a/netbox/initializers/prefixes.yml b/netbox/initializers/prefixes.yml new file mode 100644 index 0000000..9c05e41 --- /dev/null +++ b/netbox/initializers/prefixes.yml @@ -0,0 +1,8 @@ +# NetBox IP Prefix Definitions +# Scope: Prefixes used by the VM provisioning pipeline + +prefixes: + - prefix: 10.1.71.0/24 + status: active + vlan: Server Trusted + description: Server Trusted VLAN — infrastructure services, VM hosts, pipeline systems diff --git a/netbox/initializers/vlans.yml b/netbox/initializers/vlans.yml new file mode 100644 index 0000000..5340034 --- /dev/null +++ b/netbox/initializers/vlans.yml @@ -0,0 +1,10 @@ +# NetBox VLAN Definitions +# Scope: VLANs used by the VM provisioning pipeline +# +# Additional VLANs can be added as pipeline scope expands. + +vlans: + - name: Server Trusted + vid: 71 + status: active + description: Infrastructure services and VM hosts (10.1.71.0/24)