How microsoft/sdn works
Project Type and Purpose
• This is an open-source deployment and automation toolkit for Microsoft’s Software Defined Networking (SDN) stack on Windows Server and Azure Stack HCI.
• It consists of PowerShell scripts and modules (SDNExpress, VMMExpress), SCVMM service templates, diagnostic scripts, Kubernetes CNI plugins (flannel, wincni, containerd), REST examples, switch configurations, and sample RDMA/C CI code.
• Its goal is to automate the provisioning of the SDN fabric (Network Controller, Software Load Balancer, RRAS gateways) and integrate container and Kubernetes networking into that fabric.
File Structure
• Top-level directories indicate major functional areas:
· SDNExpress (interactive deployment CLI + PowerShell module)
· VMM (SCVMM-based deployment via scripts and Service Templates)
· Kubernetes (flannel overlays, Windows CNI plugin, containerd integration)
· Containers, Diagnostics, NCRESTExamples (post-deployment validation & REST usage)
· SwitchConfigExamples (physical switch setup)
· NDKCI (native RDMA sample code)
• Configuration files (.psd1, .toml, .json, .xml) and scripts (.ps1, .sh) drive the automation.
• REST API is surfaced by the Network Controller (JSON schemas).
Main Components
a. Deployment Clients
• SDNExpress.ps1 + SDNExpressModule.psm1 (interactive CLI & reusable module)
• VMMExpress scripts + SCVMM Service Template XMLs
• Optional SCVMM Console GUI
• Kubernetes tooling (flannel l2bridge/overlay, wincni plugin, containerd configs)
b. Control Plane
• Network Controller VMs (RESTful API endpoints)
• SCVMM (when used)
c. Data Plane Infrastructure
• Hyper-V hosts running:
• Network Controller VMs
• SLB Mux VMs
• RRAS Gateway VMs
• Hyper-V Host Agents (SLB host agent)
d. Physical Network
• Trunked VLANs, DCB settings, BGP peerings
• Physical switches (Cisco/Dell examples)
e. Tenant Workloads
• VMs on overlay networks
• Kubernetes pods/containers attached via CNI + flannel/wincni
Relationships and Interactions
• Deployment client (SDNExpress/VMMExpress) reads user configuration → invokes Network Controller REST API or SCVMM PowerShell cmdlets → deploys resource-definition VMs (Controller, SLB, Gateway).
• Network Controller exposes JSON/REST endpoints → manipulated by PowerShell modules or curl/Invoke-WebRequest.
• SLB Mux agents on each host receive instructions from Controller → program load-balancing tables.
• RRAS Gateway VMs get configuration for tunnels/routes via Controller.
• Kubernetes CNI components contact Controller to provision overlay or l2bridge networks for pods.
• Diagnostics scripts query host and Controller state for troubleshooting.
Architectural Patterns and Design Principles
• Modular CLI + module pattern (SDNExpress + SDNExpressModule.psm1)
• Infrastructure-as-code: declarative config files drive VM/template provisioning
• RESTful control plane (Network Controller API) with idempotent JSON operations
• Plugin pattern for container networking (CNI spec: flannel, wincni, containerd)
• Separation of control plane (Controller) and data plane (Hyper-V hosts, Mux, Gateway)
Key Technologies and Frameworks
• PowerShell 5.x/7.x scripting, PowerShell modules (.psm1)
• SCVMM Service Templates & PowerShell cmdlets
• JSON/REST API (Network Controller)
• Kubernetes CNI plugins (Go code), flannel (overlay, l2bridge)
• containerd config for Windows containers
• BGP, VLAN, DCB, GRE, IPSec via RRAS Gateway
Final Recommendations
• Error-handling or rollback patterns (VMMExpress rollbacks).
• If space allows, show sample tenant workflows (create overlay, attach VM, define ACL).
• Share drafts for peer review—accuracy in depicting these dynamic interactions is critical.