if ( network == server ) magic happens...linux devopstools § ansible, puppet, chef, saltstack...

21
Attilla de Groot Sr. Systems Engineer, HCIE #3494 | Cumulus Networks If ( Network == Server ) { Magic happens }

Upload: others

Post on 27-Sep-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

1

Attilla de Groot

Sr. Systems Engineer, HCIE #3494 | Cumulus Networks

If ( Network == Server ) {

Magic happens}

Page 2: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

2

Cumulus Linux Architecture

CPU, RAM, Flash, etc. Switch Silicon

User

Spa

ceLi

nux

Kern

el

ASICDriverRouting

TablesARP

TableBridgeTable

Ethernet Interfaces

Automation Monitoring

Third Party/Customer Applications

Network OrchestrationRouting

SuiteBridging VXLAN

VxLAN

switchd

Switch HAL

Front Panel Ports

Page 3: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

3

Network OrchestrationSoftware defining your network

How to do Orchestration

Linux DevOPS tools§ Ansible, Puppet, Chef, Saltstack

Orchestration§ Infrastructure as code§ Telemetry data§ Continuous integration

Page 4: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

4

Whorecentlymadeanetworkchange?

Page 5: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

5

Didanyonehadachangewithoutissues?

Page 6: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

6

What is CI / CD

Continuous Integration (CI)

A system where all changes are automatically tested before being pushed to production or seen by others

Continuous Deployment (CD)

Built on a CI system where changes are automatically pushed to production after tests past, often multiple times per day

Why aren’t you doing this?

Not for everyone

Page 7: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

7

Infrastructure as CodeBuild tools

Implementing CI/CD

Build Tool?§ The digital duct tape

Common Tools§ Gitlab§ Jenkins§ Travis CI§ Atlassian Bamboo GitLab

Page 8: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

8

Infrastructure as CodePipeline

Infrastructure 1.0

Infrastructure1.1

Git change push

AutomatedTesting

Build tool pipeline

Successfulvalidation

Validationfailed

Infrastructure1.0

Page 9: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

9

Automated testingTesting infrastructure

Cumulus LinuxTraditional networking

Testing environment§ Physical lab§ Virtualization environment?

DevOPS integration?§ Proprietary modules§ Vendor tools

Testing environment§ Physical lab?§ Cumulus VX

DevOPS integration!§ Native modules§ Vagrant, Virtualbox, Libvirt

Infrastructure validation§ Home grown tools (Python?)§ Stackstorm§ Cumulus NetQ

Infrastructure validation§ Vendor APIs?

Page 10: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

10

Automated testingCumulus VX

Linux network virtualization

Cumulus VX§ Linux networking§ Familiarizing

Copying production§ Virtualbox, VMware, Libvirt§ Vagrant§ Topology Generator

Page 11: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

11

Automated testingValidation

Unit and System testsLinting tests

Code validation§ Test Yaml / Jinja§ Enfore a style§ Easy troubleshooting

Validating the infrastructure§ Unit tests are limited§ Combining Unit and System tests

Testing multiple verticals§ Does my BGP session work?§ Are routes being learned?

AND• Is my application redundant?• Does my application still work?

Page 12: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

12

Automated testingCumulus NetQ

Day 2 and on

Validate Troubleshoot Analyze

Day 0 to day 1

Design Provision Automate

Cumulus LinuxOpen Network Operating System

Open OS foundation of networkflexibility & choice of apps

Disaggregation of SW & HWsupply chain freedom

Speed of provisioning workloadswith automation at scale

Cumulus NetQTelemetry-Based Fabric validation application

Validate changesbefore & during production rollout

Precise fault location alertsfor rapid problem resolution

Time-machine diagnosis & troubleshooting

Page 13: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

13

Automated testingNetQ Agent

Linux Kernel

BGP mLAG VxLAN

NetQ Agent

NetQ Agent

Subscribes to Linux Kernel Events§ Interface State§ MTU§ Routes learned§ Macs learned§ (M)LAG state

Polls routing Information§ OSPF, PIM, BGP, EVPN§ Neighbor state§ Error conditions

Page 14: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

14

Automated testingFabric state testing over time

Linux Kernel

BGP mLAG VxLAN

NetQ Agent New Route Added

OSPF Neighbor Change

MAC Address Removed

Page 15: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

15

Page 16: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

16

Automated testingGitlab testing

GitLab

Developer Build Server

Test results returned

Pulls code update and runs tests

git push

Checks for updates

Page 17: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

17

Automated testingGitlab testing

stages:- staging- production

staging:tags:- staging

before_script:- cd automation

stage: stagingscript:- 'ansible-playbook deploy.yml'- sleep 25- netq check bgp- netq check mtu- netq check vxlan

production:tags:- production

before_script:- cd automation

stage: productionwhen: manualscript:- 'ansible-playbook deploy.yml'- sleep 10- netq check bgp

Gitlab Pipeline

Stages, before_script, after_script§ Stages run in order on success§ *_script run at each stage

Script defines testing steps§ Git repository is cloned on build server§ Each script step is run in environment§ If step fails, validation fails§ Simple bash scripts can be added

Before/After stages for setup / cleanup§ vagrant up / vagrant destroy -f

Page 18: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

18

CI/CD Demo

Page 19: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

19

Join the Linux Networking Revolution

Linux 101eBook

Linux NetworkingGuides

Linux ResourceCenter

www.cumulusnetworks.com/lp/linux-networking-resources/

QUESTIONS?

Page 20: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

20

Join the Cumulus Networks Community!

Get involved in the conversation:§ Join the community & share your Cumulus Linux tips and experiences:

https://getsatisfaction.cumulusnetworks.com/cumulus§ Chat with others on our Slack channel:

https://cumulusnetworks.slack.com/§ Keep on learning:

https://community.cumulusnetworks.com

Download Cumulus VX to work on proofs of concept, test your automation and continue practicing:

§ https://cumulusnetworks.com/cumulus-vx/

Learn at your own pace with demos using our reference topology:§ https://github.com/CumulusNetworks/cldemo-vagrant§ https://cumulusnetworks.com/products/cumulus-in-the-cloud/

Page 21: If ( Network == Server ) Magic happens...Linux DevOPStools § Ansible, Puppet, Chef, Saltstack Orchestration § Infrastructure as code § Telemetry data § Continuous integration

21

Thank you!