N.A.P.A.L.M. - NANOG Archive · 6/1/2015 · N.A.P.A.L.M. Network Automation and Programmability...
Transcript of N.A.P.A.L.M. - NANOG Archive · 6/1/2015 · N.A.P.A.L.M. Network Automation and Programmability...
![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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/1.jpg)
N.A.P.A.L.M.Network Automation and Programmability Abstraction Layer with Multivendor support
![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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/2.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/3.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/4.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/5.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/6.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/7.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/8.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/9.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/10.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/11.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/12.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/13.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/14.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/15.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/16.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/17.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/18.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/19.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/20.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/21.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/22.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/23.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/24.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/25.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/26.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/27.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/28.jpg)
● 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](https://reader034.fdocuments.net/reader034/viewer/2022052103/603dc7cc6849ee1e2f0689a3/html5/thumbnails/29.jpg)
● 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]