Network Infrastructure as Code
Infrastructure as Code (IaC) is "the process of managing and provisioning computer data centers through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools" (source: Wikipedia). Network Infrastructure as Code (NIAC) applies IaC principles to network device configuration and management.
Using NIAC principles you describe the desired state of networking infrastructure (your intent) in text files that can be managed with traditional source code control tools like Git. You could use NIAC to manage traditional device configurations (which would be a very-low-level intent) or as part of a solution that uses abstract high-level data model. These blog posts cover NIAC principles:
- Network Infrastructure as Code Is Nothing New
- Infrastructure as Code Actually Makes Sense
- Automation Isn’t About Building a Button to Press
Other blog posts dived deeper into implementation details and related tools:
- Adjusting System State with Infrastructure as Code
- Infrastructure-as-Code, NETCONF and REST API
- Infrastructure-as-Code Tools
- From Excel to Network Infrastructure as Code
- Network Infrastructure as Database
- Firewall Ruleset Automation with CI Pipeline
- What Is Continuous Integration?
- Continuous Integration in Network Automation
- Validating Data in GitOps-Based Automation
- Can We Make REST API Transactional Across Multiple Calls?
- Stop the Low-Level Configuration Manipulation
You might also enjoy a few rants on the topic:
Single Source of Truth
Single source of truth (single repository of all information relevant to your networking infrastructure) is mandatory for a successful NIAC implementation. You'll find more information in these blog posts:
- Building the Network Automation Source of Truth
- Building Network Automation Source-of-Truth (Part 2)
- Creating Automation Source-of-Truth from Device Configurations
- Text Files or Relational Database?
- Building Automation Device Inventory with Open Source Tools
- Automation Story: Building a Network Inventory Database
- Read Network Device Information with REST API and Store It Into a Database
- Data Deduplication in Network Automation Data Models
- Model Your Network as a Graph not a Set of Boxes
- Growing Beyond Ansible host_vars and group_vars
We covered numerous NIAC implementation details in Building Network Automation Solutions online course:
- Build a Network Automation Stack From Ground Up (including numerous single-source-of-truth implementation details)
- Network Infrastructure as Code Concepts
- Sample NIAC implementation in private cloud infrastructure
Low-level device configuration management with Git is described in Ansible for Networking Engineers online course; source code is available in our Github repository.