Skip to content
David Swafford edited this page Jun 10, 2016 · 24 revisions

Welcome!

This wiki serves as the home for resources & documentation for the NANOG 67 Hackathon! (http://nanog.org/meetings/nanog67/hackathon)

Theme

The hackathon's theme is focused on "building a source of truth" for your network. In the world of network automation, we have many possibilities and one road block that may hinder your level of automation is where the source of truth lies for device configurations. Is it on the device themselves? Is it stored in a text file and pushed? Is it modeled [described] in a database and rendered during the build?

Getting Started with the Virtual Private Server (VPS)

Each group will have a Virtual Private Server (VPS) assigned to collaborate on for the duration of the hackathon. Login credentials will be provided at the Hack's opening. Use of the VPS is not required and simply provided as a convenience.

The VPS will be running Ubuntu 14.04 LTS Server with current versions of Python, GoLang, and Perl installed. MySQL server is also installed with appropriate Python modules for database access.

To access the VPS, connect using SSH and the credentials provided. Each VPS runs a local "mosh-server" as well which provides a more reliable SSH-connection for use across unpredictable network connections. See mosh.mit.edu for more detail and to grab a free client. If you have trouble connecting with Mosh, note that it runs over UDP using non-standard ports.

The example hack - mini FBNet :-D!

To plant a seed, we've started one "hack" in advance centered on this theme. Our hack is nicknamed mini FBNet, taken from it's inspiration of Facebook's FBNet. FBNet is a network topology database at it's core. It fully describes the Facebook production network down -- starting with the high level of devices and locations and going to the depth of per-neighbor BGP configuration on each device. By fully "modeling" the network in FBNet, we are able to generate device configurations at any time and can build tooling around their configuration through the database -- eliminating the slowness and potential risk of constantly hitting network devices.

mini FBNet is based on a MySQL database and Python code. The Python code manipulates that data through the database using simple SQL queries and the MySQL Python "connector" library found on https://dev.mysql.com/downloads/connector/python/.

All of this has been pre-staged to each group's VPS. You will find the example code in ~/hackathon/, along with data pre-loaded onto the database named hackathon on the locally running instance of MySQL server. To see the pre-loaded data, type mysql on your shell. This is an alias to "mysql -u -p", dropping you into a MySQL shell. Once in that, type use hackathon; and use standard SQL commands such as select * from devices; to view what's already staged.

To destroy the example data and re-create it, run: ~/hackathon/dbsetup.sh. In that shell script, you will find the full database schema too. Once it rebuilds the database, the staged data is constructed by running the Python script ~/hackathon/staging.py.

The example uses a MySQL database named "hackathon". We have a simple table structure of:

  • environments (production, lab, ...)
  •    locations (datacenters)
  •    devices
  •     interfaces
  •    circuits (describing the physical-layer connectivity between two "interfaces")

Here's a diagram showing the data being described by those tables:

The Pre-staged Network Topology

The pre-staged network consists of two datacenters ("atn" and "frc") with two clusters each. A cluster here is simply a logical unit to associate a number of racks (rack switches) and their aggregation layer (cluster switches). In the examples staged, we have 4 x cluster switches and 128 x rack switches per cluster. The currently staged data does not connect either cluster / datacenter together though :-)!

In the screen shot below, we can see a view into the db-level association of our rack switch <> cluster switch uplinks:

Clone this wiki locally