Review of the Network Config Generator

This post is part of the series “How to build your own Network Configuration Generator”. You find the overview about the entire series here. The last state of the code is available at the Network Configuration Generator GitHub repository.

This post is the last one within a series that I’ve created primarily at the beginning of 2016. The topic was on How to build your own Network Config Generator. The last post within the series was some time ago and I like to finish it today with a short review of the process and my experience during the time.

The entire code is available at the Network Config Generator GitHub repository>. As of today, it’s working and contains a Vagrant file to create a VM if you like to try it.

The idea

I had the idea for a flexible Network Config Generator in the last year and decided to start a little series on how to build your own Config Generator. The primary focus wasn’t a step by step approach, how to write it. The primary goal was to assist the process of creating mass configurations, not on the technical “how to do it” side. You may ask why: I think config generation is always a very use-case specific topic. Everybody has an unique way of building networks and there are a ton of protocols out there to achieve more or less the same or similar results. Some of you may use vendor recommendations, e.g. the Cisco SRNDs, some of your have own Company specific Network Design Guides. It shouldn’t matter for the Network Config Generator.

At the beginning of the project, I draw the following diagram to illustrate the use-case and integration possibilities. I wrote about the entire idea in my first post about the Project.

The technology stack

The primary reason why I started the series, was to try some new libraries and frameworks that I’ve heard quite often in various articles and blogs, but I never tried to work with them. They are:

  • Flask – the server-side web framework (including some other components, e.g. SQLAlchemy, flask-wtf etc.)
  • UIKit – the CSS framework
  • Mako – the Template Engine

The Network Config Generator should provide a nice web-based user interface to simplify the template and parameter handling. If you work within large networks with a lot of devices, the handling of the configuration templates can be challenging. It also should provide the configurations to the outside world .

At the time when I was starting with the series, I worked for quite some time with the Cisco APIC-EM (Application Policy Infrastructure Controller - Enterprise Module). This piece of software is some kind of SDN controller for Campus Networks from Cisco Systems. It provides a Plug-and-Play module to automate the provisioning of devices. The weak point of the story was the config generation for the devices that should be provisioned. They are not created by the Cisco APIC-EM at time of this writing and the Network Config Generator perfectly fits into this gap.

The integration part

The Cisco APIC-EM provides a REST API that allows third-party services to talk to the controller. There are API endpoints to create projects and configurations in the Plug-and-Play component. I found some nice examples on the Cisco DevNet that showed how to interact with the APIC-EM PnP module (GitHub). At the beginning, I planned to provide an interface to this API to provide a bulk upload capability.

After some progress on the Network Config Generator code and some more experience with the APIC-EM, I quickly noticed that a simple FTP/TFTP server was all I need. It was enough to enhance my provisioning process at this time, therefore I decide to skip the Cisco APIC-EM API implementation. One reason for this decision was the huge amount of resources that you must throw on the appliance to get it up and running. It’s way more than just a simple provisioning device but at the time that was all I really needed it to be. Today, there is a development version of the APIC-EM available, which requires far less resources for testing and development purpose.

Raspberry PI as a Config Generator

At this time, I started with some tests using a Raspberry PI and how it helps us in terms of test automation. I also try to get the Network Config Generator on the Raspberry PI working. The Network Config Generator equipped with an TFTP/FTP server and a battery pack for the PI was at the end all I need for my use case. If you like to know more about it, please take a look at the post Using a Raspberry PI as a Configuration Generator.

At the beginning of March, I ran into some time issues and was unable to put more progress on the project. I won’t finish the integration to the Cisco APIC-EM and today, I won’t spend more time to this part of the story, because I don’t require it anymore.

Review & future development

The web service works and I saw already that it helped some of you out there. You can simply clone the repository and use Vagrant to get it up and running (see the readme for details). I’ll continue to maintain the project, but I won’t implement any new features from todays perspective. One reason for this decision is the fact that it’s require a lot of time to keep up to date in multiple frameworks. I currently focus more on Django for web development, because It’s easier from my perspective compared to Flask and I don’t require a lot of different components to achieve the same results.

That’s it for today. Thank you for reading.

Links within this post