Add a server
Provisions a new physical server into a compute rack. The workflow runs on a branch, cables the server to the adjacent leaf switches, cascades through the AVD pipeline to update affected device configs, and opens a proposed change.
Prerequisites:
- A running stack with seed data loaded (Quick Start).
- A provisioned fabric with at least one compute rack (Provision Your First Fabric).
- At least one
TemplateComputePhysicalServertemplate defined (seeded with the project).
Open the service portal​
Navigate to http://localhost:8501. From the sidebar, open Add Server.
Fill the form​
| Field | Description |
|---|---|
| Server Name | Hostname for the new server, for example, compute-pod-a2-3-1. |
| Rack | Dropdown of compute racks only (racks with rack_type = "compute"). Shown as <rack-name> (<pod-name>). |
| Server Template | Dropdown of available TemplateComputePhysicalServer templates. Determines the server's interface count, role, and other defaults. |
The branch used for the change is shown in the sidebar under Select Branch. By default it's main; use the Create branch link in the sidebar to create and select a new branch first if you want the change isolated.
Submit​
Click Add Server. The portal performs:
- Create branch named
add-server-<server-name>(if you weren't already on a non-default branch). - Create the server (
ComputePhysicalServer) in the chosen rack, using the template's interface layout and marking statusprovisioning. - Create the server as a member of the
serversgroup — this triggers the server-cabling generator and the AVD cascade. - Wait ~60 seconds for the generator chain to run: server cabling, hostvar regeneration, and structured config updates for the affected leaf switches.
- Create a proposed change summarising the new server.
You'll see two buttons:
- View Server — opens the new
ComputePhysicalServerobject in Infrahub. - View Proposed Change — opens the proposed change.
Review and merge​
In the proposed change:
- Data tab — confirm the new server exists with its interfaces and cabling.
- Artifacts tab — the leaves this server cables into should have updated EOS configurations reflecting the new access/trunk ports.
- Approve and Merge.
Automated cabling flow​
The server-cabling generator runs when a server is added to the servers group. The portal commits the new ComputePhysicalServer and its servers group membership in the same upsert, so the generator sees the target as a group member as soon as it runs.
For a newly added server, the generator:
- Reads the server rack and server interfaces from the generator query.
- Finds leaf switches in the same rack and their
serverrole physical interfaces. - Selects the first available leaf port index that is free on all target leaves.
- Creates
NetworkLinkobjects between the server interfaces and selected leaf physical interfaces. - For dual-homed, multi-leaf servers, creates server-side
Bond1. - Creates one switch-side
InterfaceLagnamedPort-Channel<ID>on each attached leaf. Thechannel_idis derived from the selected leaf port number and is owned in Infrahub. - Attaches each leaf physical interface to its local switch-side LAG.
- Applies tagged and untagged VLANs. Single-homed servers use the paired leaf physical interface; dual-homed servers merge VLAN intent onto server
Bond1and the switchPort-Channel<ID>objects instead of the member Ethernet interfaces. - For idempotence, reconciles already-cabled servers by rebuilding the cabling plan from existing
NetworkLinkobjects, then reapplying VLANs and LAG state. - Sets EVPN Ethernet Segment on switch-side LAGs when the server is attached across non-MLAG leaves.
- Marks AVD hostvars as not ready for the fabric and triggers hostvar generation, which cascades into structured config generation.
The resulting hostvars include port_channel.channel_id for switch-side server LAGs, so PyAVD receives the explicit Port-Channel ID from Infrahub. For bonded servers, VLAN mode and VLAN lists are derived from the logical Bond or Port-Channel VLAN relationships, not from member Ethernet ports.
If the wait times out​
The portal waits a fixed 60 seconds for the generator chain to finish. On a busy machine the chain can take longer. If the proposed change shows no updated device configs:
- Open the proposed change's branch in the Infrahub UI.
- Navigate to Actions → Tasks and check the status of the hostvar and structured-config generator runs.
- If they haven't started, trigger
generate-avd-device-hostvaron the affected leaves manually, thengenerate-avd-device-structured-configon the fabric.
See Common Issues for more.
Source​
Service-portal implementation: service_catalog/pages/2_Add_Server.py.