Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Managing network devices like servers

Managing network devices like servers

Lightning talk, NANOG 71, San Jose, CA

Beginning with the release Nitrogen (2017.7), Salt provides support to manage network gear that allows execution of custom software. Examples of such platforms include white box devices, e.g., Arista, Cumulus, etc., or others that moved the operating system in the container, e.g., Cisco IOS-XR, Cisco NX-OS, etc. Installing the Salt Minion directly on the device comes with a series of advantages, inherited directly from the server automation - one of the most important being scalability: there are well known deployments of tens of thousands of devices managed like that. For Arista EOS, there's even a dedicated SWIX extension that provides all the necessary packages in order to install the Salt Minion on the switch: https://docs.saltstack.com/en/latest/topics/installation/eos.html

Mircea Ulinic

October 04, 2017
Tweet

More Decks by Mircea Ulinic

Other Decks in Technology

Transcript

  1. 2 Mircea Ulinic • Network engineer at Cloudflare • Member

    and maintainer at NAPALM Automation • Integrated NAPALM in Salt • OpenConfig representative • https://mirceaulinic.net/ Twitter: @mirceaulinic GitHub: mirceaulinic
  2. 3 How are servers managed? • (Typically) many more servers

    than network devices • SRE teams are generally large • Automation methodologies for many years • Variety of tools, including: ◦ Salt ◦ Ansible ◦ Chef ◦ Puppet • Many features already implemented • Plenty of success stories
  3. 4 Network platforms that can be managed like servers •

    White box devices ◦ Arista EOS ◦ Cumulus ◦ etc. • Containerised solutions ◦ Cisco IOS-XR (64 bit only) ◦ Cisco NX-OS ◦ etc.
  4. 5 Network platforms that can’t be managed like servers •

    Junos • Cisco IOS-XR, 32 bit • Cisco IOS-XE, IOS • Many many others... 5
  5. • Very scalable ◦ e.g., LinkedIn 70,000 servers • Concurrency

    • Event-driven • Easily configurable & customizable • Native caching and drivers for useful tools 6 Automation framework example: Salt
  6. 7 Salt Architectures (1): typical hub and spoke Master server

    Minion server Minion server Minion server ... https://docs.saltstack.com/en/latest/topics/topology/index.html
  7. 8 Salt Architectures (2): multi master Master server Minion server

    Minion server Minion server ... Master server Master server
  8. 10 Arista EOS Salt minion: Installation (1) edge01.bjm01#copy https://salt-eos.netops.life/salt-eos-latest.swix flash:

    edge01.bjm01#copy https://salt-eos.netops.life/startup.sh flash: Copy the SWIX extension to the flash edge01.bjm01#copy flash:salt-eos-latest.swix extension: edge01.bjm01#extension salt-eos-latest.swix force Install the SWIX extension
  9. 11 Arista EOS Salt minion: Installation (2) edge01.bjm01#show extensions |

    include salt-eos salt-eos-2017-7-1.swix 1.0.11/1.fc25 A, F 27 Verify the installation edge01.bjm01(config)#management api http-commands protocol unix-socket no shutdown Enable the local unix socket
  10. 12 Arista EOS Salt minion: Installation (3) edge01.bjm01#bash #sudo /mnt/flash/startup.sh

    Execute the Salt Minion startup script Complete installation notes at: https://docs.saltstack.com/en/latest/topics/installation/eos.html
  11. 13 Arista EOS Salt minion: Installation (3) edge01.bjm01#bash #sudo /mnt/flash/startup.sh

    Execute the Salt Minion startup script Complete installation notes at: https://docs.saltstack.com/en/latest/topics/installation/eos.html
  12. 14 Cumulus Linux Salt minion: Installation wget -O bootstrap-salt.sh https://bootstrap.saltstack.com

    1. Download the Salt bootstrap script sudo sh bootstrap-salt.sh 3. Install the Salt minion 2. Check the script!!!
  13. 15 Salt CLI execution: server $ sudo salt 'some-server' disk.usage

    some-server: ---------- /: ---------- 1K-blocks: 65869280 available: 60808360 capacity: 8% filesystem: rootfs used: 5060920 /dev: ---------- 1K-blocks: 65902000
  14. 16 Salt CLI execution: Arista EOS minion* $ sudo salt

    'edge01.bjm01' disk.usage edge01.bjm01: ---------- /: ---------- 1K-blocks: 4870812 available: 4812376 capacity: 2% filesystem: none used: 58436 /dev: ---------- 1K-blocks: 8192 * This is real output collected from a device carrying Internet traffic
  15. References Arista Software download Authentication system Beacons Engines Event System

    Grains Jinja load_template documentation Master config file, default Master config file, example Master configuration options Master systemd file Mine NAPALM NAPALM BGP execution module functions NAPALM Grains NAPALM Installation NAPALM network execution module functions NAPALM NTP execution module functions 20 NAPALM Proxy NAPALM route execution module functions NAPALM SNMP execution module functions NAPALM users execution module functions Nested outputter NETAPI Modules Netconfig state Node Groups NTP state Orchestration Output modules Pillar Pillar modules Proxy config file, default Proxy config file, example Proxy Minion Proxy systemd file Reactor REST CherryPy