Skip to content

ci-cd pipeline using Nornir-Napalm for configuration, and Pytest for pre/post validation checks.

License

Notifications You must be signed in to change notification settings

gt732/netdevops-cicd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netdevops-cicd

My first netdevops ci-cd pipeline using the following tools, shoutout to @JulioPDX for putting together his guide here https://juliopdx.com/2021/10/20/building-a-network-ci/cd-pipeline-part-1/

  • Nornir-Napalm for device configuration
  • Drone CI/CD
  • Pytest for pre/post validation checks
  • Custom Docker container

Topology

alt text

Steps

  • Clone the main repo
  • Create a new branch
  • Update the global variable YAML file updating the DMVPN Tunnel Secret
  • Push changes and publish new branch, create PR
  • New branch triggers CI/CD pipeline for pre validation checks to TEST devices
  • Pre check consist of running NAPALM in dry run mode first , then pushing the changes, then pytest for testing DMVPN Tunnel State
  • If checks pass and PR is merged, it triggers the last CI/CD pipeline
  • Napalm dry run, push changes, and post validation check with pytest to PROD devices.

Starting the CI/CD pipeline by creating a new PR

alt text

Pre-Check Napalm Dry-Run Validation to TEST Devices

alt text

Pre-Check Napalm Push Config to TEST Devices

alt text

Pre-Check Pytest script to check if all DMVPN Tunnels are UP TEST Devices

alt text

PR request accepted and merged to master, triggers CD pipeline

alt text

Napalm Dry-Run Validation to PROD Devices

alt text

Napalm Push Config to PROD Devices

alt text

Finally, Pytest to check DMVPN Tunnel Status on PROD Devices

alt text

About

ci-cd pipeline using Nornir-Napalm for configuration, and Pytest for pre/post validation checks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published