Showing posts with label Ansible. Show all posts
Showing posts with label Ansible. Show all posts

Sunday, 23 August 2026

CI/CD Pipelines for Cisco SDWAN: Automate, Validate and Deploy Network Changes with Confidence

 Modern enterprise WANs are becoming increasingly software-driven. With Cisco SD-WAN, centralized management, policy-based configuration, APIs, templates, and automation provide a strong foundation for managing large numbers of branch and data-center sites.

But there is an important question:

How can network engineers make SD-WAN configuration changes faster without sacrificing control and reliability?

One answer is to combine NetDevOps and CI/CD practices with Cisco SD-WAN automation.

Instead of making a configuration change directly on a production device, engineers can define the desired change, store it in Git, validate it, test it, review it, deploy it through the SD-WAN Manager API or automation tools, and finally verify the resulting network state.

A simple way to visualize the approach is:

Design → Git → Validate → Test → Approve → Deploy → Verify

Cisco's SD-WAN Manager API is specifically designed for controlling, configuring, and monitoring devices in the SD-WAN overlay, and Cisco documents Network-as-Code as one of its automation use cases.


What Is NetDevOps?

NetDevOps brings software-development practices into network operations.

Traditional network management often follows this model:

Requirement
    ↓
Engineer logs in
    ↓
Configuration change
    ↓
Verify

This approach can work well for individual changes, but becomes increasingly difficult when an organization manages hundreds or thousands of SD-WAN sites.

A NetDevOps approach introduces:

  • Version control
  • Automation
  • Automated validation
  • Testing
  • Peer review
  • Controlled deployment
  • Configuration history
  • Rollback capability
  • Continuous verification

For Cisco SD-WAN, this can apply to configuration and policy elements such as:

  • Device configuration
  • Feature templates
  • Device templates
  • Configuration Groups
  • Policy Groups
  • Application-Aware Routing policies
  • Security policies
  • Routing policies
  • VPN configuration
  • Transport configuration
  • Interface configuration

Cisco's current SD-WAN Manager API documentation includes configuration APIs for templates and policies as well as monitoring and device-management operations.


Why Use CI/CD for Cisco SD-WAN?

SD-WAN is centrally managed by design.

That provides enormous operational advantages, but it also means that an incorrectly designed centralized change can have a much larger blast radius than a change made on a single router.

For example:

Manual Router Change

Engineer
   ↓
Branch-101

compared with:

Centralized SD-WAN Policy Change

Engineer
   ↓
SD-WAN Manager
   ↓
Policy
   ↓
Multiple Branches

This is where CI/CD can add an additional layer of protection.

Key Benefits

1. Version Control

Configuration and automation artifacts can be stored in Git.

2. Automated Validation

Changes can be checked before deployment.

3. Controlled Testing

Policies and configurations can be tested before production rollout.

4. Peer Review

Another engineer can review the proposed change.

5. Controlled Deployment

The pipeline can deploy only approved changes.

6. Better Auditability

Every change can be associated with a commit, review, pipeline execution, and deployment result.

7. Easier Rollback

Previous versions can be identified and used as part of the recovery process.


Cisco SD-WAN CI/CD Pipeline

A practical SD-WAN pipeline can contain six stages:

1. Source
      ↓
2. Build & Validate
      ↓
3. Test
      ↓
4. Approval
      ↓
5. Deploy
      ↓
6. Verify & Monitor

Let's examine each stage from a network engineer's perspective.


Stage 1: Source Repository

The process starts with the desired configuration or policy definition.

Instead of immediately changing the SD-WAN environment, the change is stored in a Git repository.

For example:

sdwan-automation/
│
├── devices/
│   ├── branch-101.yaml
│   └── branch-102.yaml
│
├── templates/
│   ├── wan-template.yaml
│   └── security-template.yaml
│
├── policies/
│   ├── app-route-policy.yaml
│   └── traffic-policy.yaml
│
└── scripts/
    ├── validate.py
    └── deploy.py

A typical workflow could be:

Engineer
   ↓
Feature Branch
   ↓
Configuration Change
   ↓
Pull Request
   ↓
Peer Review
   ↓
Merge

This gives the network team a history of the proposed and approved changes.


Stage 2: Build and Validate

In software development, the build stage often means compiling an application.

In network CI/CD, the meaning is slightly different.

The pipeline can prepare and validate the SD-WAN configuration before deployment.

Possible checks include:

  • YAML/JSON syntax
  • Required parameters
  • IP addressing
  • Site IDs
  • VPN definitions
  • Template variables
  • Policy structure
  • Naming standards
  • Configuration dependencies
  • Security rules
  • Organizational standards

For example:

Configuration
     ↓
Syntax Check
     ↓
Schema Check
     ↓
Policy Check
     ↓
Dependency Check
     ↓
PASS / FAIL

If validation fails, the pipeline should stop.

