PIW Building A NetDevOps CI CD Pipeline Part II
PIW Building A NetDevOps CI CD Pipeline Part II
PIW Building A NetDevOps CI CD Pipeline Part II
Marcel Neidinger
Software Solutions Engineer, EMEAR Systems Engineering
7th of December, 2021
Where are we? And where are we going?
Intro to
What is NetDevOps?
NetDevOps
Model-Driven
SSH. Controler-based
Programmabilit How do we change?
automated. automation
y
Building a full
advanced pyATS NetDevOps Pipeline How do we build a pipeline?
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2
• A DevOps Recap
• From DevOps to NetDevOps
Last week • An overview of our tools
• Designing our NetDevOps pipeline
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3
• A DevOps Recap
• From DevOps to NetDevOps
Last week • An overview of our tools
• Designing our NetDevOps pipeline
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 4
Designing our NetDevOps
pipeline
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5
💻 🚧
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
🏗️ 📋 🚀 6
Implement a change to our
configuration template
• Write a change to our jinja2
template
• Test generated config locally
💻 🚧
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
🏗️ 📋 🚀 7
Implement a change to our
configuration template
• Push our changed config template
Push this change to our to git
VCS and trigger build • Use gitlab CI/CD runner to trigger
build after commit
• Pipeline is specified in
.gitlab-ci.yml
💻 🚧
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
🏗️ 📋 🚀 8
Implement a change to our
configuration template
• Pipeline compiles templates
Push this change to our • Device-specifc context is retrieved
VCS from NetBox
• Config is rendered using context
Pull information from from NetBox
NetBox and build config
💻 🚧
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
🏗️ 📋 🚀 9
Implement a change to our
configuration template
• Configure new testing lab in CML
Push this change to our (using API)
VCS • Configuration changes are applied
to virtualized lab
Pull information from
NetBox and build config
💻 🚧
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
🏗️ 📋 🚀 10
Implement a change to our
configuration template
• Retrieve testbed from CML API
Push this change to our • pyATS tests are run against the
VCS CML-based simulated
environment using testbed
Pull information from
NetBox and build config
💻 🚧
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
🏗️ 📋 🚀 11
Implement a change to our
configuration template
• Generate production testbed from
Push this change to our NetBox
VCS • Run pyATS changes against
production testbed
Pull information from
NetBox and build config
💻 🚧
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
🏗️ 📋 🚀 12
An Overview of our
Environment
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 13
CML
GitLab Runner
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 14
Lab Guide
https://github.com/sQu4rks/netdevops-pipeline-lab/
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 15