continuous integration and continuous delivery for networks(pdf)

78
v Continuous Integration and Continuous Delivery for Networks Pete Lumbis - @PeteCCDE Cumulus Networks Systems Engineer CCIE #28677, CCDE 2012::3

Upload: ngoxuyen

Post on 14-Feb-2017

234 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Continuous Integration and Continuous Delivery for Networks(PDF)

v

Continuous Integration and Continuous Delivery for Networks

Pete Lumbis - @PeteCCDE

Cumulus Networks Systems Engineer CCIE #28677, CCDE 2012::3

Page 2: Continuous Integration and Continuous Delivery for Networks(PDF)

WTF is CI/CD?

§ Continuous Integration (CI): A system where all changes are automatically tested before pushed to production or seen by others.

Page 3: Continuous Integration and Continuous Delivery for Networks(PDF)

WTF is CI/CD?

§ Continuous Integration (CI): A system where all changes are automatically tested before pushed to production or seen by others.

§ Continuous Delivery (CD): Built on a CI system where changes are made multiple times a day.

Page 4: Continuous Integration and Continuous Delivery for Networks(PDF)

WTF is CI/CD?

§ Continuous Integration (CI): A system where all changes are automatically tested before pushed to production or seen by others.

§ Continuous Delivery (CD): Built on a CI system where changes are made multiple times a day.

Not for everyone

Page 5: Continuous Integration and Continuous Delivery for Networks(PDF)

WTF is CI/CD?

§ Continuous Integration (CI): A system where all changes are automatically tested before pushed to production or seen by others.

§ Continuous Delivery (CD): Built on a CI system where changes are made multiple times a day.

Why aren’t

you doing this?

Page 6: Continuous Integration and Continuous Delivery for Networks(PDF)

• Change Management Today

• The Problems Today

• NetDevOps Toolkit

Agenda

Page 7: Continuous Integration and Continuous Delivery for Networks(PDF)

Pete Who?

§ CCIE R&S, CCDE

§ Former Cisco TAC Routing Escalation

§ Current Cumulus Networks SE

§ Network Engineer, Not a Programmer

Page 8: Continuous Integration and Continuous Delivery for Networks(PDF)

Leading Questions

§ Who thinks their change system works well?

Page 9: Continuous Integration and Continuous Delivery for Networks(PDF)

Leading Questions

§ Who thinks their change system works well? §  I assume your manager is here

Page 10: Continuous Integration and Continuous Delivery for Networks(PDF)

Leading Questions

§ Who thinks their change system works well? §  I assume your manager is here

§ Who lab tests 100% of changes?

Page 11: Continuous Integration and Continuous Delivery for Networks(PDF)

Leading Questions

§ Who thinks their change system works well? §  I assume your manager is here

§ Who lab tests 100% of changes?

§ Who checks servers + apps on changes?

Page 12: Continuous Integration and Continuous Delivery for Networks(PDF)

Leading Questions

§ Who thinks their change system works well? §  I assume your manager is here

§ Who lab tests 100% of changes?

§ Who checks servers + apps on changes? §  Why is it your users?

Page 13: Continuous Integration and Continuous Delivery for Networks(PDF)

Change Management Today

Page 14: Continuous Integration and Continuous Delivery for Networks(PDF)

Change Management Today Monday, 9:30am: Write Change, Email Team

Page 15: Continuous Integration and Continuous Delivery for Networks(PDF)

Change Management Today Monday, 9:30am: Write Change, Email Team Thursday, 9:00am: Ask team if they read email

Page 16: Continuous Integration and Continuous Delivery for Networks(PDF)

Change Management Today Monday, 9:30am: Write Change, Email Team Thursday, 9:00am: Ask team if they read email Friday, 11:00am: Receive “looks good” from lead

Page 17: Continuous Integration and Continuous Delivery for Networks(PDF)

Change Management Today Monday, 9:30am: Write Change, Email Team Thursday, 9:00am: Ask team if they read email Friday, 11:00am: Receive “looks good” from lead Saturday, 10:00pm: Implement Change in 2hr window

Page 18: Continuous Integration and Continuous Delivery for Networks(PDF)

Change Management Today Monday, 9:30am: Write Change, Email Team Thursday, 9:00am: Ask team if they read email Friday, 11:00am: Receive “looks good” from lead Saturday, 10:00pm: Implement Change in 2hr window Sunday, 8:30am: Notice Typo, Fix. Go home.