Validation
     ↓
❌ FAILED
     ↓
Stop Pipeline
     ↓
Notify Engineer

This is much better than discovering the same error after a production deployment.


Stage 3: Test the SD-WAN Change

Testing is one of the most important parts of network CI/CD.

Consider a proposed Application-Aware Routing policy.

The engineer wants business-critical application traffic to prefer MPLS when the SLA requirements are satisfied and use another available transport when they are not.

Before deploying the policy broadly, the pipeline should validate the intended behavior.

Possible checks include:

  • Policy syntax
  • Policy structure
  • VPN configuration
  • Application classification
  • SLA definitions
  • Preferred transport
  • Failover behavior
  • Routing behavior
  • Tunnel status
  • BFD status
  • Connectivity
  • Latency
  • Packet loss
  • Jitter

A simplified workflow is:

New Policy
    ↓
Deploy to Test Environment
    ↓
Generate Traffic
    ↓
Measure SLA
    ↓
Verify Path Selection
    ↓
Test Failover
    ↓
PASS / FAIL

Stage 4: Approval

After automated testing succeeds, the change can move to an approval stage.

For production SD-WAN, this is particularly important because a centralized policy can potentially affect many sites.

A mature workflow might look like:

Git Commit
    ↓
Validation
    ↓
Testing
    ↓
Security Check
    ↓
Peer Review
    ↓
Change Approval
    ↓
Production

For high-risk changes, the pipeline should not automatically proceed without appropriate authorization.

This is an important principle:

Automation should reduce manual effort, not remove operational governance.


Stage 5: Deploy Through SD-WAN Manager

Once approved, the pipeline can use the SD-WAN Manager API or an approved automation framework to perform the deployment.

Cisco documents the SD-WAN Manager REST API for configuration, provisioning, monitoring, and integration with automation platforms.

A simplified architecture is:

Network Engineer
       ↓
Git Repository
       ↓
CI/CD Platform
       ↓
Automation Engine
       ↓
SD-WAN Manager API
       ↓
SD-WAN Overlay
       ↓
Branch / Hub Devices

The automation layer could use technologies such as:

  • Python
  • Ansible
  • REST API clients
  • Terraform where appropriate
  • CI/CD platform integrations

Cisco also provides API operations for previewing device configuration and attaching device templates, which can be incorporated into controlled automation workflows.


Stage 6: Verify and Monitor

Deployment should not be considered successful simply because the API returned a successful response.

The pipeline should verify the resulting operational state.

For example:

Deployment
    ↓
Check Device Status
    ↓
Check Control Connections
    ↓
Check OMP
    ↓
Check BFD
    ↓
Check Tunnel State
    ↓
Check Policy
    ↓
Check Application Performance
    ↓
SUCCESS

Cisco's SD-WAN Manager APIs provide access to device and monitoring information, including overlay and application-related operational data.

This enables a much more complete workflow:

Configure → Verify → Observe

rather than simply:

Configure → Assume Success


A Practical Cisco SD-WAN CI/CD Example

Let's consider a real-world scenario.

A company wants to change the application routing policy for its critical ERP application.

The requirement is:

Application: ERP

Preferred Path:
    MPLS

Backup Path:
    Internet

SLA:
    Low latency
    Low packet loss
    Acceptable jitter

Instead of modifying the policy directly in production, the network engineer creates a change request.


Step 1 — Create the Configuration

The desired policy is represented in the repository.

ERP Policy
    ↓
Preferred Transport
    ↓
SLA Requirements
    ↓
Fallback Transport

Step 2 — Commit to Git

The engineer creates a feature branch:

main
  |
  +---- feature/erp-path-policy

The configuration is committed.


Step 3 — Automated Validation

The CI/CD pipeline checks:

✓ Policy syntax
✓ Required parameters
✓ VPN references
✓ SLA definitions
✓ Transport references
✓ Naming standards

Step 4 — Test

The change is tested in an appropriate non-production environment.

The pipeline verifies:

ERP Traffic
     ↓
MPLS Available?
     ↓
YES → Use MPLS
     ↓
MPLS Degraded?
     ↓
YES → Evaluate Backup Path
     ↓
Internet

Step 5 — Approval

The network team reviews:

  • Expected behavior
  • Scope
  • Potential impact
  • Rollback plan
  • Test results

The change is approved.


Step 6 — Production Deployment

The automation platform communicates with SD-WAN Manager.

The approved configuration is deployed.


Step 7 — Verification

The pipeline checks:

  • Device status
  • Policy activation
  • Tunnel health
  • BFD
  • Application path
  • Latency
  • Loss
  • Jitter

If everything passes:

Deployment = SUCCESS

If the expected state is not achieved:

Deployment
     ↓
Verification Failed
     ↓
Stop / Rollback / Escalate

SD-WAN Manager APIs and Network as Code

