KineticDevOps / Build log

Fabric as code, part 1: an AI back-end network from one YAML file

2026-12-05

AI training clusters live or die on the back-end network. Every GPU node needs a lossless, high-bandwidth path to every other node, and the fabric that provides it is built from hundreds of near-identical switch configs. Hand-editing those does not scale, so this series builds the whole thing as code, from first commit to simulation.

The idea

One file, fabric.yml, describes the design: two spines, four leaves, two tenants (GPU compute and storage) and a lossless RoCEv2 flag. A generator turns it into per-switch NVIDIA Cumulus Linux (NVUE) configs, an Ansible inventory and a topology file for NVIDIA's DSX Air simulator.

spines: [spine01, spine02]
leaves: [leaf01, leaf02, leaf03, leaf04]
tenants:
  - { name: gpu-compute, vrf: GPU,  vlan: 10, vni: 10010, l3vni: 4001 }
  - { name: storage,     vrf: STOR, vlan: 20, vni: 10020, l3vni: 4002 }

Design choices

Tests before switches

The generator validates the design first and refuses to emit configs if it finds duplicate loopbacks, duplicate leaf ASNs, a port used twice, repeated VNIs, or an L2 VNI that collides with an L3 VNI. Eight unit tests cover those checks and the shape of the output, and CI runs them on a self-hosted runner so builds cost nothing in hosted minutes.

What is not proven yet

The generated NVUE has not run on a real Cumulus node. Part 2 loads the topology into DSX Air, deploys with Ansible using an automatic rollback window, and fixes whatever the switches reject. Expect a post about the mismatches, because there will be some.

Status: generator, validation and tests done. Next: simulation, then post-deploy checks for BGP sessions and EVPN routes.