29
N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support [email protected] [email protected]

N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support [email protected] [email protected]

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

N.A.P.A.L.M.Network Automation and Programmability Abstraction Layer with Multivendor support

[email protected]

[email protected]

Page 2: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

N.A.P.A.L.M.

● Python library● Open source● Unified API for multiple vendors● Methods to manipulate configs● Methods to retrieve data

Page 3: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Supported Vendors

● Arista EOSUsing pyEOS (you will need EOS version 4.14.6M or superior)

● Juniper JunOSUsing junos-eznc

● Cisco IOS-XRUsing pyIOSXR

● Fortigate FortiOSUsing pyFG

Page 4: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Supported Methods v0.1● load_replace_config

full configuration “override” (load override in junos terms)

● load_merge_configpartial configuration merge

● diff_configreturn a diff of the “candidate” and the “running” config

● discarddiscard candidate

● commitcommit changes

● rollbackrollback last commit

Page 5: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Supported Methods v0.2 (beta)

● get_factsretrieve basic facts from the device

● get_interfacesget info per interface

● get_bgp_neighborsBGP session information

● get_lldp_neighborsdetails about LLDP neighbors

Page 6: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Ansible Module

● Module to push configurations napalm_install_config

● More modules to come retrieve data

Page 7: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

N.A.P.A.L.M. + ANSIBLE{{ DEMO }}

Page 8: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Network Diagram

Page 9: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Inventory File - We can group devices per type and/or location

Page 10: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Roles are “Services”

Page 11: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Roles are “Services” (cont’d)

Page 12: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Services are templated for every vendor (EOS example for ipfabric service)

Page 13: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Services are templated for every vendor (JunOS example for ipfabric service)

Page 14: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

The combination of all the services is the complete “running” configuration

Page 15: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Some variables are defined at the DC1 level

Page 16: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Some variables are defined per type of devices/location (i.e. net_services @DC1)

Page 17: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Per host variables are define according to their services (vendor agnostic)

Page 18: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Per host variables are define according to their services (vendor agnostic)

Page 19: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Per host variables are define according to their services (vendor agnostic)

Page 20: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Per host variables are define according to their services (vendor agnostic)

Page 21: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

NAPALM plugins are vendor agnostic (get_facts)

Page 22: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

NAPALM plugins are vendor agnostic (napalm_install_config)

Page 23: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Plays are also vendor agnostic

Page 24: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Building the IP Fabric and the Access layeransible-playbook -i network.hosts configure_network.yml \

--tags base,fabric,access,deploy --limit "dc1.spines,dc1.leaves" -e "commit_changes=0"

Page 25: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Connecting the network servicesansible-playbook -i network.hosts configure_network.yml \

--tags base,fabric,access,netserv,deploy --limit "dc1.net_services,leaf01*" -e "commit_changes=0"

Page 26: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Deploying Network servicesansible-playbook -i network.hosts configure_network.yml \

--limit dc1.net_services -e "commit_changes=0"

Page 27: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

Unified deploymentansible-playbook -i network.hosts configure_network.yml \

-e "commit_changes=0"

Page 28: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

● Devices are broken down into different services● Services are templated per vendor● Plays, playbooks and data is vendor agnostic● N.A.P.A.L.M. allows you to have vendor agnostic workflows

Summary

Page 29: N.A.P.A.L.M. - NANOG Archive · 6/1/2015  · N.A.P.A.L.M. Network Automation and Programmability Abstraction Layer with Multivendor support dbarroso@spotify.com elisa@bigwaveit.org

● N.A.P.A.L.M. - https://github.com/spotify/napalm ● Mailing List - [email protected] ● Ansible Demo - https://github.com/dbarrosop/ansible_demo

Questions?

Resources

● David Barroso - [email protected]● Elisa Jasinska - [email protected]