One of the biggest advantages of Cisco SD-WAN for NetDevOps is its programmable management interface.

The current Cisco documentation explicitly describes Network-as-Code as a use case for the SD-WAN Manager API.

This changes the mindset from:

"I need to configure 100 routers."

to:

"I need to define the desired network state and automate its deployment."

The API can be used for activities such as:

  • Provisioning
  • Configuration
  • Monitoring
  • Device inventory
  • Template operations
  • Policy operations
  • Application statistics
  • Alarms and events

Cisco's API examples also demonstrate retrieving inventory and operational information, working with templates and policies, and retrieving application-aware routing statistics.


Git + SD-WAN Manager + Automation

A powerful architecture can look like this:

                 ┌──────────────────┐
                 │ Network Engineer │
                 └────────┬─────────┘
                          │
                          ↓
                 ┌──────────────────┐
                 │ Git Repository   │
                 └────────┬─────────┘
                          │
                          ↓
                 ┌──────────────────┐
                 │ CI/CD Platform   │
                 └────────┬─────────┘
                          │
              ┌───────────┴───────────┐
              ↓                       ↓
        Validation                 Testing
              │                       │
              └───────────┬───────────┘
                          ↓
                    Approval Gate
                          ↓
                 ┌──────────────────┐
                 │ Automation Engine│
                 └────────┬─────────┘
                          ↓
                 ┌──────────────────┐
                 │ SD-WAN Manager   │
                 │ REST API         │
                 └────────┬─────────┘
                          ↓
                 ┌──────────────────┐
                 │ SD-WAN Overlay   │
                 └──────────────────┘

This provides a clear separation between:

Configuration → Validation → Deployment → Verification


What Tools Can Be Used?

A Cisco SD-WAN CI/CD implementation can use several categories of tools.

FunctionExample
Source ControlGit, GitHub, GitLab
CI/CDJenkins, GitLab CI/CD, GitHub Actions
AutomationPython, Ansible
SD-WAN InterfaceSD-WAN Manager REST API
ConfigurationYAML, JSON
TestingPython/API-based tests, pyATS where appropriate
LabCisco Modeling Labs
MonitoringExisting SD-WAN monitoring/observability platforms

The exact toolset should depend on your organization's existing automation platform and operational requirements.


Traditional SD-WAN Change vs CI/CD Change

Traditional Model

Engineer
   ↓
SD-WAN Manager
   ↓
Change
   ↓
Verify

CI/CD Model

Engineer
   ↓
Git
   ↓
Validation
   ↓
Automated Test
   ↓
Peer Review
   ↓
Approval
   ↓
SD-WAN Manager API
   ↓
Deployment
   ↓
Verification

The second model introduces additional checkpoints before the production network is changed.


Why Git Is Important for SD-WAN

Suppose an application routing policy was changed last week and application performance subsequently degraded.

The engineer needs to determine:

What changed?

With version control, the answer can begin with the repository history.

For example:

Monday
Policy Version 10
      ↓
Tuesday
Policy Version 11
      ↓
Wednesday
Performance Issue

The engineer can investigate the difference between versions and correlate the change with operational data.

This provides much stronger change visibility than relying entirely on manual records.


Rollback Strategy

Every automated deployment should have a recovery strategy.

A simplified model is:

Known Good Version
       ↓
New Version
       ↓
Deploy
       ↓
Verify
    ↙     ↘
 FAIL     PASS
  ↓         ↓
Rollback   Continue

Rollback should be carefully designed for the specific SD-WAN configuration and policy being changed.

For example, a rollback might involve restoring a previously approved configuration or policy version rather than simply reversing individual CLI commands.


CI/CD Does Not Mean Full Automation on Day One

This is an important lesson for network engineers.

You don't need to automate your entire SD-WAN environment immediately.

A safer maturity path is:

Level 1 — Version Control

Store automation and configuration artifacts in Git.

Level 2 — Validation

Automatically validate every change.

Level 3 — Testing

Introduce automated testing.

Level 4 — Approval

Add peer review and controlled approval gates.

Level 5 — Automated Deployment

Deploy approved changes automatically.

Level 6 — Continuous Verification

Verify the network after deployment.

Level 7 — Advanced Automation

Introduce more sophisticated orchestration and Network-as-Code workflows.

This gradual approach helps teams build confidence.


Best Practices for Cisco SD-WAN CI/CD

1. Start With Read-Only Automation

Before automating production changes, automate information collection.

For example:

Device Inventory
Control Connections
OMP
BFD
Tunnel Status
Application Performance

2. Use Git for Change History

Keep configuration and automation artifacts version controlled.

3. Separate Test and Production

Never make production the first place where a new pipeline is tested.

4. Use Approval Gates

Especially for centralized policies affecting multiple sites.

5. Protect Credentials

API credentials should not be stored directly in configuration files or Git repositories.

