top of page
  • Brett Gianpetro

Ansible, Netbox and BGP-EVPN - New GitHub Repositories!

After our initial foray into generating and applying network device configurations using only Ansible and Netbox with no Python logic layer (see our first musings on this subject here), we decided to take on something a little more ambitious: the configuring of an NX-OS leaf/spine VXLAN fabric running BGP-EVPN. We were eventually able to accomplish this with a bit of trial-and-error and plenty of deep dives into the respective technologies' documentation. After we got it all up and functional, we published our results in a series of GitHub repositories:

  • Github | n9kv-vagrant-topo. Since our testbed was going to be Nexus 9000vs deployed using Vagrant, we wanted to ensure that we had a reusable Vagrantfile that can easily spin up our topology and apply a base config. Historically we had used the 9000v OVA and built a custom Box to suit our needs in Vagrant because the Cisco-provided Boxes had a few shortcomings; however, we revisited the most recent versions of the Cisco-provided Boxes and were pleasantly surprised to find they were functional and met all our requirements. We were easily able to deploy a single spine, two leaf topology that includes test hosts and an external test Linux "router". If you're just interested in getting a few Nexus 9000v devices deployed using Vagrant and not any of the Ansible/Netbox stuff, this repository would definitely be of some interest.

  • GitHub | netbox-vagrant-baselab. This repository wasn't new to this effort, but it underwent a major overhaul as part of the project. This repository aims to get a Netbox instance installed on a Vagrant VM and all of the data populated that would be required for a typical leaf/spine topology. Prior to this effort, the data was hardcoded into the script and the data was a very basic leaf/spine that didn't include VXLAN, BGP-EVPN, etc. So this repository was overhauled to include the following:

    1. A separate configuration file, in YAML format, that is used to describe the leaf/spine data in Netbox

    2. All of the Netbox custom fields, tags, and data (VNIs, terminations, static routes, etc.) that is required for our test topology

  • GitHub| ansible-netbox-cfg-nxos. This repository contains all of the Ansible playbooks and roles that are required to perform the actual device configurations. If you are planning on running this yourself, it is tightly coupled to the Netbox data populated by the above repository. But it also could provide a reference or starting point for anyone looking to do something similary.

Have a look and let us know what you think! As always, if you have any questions or would like to discuss anything in-depth, don't hesitate to drop us an email or leave a comment.

66 views0 comments

Recent Posts

See All

Ansible and Network-as-Code: Key Considerations

So you've decided to take your network to the next level with a network-as-code (NaC) model and commit (no pun intended) to Ansible as key component to your tool chain. Great! At Vector we frequentl

Quick Tip: Importing Data into Netbox Docker

Here at Vector we commonly use the pre-packaged Netbox container, netbox-docker, to develop and test. One common workflow is for us to spin up the container, build and model Netbox data, and then de


bottom of page