O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Network Automation at Scale

Book Description

Network automation today is a continuous process of generating and deploying configuration changes, management, and operations of network devices. Whether you’re managing large or small deployments, it’s important to ensure consistency with other devices and reduce human error. With this practical ebook, network engineers will learn how easy it is to implement automation methodologies in a variety of multi-vendor networks.

Authors Mircea Ulinic and Seth House not only walk you through setup and installation, they also provide real-world usage examples—including several recipes that you can use as-is. Throughout the book, you’ll use the Salt configuration management platform, along with the NAPALM library, and the Jinja and YAML data representation languages.

No knowledge of software development is required. If you have basic network engineering skills, all you need to get started is a system to install and use.

  • Learn the steps necessary to prepare your environment for automation
  • Understand how Salt works when running commands from the CLI
  • Dive into Salt’s configuration management and the advanced templating capabilities
  • Tackle advanced configuration management with Salt’s state subsystem
  • Learn how Salt’s event bus internally sends messages from one process to another
  • Explore Beacon modules and how they perform a variety of tasks by interacting with the event bus
  • Import external events or export Salt events with bidirectional engines

Table of Contents

  1. 1. Introduction
    1. Salt and SaltStack
      1. Exploring the Architecture of Salt
      2. Diving into the Salt Proxy Minion
    2. Installing Salt: The Easy Way
    3. Introducing NAPALM
      1. The NAPALM Proxy
    4. Brief Introduction to Jinja and YAML
      1. The Three Rules of YAML
      2. The Three Rules of Jinja
    5. Extensible and Scalable Configuration Files: SLS
  2. 2. Preparing the Salt Environment
    1. Salt Nomenclature
      1. Pillar
      2. Configuring the NAPALM Pillar
      3. Grains
    2. Master Configuration
      1. File Roots
      2. Pillar Roots
      3. Using External Pillar
    3. Proxy Configuration
    4. The Pillar Top File
    5. Starting the Processes
      1. Starting the Master Process
      2. Starting the Proxy Processes
  3. 3. Understanding the Salt CLI Syntax
    1. Functions and Arguments
    2. Targeting Devices
      1. Targeting Using the Minion ID
      2. Targeting Using a List of Minion IDs
      3. Targeting Using Shell-Like Globbing
      4. Targeting Using Regular Expressions
      5. Targeting Using Grains
      6. Targeting Using Pillar Data
      7. Compound Target Matching
      8. Defining and Targeting Using Nodegroups
      9. Targeting Inside the Top File
    3. Options
      1. Outputters
  4. 4. Configuration Management: Introduction
    1. Loading Static Configuration
    2. Loading Dynamic Changes
  5. 5. Salt States: Advanced Configuration Management
    1. The State Top File
    2. NetConfig
      1. Automating the Configuration of the NTP Servers
      2. Automating the Interfaces Configuration of a Multivendor Network
    3. NetYANG
      1. Writing the Pillar Corresponding to the openconfig-lldp YANG Model
      2. Automating the Interfaces Configuration of a Multivendor Network, Using the NetYANG State
    4. Capirca and the NetACL Salt State Module
  6. 6. The Salt Event Bus
    1. Event Tags and Data
    2. Consume Salt Events
      1. Reactor
      2. HTTP Stream
      3. Raw ZeroMQ
    3. Event Types
      1. Job Events
      2. Authentication Events
      3. Minion Start Events
      4. Key Events
      5. Presence Events
      6. State Events
  7. 7. Beacons
    1. Configuration
    2. Troubleshooting
  8. 8. Engines
    1. Engines Are Easy to Configure
    2. napalm-logs and the napalm-syslog Engine
      1. The napalm-logs Library and Daemon
      2. The napalm-syslog Salt Engine
  9. 9. Salt Reactor
    1. Getting Started
    2. Best Practices
    3. Debugging
  10. Acknowledgments
    1. From Mircea
    2. From Seth