6. Limit Automation Permissions

Give automation accounts only the access they actually require.

7. Build Rollback Into the Process

Do not design deployment first and think about rollback afterward.

8. Verify the Operational Result

An API success response does not necessarily mean the desired business outcome has been achieved.

9. Monitor the Blast Radius

A policy affecting one site is very different from one affecting hundreds of branches.

10. Keep the Pipeline Simple

Start with one useful use case and expand gradually.


CI/CD and Application-Aware Routing

Application-aware routing is an excellent example of where network CI/CD can provide value.

Imagine a policy containing:

Application
    ↓
Preferred Path
    ↓
SLA
    ↓
Fallback

A pipeline can validate that:

  • The application is correctly identified
  • The correct VPN is referenced
  • The SLA class exists
  • The required transport is available
  • The fallback behavior is defined
  • The policy does not unintentionally affect unrelated traffic

This can significantly reduce the chance of introducing an incorrect centralized policy.


CI/CD for Security Policy Changes

The same methodology can be applied to SD-WAN security changes.

For example:

Security Policy Change
        ↓
Syntax Validation
        ↓
Policy Validation
        ↓
Security Review
        ↓
Test
        ↓
Approval
        ↓
Deployment
        ↓
Verification

Security changes deserve additional scrutiny because an incorrect policy may create either connectivity problems or unintended exposure.


CI/CD and Multi-Site SD-WAN

One of the biggest advantages of SD-WAN is centralized policy and configuration management.

That same characteristic makes testing and governance important.

Consider:

                SD-WAN Manager
                       |
        ┌──────────────┼──────────────┐
        ↓              ↓              ↓
     Region A       Region B       Region C
        |              |              |
    Branches        Branches        Branches

A poorly designed centralized change could affect multiple regions.

A CI/CD pipeline can introduce controls before that change reaches the production environment.


The Future: Network as Code

CI/CD is one step toward a broader Network-as-Code operating model.

The progression can look like:

Manual Configuration
        ↓
Automation
        ↓
Version Control
        ↓
Network as Code
        ↓
CI/CD
        ↓
Continuous Verification
        ↓
Intent-Driven Networking

Cisco's SD-WAN Manager API documentation specifically identifies Network-as-Code as an automation use case, making SD-WAN a natural platform for engineers who want to develop these skills.


CI/CD Skills Every SD-WAN Engineer Should Learn

If you are a traditional network engineer moving toward NetDevOps, you do not need to become a full-time software developer.

Start with:

Git

Learn:

  • Clone
  • Branch
  • Commit
  • Pull request
  • Merge
  • Revert

Python

Learn:

  • Variables
  • Functions
  • JSON
  • REST API calls
  • Error handling

REST APIs

Understand:

  • GET
  • POST
  • PUT
  • DELETE
  • Authentication
  • HTTP status codes
  • JSON

YAML

Learn how to represent configuration and automation data.

CI/CD

Understand:

  • Pipeline
  • Job
  • Stage
  • Runner
  • Artifact
  • Approval
  • Deployment

Testing

Learn how to verify whether a network change produced the expected result.

These skills complement traditional networking knowledge rather than replacing it.


A Simple Mental Model

If you remember only one diagram from this article, remember this:

              CISCO SD-WAN CI/CD

                    CHANGE
                      ↓
                 Git Commit
                      ↓
                Validate
                      ↓
                    Test
                      ↓
              Security Check
                      ↓
                Peer Review
                      ↓
                  Approval
                      ↓
             SD-WAN Manager
                      ↓
                 Deployment
                      ↓
                Verification
                 ↙       ↘
              PASS       FAIL
               ↓           ↓
             Done       Rollback

This is the foundation of a safer SD-WAN automation strategy.


Final Thoughts

Cisco SD-WAN already provides centralized management, policy-based networking, templates, APIs, and automation capabilities.

CI/CD adds an engineering discipline around those capabilities.

Instead of treating every network change as an isolated administrative task, the change becomes part of a controlled lifecycle:

Define → Version → Validate → Test → Review → Deploy → Verify

The biggest benefit is not simply faster deployment.

It is confidence.

A well-designed CI/CD pipeline can help SD-WAN engineers make changes more consistently, detect errors earlier, maintain better audit trails, and reduce the risk associated with large-scale centralized changes.

For network engineers, learning CI/CD is therefore not about abandoning traditional networking.

It is about adding software-engineering practices to the networking skills you already have.


Frequently Asked Questions

What is CI/CD in SD-WAN?

CI/CD in SD-WAN is a controlled workflow in which configuration and policy changes are versioned, validated, tested, approved, deployed, and verified using automation.

Can Cisco SD-WAN be automated using APIs?

Yes. Cisco provides REST APIs for SD-WAN Manager that can be used for configuration, provisioning, monitoring, and integration with automation workflows.