Page 19: Continuous Integration and Continuous Delivery for Networks(PDF)

Change Validation

Page 20: Continuous Integration and Continuous Delivery for Networks(PDF)

Change Validation

Page 21: Continuous Integration and Continuous Delivery for Networks(PDF)

Validation? What Validation?

Page 22: Continuous Integration and Continuous Delivery for Networks(PDF)

Validation? What Validation? § Best Case

§  30 person bridge §  Every department signs off

Page 23: Continuous Integration and Continuous Delivery for Networks(PDF)

Validation? What Validation? § Best Case

§  30 person bridge §  Every department signs off

§ Worst Case §  Ping some things §  Watch for tickets

Page 24: Continuous Integration and Continuous Delivery for Networks(PDF)

Validation? What Validation?

Page 25: Continuous Integration and Continuous Delivery for Networks(PDF)

Validation? What Validation?

Is ping your business application?

Page 26: Continuous Integration and Continuous Delivery for Networks(PDF)

Recap: What’s Broken?

Page 27: Continuous Integration and Continuous Delivery for Networks(PDF)

Recap: What’s Broken? § Poor change communication

§ 

§ 

§ 

§ 

Page 28: Continuous Integration and Continuous Delivery for Networks(PDF)

Recap: What’s Broken? § Poor change communication

§ Difficult to test outside of production

§ 

§ 

§ 

Page 29: Continuous Integration and Continuous Delivery for Networks(PDF)

Recap: What’s Broken? § Poor change communication

§ Difficult to test outside of production

§ Little change validation

§ 

§ 

Page 30: Continuous Integration and Continuous Delivery for Networks(PDF)

Recap: What’s Broken? § Poor change communication

§ Difficult to test outside of production

§ Little change validation

§ Manual validation doesn’t scale

§ 

Page 31: Continuous Integration and Continuous Delivery for Networks(PDF)

Recap: What’s Broken? § Poor change communication

§ Difficult to test outside of production

§ Little change validation

§ Manual validation doesn’t scale

§ Silos of Excellence

Page 32: Continuous Integration and Continuous Delivery for Networks(PDF)

Imagine a World…

Page 33: Continuous Integration and Continuous Delivery for Networks(PDF)

Imagine a World… § Configs are easily shared

§ 

§ 

§ 

§ 

Page 34: Continuous Integration and Continuous Delivery for Networks(PDF)

Imagine a World… § Configs are easily shared

§ All changes are automatically tested

§ 

§ 

§ 

Page 35: Continuous Integration and Continuous Delivery for Networks(PDF)

Imagine a World… § Configs are easily shared

§ All changes are automatically tested

§ Tests include servers and apps

§ 

§ 

Page 36: Continuous Integration and Continuous Delivery for Networks(PDF)

Imagine a World… § Configs are easily shared

§ All changes are automatically tested

§ Tests include servers and apps

§ Tests must pass to reach approvers

§ 

Page 37: Continuous Integration and Continuous Delivery for Networks(PDF)

Imagine a World… § Configs are easily shared

§ All changes are automatically tested

§ Tests include servers and apps

§ Tests must pass to reach approvers

§ More drinks with umbrellas

Page 38: Continuous Integration and Continuous Delivery for Networks(PDF)

NetDevOps Toolbox

Page 39: Continuous Integration and Continuous Delivery for Networks(PDF)

NetDevOps Toolbox

Git

Git – Provides config management and collaboration

Page 40: Continuous Integration and Continuous Delivery for Networks(PDF)

Automation Tools - Git § Source Code text file repository

§ Automatic file revision/change management

§ Built for teams to work on the same files

§ Easy to get started, lots of knobs for advanced users

Page 41: Continuous Integration and Continuous Delivery for Networks(PDF)

Automation Tools - Git Cont’d

Remote Repository – Central Server hosting files

Local Repository – Your local copy of the remote. Where you change things

Merge – Apply branch changes to master repository copy (see also: “Pull Request”)

Branch – Isolated copy for new features, risky changes

Page 42: Continuous Integration and Continuous Delivery for Networks(PDF)

Automation Tools - Git Cont’d

master

Use merge/pull request as an opportunity to review impact of changes

IPv6

master

IPv6

Create Changes in Branches

Merge and Review Changes

Page 43: Continuous Integration and Continuous Delivery for Networks(PDF)

