-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This wiki serves as the home for resources & documentation for NANOG 67's Hackathon (http://nanog.org/meetings/nanog67/hackathon).
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 elsewhere and pushed? Is it modeled in a database and rendered during build?
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.
On the VPS, we have built a mini clone to a system known as "FBNet", a network topology database used by Facebook's networking team. The version found on the VPS was created from scratch for the hack, so it should be easily approachable by both new and seasoned coders alike!
You will find the example code in ~/hackathon/, along with data pre-loaded to the current 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;" use standard SQL commands such as "select * from devices" to see the pre-loaded data. Should you need to reset the database and pre-loaded data, simply run "dbsetup.sh" from the "hackathon" directory. The full SQL schema can be found in that shell script too!
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 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 :-)!

mysql> select a_side_interface_id, a_side_description, z_side_interface_id, z_side_description from circuits limit 20;
+---------------------+---------------------------------+---------------------+-----------------------------------+
| a_side_interface_id | a_side_description | z_side_interface_id | z_side_description |
+---------------------+---------------------------------+---------------------+-----------------------------------+
| 1 | csw01.01.atn.example.com:Eth1/1 | 813 | rsw001.01.atn.example.com:Eth1/45 |
| 577 | csw04.01.atn.example.com:Eth1/1 | 814 | rsw001.01.atn.example.com:Eth1/46 |
| 385 | csw03.01.atn.example.com:Eth1/1 | 815 | rsw001.01.atn.example.com:Eth1/47 |
| 193 | csw02.01.atn.example.com:Eth1/1 | 816 | rsw001.01.atn.example.com:Eth1/48 |
| 2 | csw01.01.atn.example.com:Eth1/2 | 861 | rsw002.01.atn.example.com:Eth1/45 |
| 578 | csw04.01.atn.example.com:Eth1/2 | 862 | rsw002.01.atn.example.com:Eth1/46 |
| 386 | csw03.01.atn.example.com:Eth1/2 | 863 | rsw002.01.atn.example.com:Eth1/47 |
| 194 | csw02.01.atn.example.com:Eth1/2 | 864 | rsw002.01.atn.example.com:Eth1/48 |
| 3 | csw01.01.atn.example.com:Eth1/3 | 909 | rsw003.01.atn.example.com:Eth1/45 |
| 579 | csw04.01.atn.example.com:Eth1/3 | 910 | rsw003.01.atn.example.com:Eth1/46 |
| 387 | csw03.01.atn.example.com:Eth1/3 | 911 | rsw003.01.atn.example.com:Eth1/47 |
| 195 | csw02.01.atn.example.com:Eth1/3 | 912 | rsw003.01.atn.example.com:Eth1/48 |
| 4 | csw01.01.atn.example.com:Eth1/4 | 957 | rsw004.01.atn.example.com:Eth1/45 |
| 580 | csw04.01.atn.example.com:Eth1/4 | 958 | rsw004.01.atn.example.com:Eth1/46 |
| 388 | csw03.01.atn.example.com:Eth1/4 | 959 | rsw004.01.atn.example.com:Eth1/47 |
| 196 | csw02.01.atn.example.com:Eth1/4 | 960 | rsw004.01.atn.example.com:Eth1/48 |
| 5 | csw01.01.atn.example.com:Eth1/5 | 1005 | rsw005.01.atn.example.com:Eth1/45 |
| 581 | csw04.01.atn.example.com:Eth1/5 | 1006 | rsw005.01.atn.example.com:Eth1/46 |
| 389 | csw03.01.atn.example.com:Eth1/5 | 1007 | rsw005.01.atn.example.com:Eth1/47 |
| 197 | csw02.01.atn.example.com:Eth1/5 | 1008 | rsw005.01.atn.example.com:Eth1/48 |
+---------------------+---------------------------------+---------------------+-----------------------------------+