Can Git be used for Cisco SD-WAN?

Yes. Git can be used to version-control configuration definitions, automation scripts, policy representations, and other deployment artifacts.

What is the role of Python?

Python can act as the automation layer between a CI/CD platform and SD-WAN Manager APIs.

Should SD-WAN production changes be fully automatic?

Not necessarily. High-impact changes should normally have appropriate validation, authorization, and approval controls.

What should be tested before deployment?

Depending on the change, testing can include configuration validity, policy behavior, routing, tunnel health, BFD, application performance, SLA behavior, and security requirements.

What is the biggest advantage of CI/CD for SD-WAN?

The biggest advantage is the ability to make network changes repeatable, auditable, testable, and controlled rather than relying primarily on manual operations.


Related Articles from Netterrene

AI Planning Strategies for SD-WAN Engineers
This article explores planning approaches for SD-WAN scenarios including vManage/SD-WAN Manager, vSmart/SD-WAN Controller, application-aware routing, and multi-site operations.

The Agent Loop in Cisco SD-WAN
A useful follow-up for understanding how AI-driven troubleshooting can investigate WAN health, path performance, application behavior, and policy.

How AI Memory Can Transform Cisco SD-WAN Operations
Explores working memory, long-term memory, and RAG concepts in the context of SD-WAN operations.

Multi-Agent AI Systems for Cisco SD-WAN Engineers
Explains Supervisor, Peer-to-Peer, and Hierarchical agent patterns using SD-WAN operational examples.

Anatomy of an AI Agent for Cisco SD-WAN
A knowledge-assessment style article covering agent concepts and their relationship to SD-WAN troubleshooting and automation.


Need Help With Cisco SD-WAN, ACI or Network Automation?

Need help with Cisco ACI, Nexus, data center networking, SD-WAN, or network automation?

I am a CCIE Data Center engineer with 18+ years of enterprise networking experience.

Contact me for consulting, troubleshooting, design reviews, and project support free of cost.

CI/CD Pipelines for Cisco ACI: Automate, Validate and Deploy Network Changes with Confidence

 Modern data centers are becoming increasingly software-driven. Network engineers are no longer limited to configuring individual switches through the CLI; instead, infrastructure can be represented as code, stored in version-control systems, tested automatically, and deployed through controlled pipelines.

This is where NetDevOps and CI/CD pipelines become highly relevant to Cisco ACI environments.

Cisco ACI already provides a policy-driven and API-based approach to data center networking through APIC. By combining these capabilities with Git, automation tools, testing frameworks, and CI/CD platforms, network teams can create a repeatable process for moving an ACI configuration change from development to production.

The objective is simple:

Design → Commit → Validate → Test → Approve → Deploy → Verify

The source material describes the same fundamental CI/CD idea: configuration changes are stored in a repository, validated through automated stages, and eventually deployed instead of being applied directly to the production network.


What Is NetDevOps?

NetDevOps applies DevOps principles to network engineering.

Traditional network operations often look like this:

Requirement → Engineer logs in → CLI/API change → Verification

Although this approach can work, it becomes difficult to maintain consistency when hundreds or thousands of configuration changes are performed across a large environment.

A NetDevOps approach introduces:

  • Version control
  • Automation
  • Automated testing
  • Peer review
  • Repeatable deployments
  • Change tracking
  • Rollback capability
  • Continuous validation

For Cisco ACI, this means that objects such as:

  • Tenants
  • VRFs
  • Bridge Domains
  • Application Profiles
  • EPGs
  • Contracts
  • Filters
  • L3Outs
  • Interface policies
  • Access policies

can be managed through an automated and controlled workflow.


Why Use CI/CD for Cisco ACI?

Cisco ACI is already designed around centralized policy management. However, manually creating and modifying policies through the APIC GUI or CLI can still introduce operational risks.

A CI/CD workflow adds another layer of control around those changes.

1. Version Control

ACI configuration definitions can be maintained in Git.

This provides a history of:

  • Who changed the configuration
  • What was changed
  • When it was changed
  • Which version was deployed

This becomes particularly useful during troubleshooting or rollback.

2. Automated Validation

Before a change reaches production, the pipeline can validate:

  • Configuration syntax
  • Required parameters
  • Naming standards
  • IP addressing
  • Policy dependencies
  • Configuration structure
  • Organizational standards

3. Automated Testing

The configuration can be deployed to a test or non-production environment before production deployment.

For example, a pipeline could verify:

Tenant → VRF → BD → EPG → Contract → Connectivity

4. Controlled Production Deployment

Only changes that successfully pass the required validation and approval stages should be promoted to the production ACI fabric.

5. Better Auditability

Every pipeline execution can provide an audit trail showing:

Commit → Test Result → Approval → Deployment → Verification

This is significantly easier to review than a collection of manually executed CLI commands.


Understanding the CI/CD Pipeline for Cisco ACI