master IPv6

east-dc

west-dc

Automation Tools – Git Cont’d

Fork for new project/datacenter/office

Rollback failures after merge

Page 44: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab

NetDevOps Toolbox Alternatives

Git

Page 45: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab

NetDevOps Toolbox

Git

GitLab – Change management and automated testing

Page 46: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab Ticketing

Page 47: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab Ticketing

Page 48: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab Ticketing

Page 49: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab Ticketing

Page 50: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab Changes

Page 51: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab Changes

Page 52: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab Changes

Page 53: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab

NetDevOps Toolbox

Git Virtual Box

Virtual Box – Hypervisor for lab network + server VMs Vagrant – Simplifies large Virtual Box environments

Page 54: Continuous Integration and Continuous Delivery for Networks(PDF)

NetDevOps Toolbox Alternatives

Virtual Box

Page 55: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab

NetDevOps Toolbox

Git Virtual Box

Ansible – Applies configuration and manages automation

Page 56: Continuous Integration and Continuous Delivery for Networks(PDF)

Automation Tools - Ansible

§ Configuration Management Software

§ Manages SSH connections

§ Large collection of libraries for common tasks

§ Human Readable

Page 57: Continuous Integration and Continuous Delivery for Networks(PDF)

NetDevOps Toolbox Alternatives

Page 58: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab

NetDevOps Toolbox

Git Virtual Box

Behave – English based testing language

Page 59: Continuous Integration and Continuous Delivery for Networks(PDF)

Behave Overview

Page 60: Continuous Integration and Continuous Delivery for Networks(PDF)

Behave Overview

Page 61: Continuous Integration and Continuous Delivery for Networks(PDF)

Behave Overview

§ Human readable policy checking

§ Calls python code under the covers

§ Network engineers are policy experts

§ Treat it as a back office application

§ Works on network and systems

Page 62: Continuous Integration and Continuous Delivery for Networks(PDF)

NetDevOps Toolbox Alternatives

Beaker

Matt Oswalt’s ToDD

Page 63: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab

NetDevOps Toolbox – How It Happens

Git Virtual Box

Page 64: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab

NetDevOps Toolbox – How It Happens

Git Virtual Box

Configuration Saved to GitLab (git  push)

Page 65: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab

NetDevOps Toolbox – How It Happens

Git Virtual Box

GitLab Launches Lab with new configs

Page 66: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab

NetDevOps Toolbox – How It Happens

Git Virtual Box

Vagrant configures lab with Ansible

Page 67: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab

NetDevOps Toolbox – How It Happens

Git Virtual Box

GitLab runs Behave tests against infrastructure

Page 68: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab

NetDevOps Toolbox – Automated Validation

GitLab executes behave checks automatically Only checks that pass are merged in for others to see

Page 69: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab

NetDevOps Toolbox – Automated Validation

Page 70: Continuous Integration and Continuous Delivery for Networks(PDF)

GitLab

NetDevOps Toolbox – Automated Validation

Page 71: Continuous Integration and Continuous Delivery for Networks(PDF)

Wrap Up

Page 72: Continuous Integration and Continuous Delivery for Networks(PDF)

Wrap Up

§ There’s a better way!

§ 

§ 

§ 

§ 

Page 73: Continuous Integration and Continuous Delivery for Networks(PDF)

Wrap Up

§ There’s a better way!

§ Infrastructure as code

§ 

§ 

§ 

Page 74: Continuous Integration and Continuous Delivery for Networks(PDF)

Wrap Up

§ There’s a better way!

§ Infrastructure as code

§ Automate all the things

§ 

§ 

Page 75: Continuous Integration and Continuous Delivery for Networks(PDF)

Wrap Up

§ There’s a better way!

§ Infrastructure as code

§ Automate all the things

§ Testing must include applications

§ 

Page 76: Continuous Integration and Continuous Delivery for Networks(PDF)

Wrap Up

§ There’s a better way!

§ Infrastructure as code

§ Automate all the things

§ Testing must include applications

§ Push your vendor. Vote with $$

Page 77: Continuous Integration and Continuous Delivery for Networks(PDF)

Questions?

Page 78: Continuous Integration and Continuous Delivery for Networks(PDF)

Thank You! @PeteCCDE

http://gitlab.com/plumbis/interop-2016