Skip to content

Latest commit

 

History

History
101 lines (73 loc) · 2.9 KB

README.rst

File metadata and controls

101 lines (73 loc) · 2.9 KB

Event-driven Network Automation and Orchestration: RIPE 76 tutorial

Docker and Docker compose files to easily startup with Salt for Event-driven Network Automation and Orchestration.

The files in this repository are used in my RIPE 76 tutorial, Event-driven Network Automation and Orchestration.

The slides are available https://ripe76.ripe.net/presentations/17-RIPE76_-Event-driven-network-automation-and-orchestration.pdf.

Please follow the installation notes for Docker and Docker Compose to be able to reproduce the steps below.

Usage (briefly)

You can use the steps below to validate your environment, and ensure that the Proxy Minion is up and usable:

  1. Clone this repo:

    git clone https://github.com/mirceaulinic/ripe76-tutorial.git
  2. Change dir:

    cd ripe76-tutorial
  3. Edit the file pillar/device1_pillar.sls with the correct credentials of your device you want to manage.

    Ensure your device sends the syslog messages to the host where napalm-logs is running, over port 17171 (as configured in the napalm-logs.conf file). Configuration example for Junos: set system syslog host 10.10.10.1 port 17171 any any. For more detailed notes for other platforms, check the Supported devices and configuration section in the napalm-logs documentation.

  4. Start using it:

    make PROXYID=device1

Example output:

$ make PROXYID=device1
docker-compose up -d
Creating salt-proxy-device1 ... done
Creating napalm-logs        ... done
Creating salt-master        ... done

Check that the device1 Proxy Minion is up:

$ docker exec -it salt-master bash
root@salt-master:/# salt device1 test.ping
device1:
    True

If the device does not return, you might want to start the containers in debug mode (i.e., execute $ make PROXYID=device1 LOG_LEVEL=debug), and check why the Minion does not come up (most frequently the device is unreachable, e.g., blocked by a firewall, incorrect credentials etc.): $ docker logs -f salt-proxy-device1.

Run a test State:

$ docker exec -it salt-master bash
root@salt-master:/# salt device1 state.apply test
device1:
----------
          ID: Yay it works
    Function: test.succeed_without_changes
      Result: True
     Comment: Success!
     Started: 11:57:21.295204
    Duration: 0.76 ms
     Changes:

Summary for device1
------------
Succeeded: 1
Failed:    0
------------
Total states run:     1
Total run time:   0.760 ms
root@salt-master:/# %