A typical ACI CI/CD pipeline can be divided into five major stages:

Source → Build → Test → Deploy → Verify

For Cisco ACI, we can extend this model by adding explicit validation and post-deployment verification.


Stage 1: Source Repository

The process starts when a network engineer creates or modifies an ACI configuration definition.

Instead of immediately changing APIC, the configuration is stored in a source-control repository.

For example:

ACI-Configuration/
│
├── tenants/
│   ├── tenant-web.yaml
│   └── tenant-app.yaml
│
├── vrfs/
│   └── vrf-production.yaml
│
├── bridge-domains/
│   └── bd-web.yaml
│
├── epgs/
│   └── epg-web.yaml
│
└── contracts/
    └── contract-web-to-app.yaml

A network engineer can create a feature branch, make the required change, and submit it for review.

For example:

main
  |
  +---- feature/new-web-epg
              |
              +---- configuration change
              |
              +---- validation
              |
              +---- pull request

This creates a much more controlled change-management process.


Stage 2: Build and Configuration Validation

Once a change is committed, the CI/CD pipeline can automatically start.

The build stage does not necessarily mean compiling software as it would in application development.

For network automation, the build stage can mean:

  • Loading configuration files
  • Validating YAML or JSON
  • Checking required fields
  • Validating configuration structure
  • Checking dependencies
  • Running policy checks
  • Preparing the deployment package

For example, a pipeline could detect:

Tenant: PROD
VRF: PROD_VRF
BD: WEB_BD
Subnet: 10.10.10.0/24
Gateway: 10.10.10.1

and verify that the values comply with the organization's standards.

A failed validation should stop the pipeline before the configuration reaches the ACI fabric.


Stage 3: Test the ACI Configuration

Testing is one of the most important parts of the pipeline.

The objective is not simply to determine whether the configuration can be pushed to APIC.

The more important question is:

Does the configuration produce the expected network behavior?

Depending on the environment, automated tests could verify:

Tenant Validation

Is the expected tenant present?

VRF Validation

Does the correct VRF exist?

Bridge Domain Validation

Is the BD associated with the correct VRF?

EPG Validation

Is the EPG associated with the expected BD?

Contract Validation

Are the expected contracts and filters configured?

Connectivity Validation

Can the required endpoints communicate?

Policy Validation

Does the resulting configuration comply with the organization's security and network policies?

The source document similarly describes using a non-production testing environment to validate network configuration before production deployment.


Stage 4: Approval and Production Deployment

After successful testing, the change can move toward production.

There are several possible deployment models.

Manual Approval

The pipeline pauses and asks an engineer to approve the production change.

Test Passed
     ↓
Change Review
     ↓
Engineer Approval
     ↓
Production Deployment

This is often a good starting point for production ACI environments.

Automated Promotion

More mature environments can automatically promote a change when all required checks pass.

Commit
  ↓
Build
  ↓
Test
  ↓
Security Check
  ↓
Approval Policy
  ↓
Production

For production ACI, I recommend beginning with human approval and gradually introducing controlled automation.


Stage 5: Deploy to Cisco ACI

The pipeline can communicate with APIC using appropriate automation interfaces.

Possible approaches include:

  • APIC REST API
  • Python-based automation
  • ACI SDK/tooling
  • Ansible
  • Terraform where appropriate
  • Custom automation scripts

A simplified workflow could look like:

Git Repository
      ↓
CI/CD Server
      ↓
Validation
      ↓
Automation Engine
      ↓
Cisco APIC
      ↓
ACI Leaf/Spine Fabric

The key advantage is that the engineer does not need to manually repeat the same configuration process for every deployment.


Stage 6: Post-Deployment Verification

Deployment should not be considered the end of the pipeline.

A good network CI/CD pipeline should verify that the intended state actually exists after deployment.

For example:

Deploy
  ↓
Check APIC Response
  ↓
Check Object State
  ↓
Check ACI Faults
  ↓
Check EPG/Contract State
  ↓
Check Connectivity
  ↓
Success / Rollback

This is especially important in ACI because a configuration can be accepted by the controller while the resulting operational state still requires validation.


A Practical Cisco ACI CI/CD Example

Imagine an application team requests a new application environment.

The requirement is:

Application: Customer-App

Tenant: PROD
VRF: PROD-VRF
BD: CUSTOMER-BD
EPG: CUSTOMER-APP
Contract: APP-TO-DB

Instead of manually creating every object through APIC, the engineer creates the desired configuration in the repository.

The pipeline then performs the following:

Step 1 — Commit

The engineer commits the configuration.

Step 2 — Build

The pipeline checks the configuration structure.

Step 3 — Validate

It checks naming conventions, required fields, and dependencies.

Step 4 — Test

The configuration is tested against an ACI test environment or appropriate validation framework.

Step 5 — Review

A network engineer reviews the proposed change.

