Skip to content
This repository was archived by the owner on Oct 12, 2020. It is now read-only.

07. Junos automation support with Saltstack

Khelil Sator edited this page Jul 17, 2017 · 4 revisions

From Nitrogen Salt release, Salt has good Junos automation capabilities.

Junos proxy:

SaltStack supports Junos automation with a Junos proxy:

  • it provides execution modules for junos so you can run commands on various machines in parallel with a flexible targeting system (remote execution).
  • it provides state modules for junos so you can apply sls files (configuration management).
  • Junos facts are stored in salt grains.
  • Junos proxy controls junos devices without installing salt on device. There is no salt-minion.
  • It uses Junos API: junos-eznc python library (pyez) and netconf.

The only requirement on Junos is to enable netconf.
So either configure:

set system services netconf ssh

or alternatively, just configure:

set system services ssh

The former allows NETCONF connections on port 830 while the latter allows NETCONF connections on port 22.
Technically, you also need to configure a root password (otherwise you can't commit) and IP reachability between the Junos Proxy and Junos device.

junos syslog engine:

Apart from that there is a junos syslog engine:

  • listens to syslog events
  • extracts events information
  • sends information on the master/minion event bus.
  • Control the type of events to be sent.
  • Salt reactors has the ability to take actions according to these events (event driven automation).

NAPALM:

Salt also supports NAPALM (Network Automation and Programmability Abstraction Layer with Multivendor support). So you can also use it to automate Junos.
https://mirceaulinic.net/2016-11-17-network-orchestration-with-salt-and-napalm/
https://mirceaulinic.net/2016-12-15-configuration-management/

Clone this wiki locally