Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara
-
Upload
devops4networks -
Category
Technology
-
view
274 -
download
0
description
Transcript of Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara
![Page 1: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/1.jpg)
www.Nexusis.com 877.286.39871
Continuous Integration and Test Driven Dev for Network Engineers
Colin McNamara CCIE #18233
@colinmcnamara
![Page 2: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/2.jpg)
www.Nexusis.com 877.286.398722
![Page 3: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/3.jpg)
www.Nexusis.com 877.286.398733
Agenda
What drives my perspective
Why TDD / CI for Network Engineers
CI / TDD overview
Network Change Management Use Case
![Page 4: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/4.jpg)
www.Nexusis.com 877.286.398744
Who am I?
Chief Cloud Architect::Nexus
OpenStack ATC/Ambassador
OpenStack Core Reviewer
Manage DevOps Team
Manage Agile BPO Team
Beard Growth Specialist
CCIE 18233, RHCE, ETC, ETC
@colinmcnamara
www.colinmcnamara.com
![Page 5: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/5.jpg)
What do
we do?
50% upstream
For Core Dev’s
Software Development, Systems Integration, Network Design
DenicaCloud
Rosetta
Aviator
More
Toolchain for Deploying CI systems and the associated tooling into and along with various cloud platforms
Project Denica
Core Contributions
and solutions in
OpenStack
OpenDaylight
Open vSwitch
Puppet
Agile / Lean Software
Development Practices
• SDN Development for Multi Vendor Integrations
• Agile Process Consulting
• Cloud Platform Development
• Systems Integration
• Upstream contributions
• DevOps Consulting
Extensive experience with the folliwng:
![Page 6: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/6.jpg)
www.Nexusis.com 877.286.398766
That all boils down to.. We make unicorn farts
![Page 7: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/7.jpg)
www.Nexusis.com 877.286.39877
Why TDD / CI for Networking?
![Page 8: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/8.jpg)
www.Nexusis.com 877.286.398788
Our industry is changing
![Page 9: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/9.jpg)
www.Nexusis.com 877.286.398799
Four closely related items
![Page 10: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/10.jpg)
www.Nexusis.com 877.286.39871010
Agile infrastructure evolution
Classic Engineering
12 + month dev times
QA pushed till last
Large amounts of bugs
Maps easily to manual silo’d process’s
ITIL Aligned
AGILE
2 Week Dev times
Integrated QA
Small bug counts
Does not map into silo’dprocess’s
Cloud Aligned
![Page 11: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/11.jpg)
www.Nexusis.com 877.286.39871111
Speed Racer (Agile Infrastructure Developer)
• Integrated tools
• Integrated test QA
• Software as a manufacturing line
• Code rolls from Step to Step
• Need infrastructure as code…
![Page 12: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/12.jpg)
www.Nexusis.com 877.286.39871212
DevOps is the “New” Network Ops
![Page 13: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/13.jpg)
www.Nexusis.com 877.286.39871313
Core SDN truth
ONE change
In one FILE
Can CREATE a system
Or DESTROY a system
![Page 14: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/14.jpg)
www.Nexusis.com 877.286.39871414
What if you could actually KNOW it would work
Test EVERY network change made
Map each application to the network component underneath
Automatically run tests with reports of results
![Page 15: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/15.jpg)
www.Nexusis.com 877.286.39871515
![Page 16: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/16.jpg)
www.Nexusis.com 877.286.398718
Agile Development Continuous Integration for Network EngineersTechnical items you need to know
![Page 17: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/17.jpg)
www.Nexusis.com 877.286.39871919
DevOps Workflows
![Page 18: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/18.jpg)
www.Nexusis.com 877.286.39872020
Complex View
![Page 19: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/19.jpg)
www.Nexusis.com 877.286.39872121
Simple CI System Walk ThroughSVC Only
SVC + Network
“Virtualized”
Production
System
![Page 20: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/20.jpg)
www.Nexusis.com 877.286.39872222
Obligatory Tools Discussion
![Page 21: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/21.jpg)
www.Nexusis.com 877.286.39872323
Git / Gerrit
![Page 22: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/22.jpg)
www.Nexusis.com 877.286.39872424
![Page 23: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/23.jpg)
www.Nexusis.com 877.286.39872525
Integration Opportunity for CI Pipelines
VIRL(CMS) / JunoSphere
Functional Test
Network OS level testing
MATE / WAE
Stubs / Modeling
Integration Test through API’s
Tail-F, Schprokits, Puppet/Chef, Ansible
Config Distribution
Unified Data Models
![Page 24: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/24.jpg)
www.Nexusis.com 877.286.398726
Use CaseChange and Release Management
![Page 25: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/25.jpg)
www.Nexusis.com 877.286.39872727
Change and Release Management
![Page 26: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/26.jpg)
www.Nexusis.com 877.286.39872828
Change and Release Management
Jenkins Test Harnesses
Templates and EPG’s
Governance Tooling
GitGerrit
GitGerrit
Gerrit
Gerrit
Jenkins Test HarnessesAntVagrant
PuppetJenkins Test Harnesses
VagrantPuppet
GitGerrit
PuppetOther
GitGerrit
Test HarnessesPuppetOther
Jenkins Test Harnesses
PuppetOtherJenkins
Test HarnessesVagrantPuppet
GerritGovernance Tooling
![Page 27: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/27.jpg)
www.Nexusis.com 877.286.39872929
Maturity Levels – how to move forward
Level0 Level1 Level2 Level3 Level4• Self Service Builds
• Nightly Builds
• Build Artifacts are stored
• Self Services deploy to test
• Auto deploy of builds to 1st env
• Mostly standard deploys
• Significant Test execution at build time
• Visibility: Team
• Latest reports always accessible
• Build on commit
• Dependency Repo
• Secured Configs
• Self-Service deploy to test and prod
• Standard Process across all environments
• Some Static analysis
• Automated Functtests run nightly
• Visibility: Cross siloe’d team (DevOps)
• Historical reports available
• Triggered Builds
• Build Cluster
• Test Gated Automated Promotions
• Database Deployments
• Multi-tier SOA
• High Code Coverage• Security Scans• Risk based manual• testing
• Report trending
• Build from Snapshots
• Gated Commit
• Continuous Deployment to production
• 100% Coverage
• Gross Silo Analysis
Develo
pm
en
tO
pe
rati
on
sQ
AM
an
ag
em
en
t
• Build Value Stream Maps
• Build Scripts• Source Control
• Deployment Scripts• Source Control
• Build Test Automation
• Source Control
• Visibility: SiloedIndividuals
• Tool Generating Reporting
![Page 28: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/28.jpg)
www.Nexusis.com 877.286.39873030
How to get there – Level 0
•Create standards for service chains (cfg,controler)
•Configuration Templates , puppet modules
•Use source control - Git
•Build VSM of specific IT process
Development
•Script Deployments – Expect, Simple Puppet
•Use source control – Git
Operations
•Build new services in lab / cloud / virt environment – VIRL / GNS3 / VMware / OpenStack
•Simple test harness built (ping)
QA
• Individual Kanban Boards / Ticket tracking
Management
• Build Value Stream Maps
• Build Scripts• Source Control
• Deployment Scripts• Source Control
• Build Test Automation
• Source Control
• Visibility: SiloedIndividuals
• Tool Generating Reporting
Level1 Level2• Self Service
Builds• Nightly Builds• Build Artifacts
are stored
• Self Services deploy to test
• Auto deploy of builds to 1st env
• Mostly standard deploys
• Significant Test execution at build time
• Visibility: Team• Latest reports
always accessible
• Build on commit• Dependency
Repo• Secured Configs
• Self-Service deploy to test and prod
• Standard Process across all environments
• Some Static analysis
• Automated Funct tests run nightly
• Visibility: Cross siloe’d team (DevOps)
• Historical reports available
Develo
pm
en
tO
pe
rati
on
sQ
AM
an
ag
em
en
t
Level0
![Page 29: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/29.jpg)
www.Nexusis.com 877.286.39873131
How to get there – Level 1
• Ci System Implemented
• Scripts build virtual env on demand
• Results from built system get stored
Development
• Deployment via Config Mgmt tooling
• Governance / CI system deployed
• Ops review of config diffs
Operations
• CI System Implemented
• Common functional tests created
• Common port / path tests created
QA
• Visualize flow – Kanban Board for team
• Initial ScrumBan Process’s Mapped
Management
• Build Value Stream Maps
• Build Scripts• Source Control
• Deployment Scripts• Source Control
• Build Test Automation
• Source Control
• Visibility: SiloedIndividuals
• Tool Generating Reporting
Level1
Level2• Self Service Builds• Nightly Builds• Build Artifacts are
stored
• Self Services deploy to test
• Auto deploy of builds to 1st env
• Mostly standard deploys
• Significant Test execution at build time
• Visibility: Team• Latest reports always
accessible
• Build on commit• Dependency
Repo• Secured Configs
• Self-Service deploy to test and prod
• Standard Process across all environments
• Some Static analysis
• Automated Funct tests run nightly
• Visibility: Cross siloe’d team (DevOps)
• Historical reports available
Develo
pm
en
tO
pe
rati
on
sQ
AM
an
ag
em
en
t
Level0
![Page 30: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/30.jpg)
www.Nexusis.com 877.286.39873232
How to get there – Level 2
• Ci Systems integrated with Governance + Src Control
• Dendancy Mapping (Mvn, Ant, EPG’s)
• Keys, Passwords as variables, stored securely
Development
• CI Chain Integrated w/ release
• Governance tool used for Change Control Board
• Puppet + Vagrant + Scripts abstracted from Dev, test prod
Operations
• CI System Implemented
• CI system running Spec tests / Flake8 etc
• System building environment and running tests emulating applications
QA
• Roll up reports of multiple team boards
• Burndown charts stored
• Card movements logged
• DevOps changes mapped to existing process’s
Management
• Build Value Stream Maps
• Build Scripts• Source Control
• Deployment Scripts• Source Control
• Build Test Automation
• Source Control
• Visibility: SiloedIndividuals
• Tool Generating Reporting
Level1 Level2
• Self Service Builds• Nightly Builds• Build Artifacts are
stored
• Self Services deploy to test
• Auto deploy of builds to 1st env
• Mostly standard deploys
• Significant Test execution at build time
• Visibility: Team• Latest reports always
accessible
• Build on commit• Dependency Repo• Secured Configs
• Self-Service deploy to test and prod
• Standard Process across all environments
• Some Static analysis• Automated Funct
tests run nightly
• Visibility: Cross siloe’d team (DevOps)
• Historical reports available
Develo
pm
en
tO
pe
rati
on
sQ
AM
an
ag
em
en
t
Level0
![Page 31: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/31.jpg)
www.Nexusis.com 877.286.398733
Take Aways
![Page 32: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/32.jpg)
www.Nexusis.com 877.286.39873434
Key Points
TDD increases quality / decreases risk / increases velocity
Network Operations and Design benefit from Agile Methodologies
Defining and executing on a maturity model necessary to succeed.
![Page 33: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/33.jpg)
www.Nexusis.com 877.286.39873535
![Page 34: Test-Driven-Development for Networking: Making CI Work for You by Colin McNamara](https://reader034.fdocuments.net/reader034/viewer/2022042715/55978efb1a28abbf368b46b8/html5/thumbnails/34.jpg)
www.Nexusis.com 877.286.398736
@colinmcnamarawww.colinmcnamara.com