Step 6 — Deploy

The approved configuration is pushed through the automation layer to APIC.

Step 7 — Verify

The pipeline checks:

  • Tenant
  • VRF
  • BD
  • EPG
  • Contract
  • Faults
  • Connectivity

Step 8 — Record

The pipeline records the deployment result.

This creates a repeatable workflow instead of a one-time manual change.


Tools Commonly Used in Network CI/CD

For Cisco ACI environments, these tools can be mapped into a broader workflow.

FunctionExample Tools
Source ControlGit, GitLab, GitHub
PipelineGitLab CI/CD, Jenkins, GitHub Actions
AutomationAnsible, Python, Terraform
ACI InterfaceAPIC REST API, ACI SDK/tooling
TestingpyATS, custom API tests
Lab/SimulationCisco Modeling Labs
MonitoringExisting enterprise monitoring platforms
Configuration FormatYAML, JSON
ReviewGit Pull/Merge Requests

The exact combination depends on the organization's architecture and automation standards.


Git and Cisco ACI: Why Version Control Matters

One of the biggest changes when moving from traditional networking to NetDevOps is treating configuration as a managed artifact.

Consider a manual change:

Engineer → APIC → Configuration Change

Later someone asks:

"What exactly changed last Tuesday?"

The answer may require searching audit logs and controller history.

With Git:

Engineer
   ↓
Git Commit
   ↓
Review
   ↓
Pipeline
   ↓
APIC

The configuration change becomes part of a structured history.

This makes troubleshooting and rollback easier.


CI/CD Does Not Mean "Push Everything Automatically"

This is an important point for network engineers.

CI/CD does not mean that every configuration change should automatically reach production.

A mature network pipeline should include appropriate controls.

For example:

Developer
   ↓
Git Commit
   ↓
Automated Validation
   ↓
Automated Testing
   ↓
Security / Compliance Check
   ↓
Peer Review
   ↓
Human Approval
   ↓
Production
   ↓
Verification

The amount of automation can increase as confidence in the pipeline increases.


What Happens When a Test Fails?

A good pipeline should stop.

For example:

Git Commit
    ↓
Build
    ↓
Validation
    ↓
Test
    ↓
❌ FAILED
    ↓
Stop Pipeline
    ↓
Notify Engineer

The engineer can correct the configuration and submit another change.

This is much safer than discovering the problem after deployment to the production fabric.


Rollback Strategy for Cisco ACI

Rollback should be considered before automation is introduced.

A version-controlled workflow makes it easier to identify the previous known-good configuration.

A simplified process is:

Current Version
      ↓
New Configuration
      ↓
Deployment
      ↓
Verification
      ↓
Failure?
   ↙       ↘
 Yes        No
 ↓           ↓
Rollback    Continue

The exact rollback mechanism should be designed carefully according to the ACI objects involved and the organization's change-management procedures.


Benefits of CI/CD for Cisco ACI Engineers

Faster Changes

Repeated configuration tasks can be automated.

Fewer Manual Errors

Automated validation reduces common configuration mistakes.

Consistency

The same process can be applied repeatedly.

Better Collaboration

Network and application teams can work with a common version-control workflow.

Easier Auditing

Configuration changes are associated with commits, reviews, pipeline results, and deployment records.

Safer Production Changes

Changes can be validated before reaching the production fabric.

Repeatability

The same desired configuration can be deployed consistently across environments where appropriate.


Challenges You Should Consider

CI/CD is powerful, but it is not a magic solution.

1. Poorly Designed Automation

Automating a bad process simply makes the bad process faster.

2. Insufficient Testing

If tests do not represent real network behavior, a successful pipeline does not guarantee a successful production deployment.

3. Secrets Management

API credentials, tokens, and other sensitive information must be handled securely.

4. Pipeline Permissions

The automation account should have only the permissions required for its task.

5. Production Safety

High-impact changes should have appropriate approvals and safeguards.

6. Lack of Rollback Planning

Every production deployment should have a defined recovery strategy.


ACI CI/CD Maturity Model

A network team does not have to automate everything on day one.

A practical progression is:

Level 1 — Version Control

Store ACI configurations in Git.

Level 2 — Automated Validation

Validate every configuration change.

Level 3 — Automated Testing

Test changes against a non-production environment.

Level 4 — Controlled Deployment

Deploy approved changes automatically.

Level 5 — Continuous Verification

Automatically verify the resulting network state.

Level 6 — Advanced Network Automation

Introduce more sophisticated orchestration, compliance, and intent-based workflows.

This gradual approach allows network engineers to build confidence without immediately handing complete production control to an automation pipeline.


NetDevOps Changes the Role of the Network Engineer

CI/CD does not eliminate the need for network engineers.

Instead, it changes where their time is spent.

Traditional model:

Configure
Troubleshoot
Repeat

Modern model:

