A Network Engineer's Approach to Automation

Post on 05-Dec-2014

2.498 views 4 download

description

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

Transcript of A Network Engineer's Approach to Automation

A NETWORK ENGINEER'S APPROACH TO AUTOMATION

#NoCLI(not-only CLI)

Jeremy Schulman@nwkautomaniac2013 December

Why?

OFFICE OF THE CIOIT Automation is Top of Mind

BusinessVelocity

BusinessAgility

BusinessContinuity

Business Value

Lower CostReduce Risk

Improve Service

SweetSpot

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!

COMMUNITY "TRIBES"

IT Automation Engineers"DevOps"Quasi-Programmers

IT Framework CompaniesSoftware Engineers Hardcore-Programmers

Admins UsersNon-Programmers

When?

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

Visualize & Monitor

3

Plan & Model

1

Configure & Deploy

2

Troubleshoot

4

Report 5

NETWORK AUTOMATIONNot Only Configuration

✔ ✔

✔✔

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

What?

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

RIPPED FROM A NET.ENG BLOG

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

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"

How?

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

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

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

Where?

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

Follow on Twitter:@nwkautomaniac

moving soon to github.com/Juniper in Jan 2014