A Network Engineer's Approach to Automation

20
A NETWORK ENGINEER'S APPROACH TO AUTOMATION #NoCLI (not-only CLI) Jeremy Schulman @nwkautomaniac 2013 December

description

Exploring a novel approach to bridging the gap between Network Engineers and automating networks

Transcript of A Network Engineer's Approach to Automation

Page 1: A Network Engineer's Approach to Automation

A NETWORK ENGINEER'S APPROACH TO AUTOMATION

#NoCLI(not-only CLI)

Jeremy Schulman@nwkautomaniac2013 December

Page 2: A Network Engineer's Approach to Automation

Why?

Page 3: A Network Engineer's Approach to Automation

OFFICE OF THE CIOIT Automation is Top of Mind

BusinessVelocity

BusinessAgility

BusinessContinuity

Business Value

Lower CostReduce Risk

Improve Service

SweetSpot

Page 4: A Network Engineer's Approach to Automation

APPLICATIONS DRIVE BUSINESSServer Automation Hit the "Sweet Spot"

Evolution / Revolution • Server Virtualization and Cloud

• History over +7 years

• Open-Source Community

manuallyconfigured

ad-hoc bashperl scripting

puppet, chefsalt, ansible,other IT frameworks

infra.appsbuilt on ITframeworks(Hubot, Boxen)

physical,virtual, cloudorchestration

paradigm pivot-point!

Page 5: A Network Engineer's Approach to Automation

COMMUNITY "TRIBES"

IT Automation Engineers"DevOps"Quasi-Programmers

IT Framework CompaniesSoftware Engineers Hardcore-Programmers

Admins UsersNon-Programmers

Page 6: A Network Engineer's Approach to Automation

When?

Page 7: A Network Engineer's Approach to Automation

TIME TO "LEVEL-UP"Networking must now find a way to the "Sweet Spot"

Service VelocityComplexity of IT

Up Time

$

Tolerance for Human ErrorResource Pools

Budgets

Page 8: A Network Engineer's Approach to Automation

Visualize & Monitor

3

Plan & Model

1

Configure & Deploy

2

Troubleshoot

4

Report 5

NETWORK AUTOMATIONNot Only Configuration

✔ ✔

✔✔

Page 9: A Network Engineer's Approach to Automation

OFFICE OF THENETWORK ENGINEER

I am not a "Programmer"

I think about the network &complex networking planning

I spend a lot of my time fire-fighting the network

I need automation tools to help me do my job

I know I need to "level-up" with automation but I need something that helps me get started

I'd like to use Python since itis shaping up as the standard

Page 10: A Network Engineer's Approach to Automation

What?

Page 11: A Network Engineer's Approach to Automation

NETWORK ENGINEER'SPUNCH LIST

• Get started "day one" using Python interactive shell

• Do it the way a network engineer thinks and interacts with the network, not like a Programmer/API

• Do not require "programmy" knowledge of XML, Junos, NETCONF

• Give me "CLI access" if I get stuck, but don't make me use CLI screen-scraping

• Give me access to both config and operational data in standard Python types like dictionary (hash) and list

• Make it Open-Source so I don't have to wait for "The Vendor" to add/fix things, enable Community

Page 12: A Network Engineer's Approach to Automation

RIPPED FROM A NET.ENG BLOG

Kurt Bales, Senior Network Engineerwww.network-janitor.net

Page 13: A Network Engineer's Approach to Automation

INTRODUCING "JUNOS PyEZ"Open and Extensible "micro-framework"

• Remote device management and "fact" gathering

• Troubleshooting, Audit and Reporting• Operational data

• Configuration data

• Configuration Management• Unstructured config snippets and templates

• Structured abstractions

• Generalized utilities for file-system, software-upgrade, secure file copy (scp), etc.

Check out the blog series "Python for Non-Programmers": "J-Net Forum"

Page 14: A Network Engineer's Approach to Automation

How?

Page 15: A Network Engineer's Approach to Automation

LAYERED APPROACHCharting a Path to the "Sweet Spot"

Python Shell Python scriptIT

FrameworksCustom

Applications

ncclient

junos-pyez• Junos specific • Abstraction Layer• micro-framework

• NETCONF transport only• Vendor Agnostic• No abstractions

• Native Python data types (hash/list)• Junos specific not required• XML not required

open-source, Juniper

open-source, Community

interactive simple → complex

Page 16: A Network Engineer's Approach to Automation

CONFIGURATION CHANGES

"snippets"(no variables)

"templates"(merge variables)

Resources

Structured abstractions defined by the junos-ez micro-framework

Juniper + Community

Junos config in text, set, or XML format

"snippets" that contain variables

Jinja2 is template engine

JunosConfiguration

Unstructured Structured

write-only read-write

Page 17: A Network Engineer's Approach to Automation

TROUBLESHOOTING, AUDIT,REPORTING

JunosConfiguration

OperationalData

Tables Views

read-only

Structured abstractions defined by the Junos PyEZ micro-framework

No coding required to create abstractions

Juniper + Community

Easily retrieve data and extract as native Python

Conceptually like database tables and views that define the fields of data you want

Page 18: A Network Engineer's Approach to Automation

Where?

Page 19: A Network Engineer's Approach to Automation

PROJECT DOCUMENTATIONJuniper "TechWiki" https://techwiki.juniper.net/Projects/Junos_PyEZ

Page 20: A Network Engineer's Approach to Automation

Follow on Twitter:@nwkautomaniac

moving soon to github.com/Juniper in Jan 2014