Design
    ↓
Define Desired State
    ↓
Automate
    ↓
Test
    ↓
Deploy
    ↓
Observe
    ↓
Improve

Network engineers therefore benefit from learning skills beyond traditional CLI configuration.

Some particularly valuable skills include:

  • Git
  • Python
  • REST APIs
  • YAML/JSON
  • Ansible
  • Terraform
  • CI/CD concepts
  • Automated testing
  • Infrastructure as Code
  • Network programmability

For Cisco ACI engineers, this combination can be especially powerful because ACI already provides a centralized controller and programmable interfaces.

Summary





Final Thoughts

Cisco ACI provides a strong foundation for policy-driven and automated data center networking. CI/CD and NetDevOps can extend that foundation by introducing version control, automated validation, testing, controlled deployment, and continuous verification.

The biggest mindset change is to stop thinking of a network change as simply:

"A command I need to execute."

Instead, think of it as:

"A configuration change that should pass through a controlled lifecycle."

A mature Cisco ACI CI/CD workflow can therefore look like:

Design → Git → Validate → Test → Review → Deploy → Verify → Monitor

The goal is not to automate every possible task.

The goal is to make network changes repeatable, testable, auditable, and safer.

For network engineers who already work with Cisco ACI, learning CI/CD and NetDevOps is a natural next step toward modern network automation.



Related Articles from Netterrene

Cisco ACI Explained: Concepts, Learning Prerequisites, Benefits, and Limitations
Read the Cisco ACI fundamentals guide

AI Planning Strategies for Cisco ACI Engineers
Read the ACI AI planning guide

How AI Agents Actually "Touch" Your Cisco ACI Fabric
Read the ACI automation and API guide

How AI Memory Can Revolutionize Cisco ACI Operations
Read the ACI AI memory guide

Multi-Agent AI Systems Explained for Cisco ACI Engineers
Read the ACI multi-agent guide

Networklearner – Cisco ACI, Network Automation and AI Articles
Visit Netterrene


Need Help With Cisco ACI or Network Automation?

Need help with Cisco ACI, Nexus, data center networking, or network automation?

I am a CCIE Data Center engineer with 18+ years of enterprise networking experience.

Contact me for consulting, troubleshooting, design reviews, and project support free of cost.


Sunday, 8 March 2026

A Beginner’s Guide to Ansible Roles for Network Automation

 Understanding Ansible Roles: The Smart Way to Organize Your Automation

When your automation projects start growing, keeping playbooks clean and reusable becomes essential. That’s where Ansible roles step in—providing a structured, scalable way to organize your automation logic.

An Ansible role bundles together everything your playbook needs, such as:

  • Variables
  • Tasks
  • Templates
  • Files
  • Handlers
  • Custom modules

This modular approach not only keeps your work tidy but also makes it effortless to reuse and maintain automation across multiple projects.

Creating an Ansible Role

Ansible offers a built‑in utility called ansible-galaxy to generate a ready‑to-use role structure. This creates a fully structured directory containing all folders required for your role.

Key Directories You’ll Use Most in Network Automation

While a role contains multiple folders, a few are especially important for network engineers:

1. defaults/

This folder holds baseline default values for your variables. If your playbook does not pass a variable, Ansible uses the value defined here.

2. tasks/

The heart of any role.
All reusable task logic lives here—allowing you to write shorter playbooks and maintain your automation in one central place.

3. templates/

Used to store Jinja2 templates that your tasks render dynamically during execution.

4. vars/

This is where you define variables used within tasks or templates.
Defaults can be kept in the defaults/ directory, but if a variable has no fallback value, it must be defined here for the role to work properly.

Why Use Roles?

Ansible roles bring clarity, modularity, and reusability to your automation workflows. Whether you're building network configs or managing large infrastructure deployments, roles ensure consistency while drastically reducing repetitive work.

Saturday, 9 August 2025

Ansible vs Terraform

 

🔧 Ansible vs Terraform

Feature

Ansible

Terraform

Primary Purpose

Configuration management & automation

Infrastructure provisioning (IaC)

Language Used

YAML (Playbooks)

HCL (HashiCorp Configuration Language)

Execution Model

Agentless (uses SSH)

Declarative, state-based

State Management

No persistent state

Maintains state files to track infrastructure

Use Case

Installing software, configuring systems

Creating cloud resources (VMs, networks, etc.)

Cloud Support

Supports cloud tasks but not cloud-native

Designed for multi-cloud provisioning

Learning Curve

Easier for beginners

Requires understanding of state and dependencies

Idempotency

Yes

Yes

Community & Ecosystem

Large, with many modules

Large, with many providers and modules


🧠 Summary

  • Use Ansible when you want to configure servers, install packages, manage users, or automate operational tasks.
  • Use Terraform when you want to provision infrastructure like virtual machines, networks, databases, and cloud services.