Making a docker container for a Flask application


Recently I presented to you a project called PLAZA which basically serves as a Web UI for python scripts. It was a pleasure to see that this project was welcomed well and some folks even asked how they can get PLAZA to play with. My fault, I wanted to release it so bad that I missed the part describing how to actually get it.

One way to get PLAZA that was available since the beginning – is cloning the github repo and building python virtual environment with all the packages. And I understand that nowadays this way seems too complicated and the case is ideal for learning some docker!

Join me in this journey for integrating a simple Flask application into a docker container.


Building Web front end for Python scripts with Flask


Recently I revived my relationship with Python in an effort to beat routine tasks appearing here and there. So I started to write some pocket scripts and, luckily, was not the only one on this battlefield – my colleagues also have a bunch of useful scripts. With all those pieces of code sent in email, cloned from repos, grabbed on network shares I started to wonder how much easier would it be if someone aggregated all of them, made a Web UI and shared this experience.

Thus, I started to build web front-end to python scripts with these goals in mind:

  • allow people with zero python knowledge to use the scripts by interaction through simple Web UI;
  • make script’s output more readable by leveraging modern CSS and HTML formatting;
  • aggregate all the scripts in one repo but in a separate sandboxed directories to increase code manageability.

This short demo should give you some taste of what it is:

Disclaimer: I am nowhere near even a junior python or web developer. And what makes matters worse is that I used (a lot) very dangerous coding paradigm – SDD – Stackoverflow Driven Development. So, hurt me plenty if you see some awful mistakes.


Retrieving network elements backup from 5620 SAM

Last week I faced a routine (and quite common) task to get the latest backups of current configuration and BOF files for ~700 routers on a customers network. Sure thing sane man would use some automatization techniques, which could be:

  • 5620 SAM scripts
  • some scripting language to grab latest backups from the global NE backup location on a SAM server

I tried it both ways and invite you under the cut to read about it.


Workaround for virtualenvwrapper for windows postactivate script

Virtualenvwrapper’s windows port (virtualenvwrapper-win) helps to manage your venvs on windows platform, yet it is not so straigtforward about using hooks like postactivate. That is what official documentation has to say about this:


To run some commands after mkvirtualenv you can use hooks. First you need to define VIRTUALENVWRAPPER_HOOK_DIR variable. If it is set mkvirtualenv will run postmkvirtualenv.bat script from that directory. Version 1.2.0 (16-03-2015)

I tried to set VIRTUALENVWRAPPER_HOOK_DIR and place postactivate.bat there, but it didnt work out. The workaround I found for emulating postactivate behaviour is to edit postactivate.bat which is located in %WORKON_HOME%\<VENV_NAME>\Scripts


Getting VMRC links with Python

It became quite a pain to get Web-based console working on ESXi hosts or vCenter servers with deprecation of NPAPI plugins in modern browsers. As for me, the most comfortable method to get a remote console access is to use standalone Virtual Machine Remote Console client (VMRC) which is available for free for major OSes. The sad part about VMRC is that you have to login to ESXi web client/vCenter, choose a desired VM and click on Launch VMRC link to get access. Too many unnecessary and annoying steps to take.

In my day to day work I have to deal with 2-4 VMs and what I want is to have their consoles 1-click away. In this post I’ll share a tiny Python script which composes links for VMs suitable for VMRC:  vmrc://root@ . Click on the previous link will trigger VMRC to connect to virtual console of a VM.


DNS Terminology #

The DNS is defined in literally dozens of different RFCs. The terminology used by implementers and developers of DNS protocols, and by operators of DNS systems, has sometimes changed in the decades since the DNS was first defined. This document gives current definitions for many of the terms used in the DNS in a single document.

I saw this RFC has just been published and decided to save it here for further reference since DNS was always a mine field for me.


How to get rid of VNC and use telnet access for your Linux image?

We are, network engineers, have many *nix tools at our disposal: exaBGP, nmap, tcpdump, to name a few. And with UNetlab its very easy to run a linux system inside a topology (not to mention that you could use cloud pnet interface to bridge unetlab topology with the real world). By default UNetLab’s linux template opts to VNC access, which is cool if you have a GUI, but for a networker – CLI is the only love. In this post I will share with you a method to get telnet access to a linux image inside the UNetLab.

All credits go to my colleague – Anatoliy Kolpakov.


ESXi FREE Web Client Interface #

A good tutorial on what is ESXi Web Client Interface is, how to install and maintain it by


Basic L3VPN (BGP/MPLS VPN or VPRN) configuration. Alcatel-Lucent & Juniper


This time I will cover in details basic Layer 3 VPN (L3VPN or VPRN) configuration, and I decided to kill two birds with one stone by inviting Juniper vMX (read here on how to add vMX to Unetlab) to our cozy Alcatel-Lucent environment.

In this post we will configure BGP/MPLS VPN [RFC 4364] including:

  • PE-PE relationship configuration with VPN IPv4 family introduction
  • PE-CE routing configuration with both BGP and OSPF as routing protocols
  • Export policy configuration for advertising VPN routes on PE routers
  • AS override configuration
  • and many more

As a bonus track I will share with you Control Plane and Data Plane evaluation diagrams which help a lot for understanding the whole BGP VPN picture. Take your seats, there is no flying from VPNs!


Alcatel-Lucent virtual 7750 SR (vRR/vSR, TiMOS) first boot provisioning

Slice 1

I advertised to you recently another great virtual lab environment – Unified Networking Lab – with tools like that one I practiced the cool technologies of Alcatel-Lucent Service Routing platform and prepared to many certification exams. And I encourage you to go the same way, not just read the books and force the dumps, but actually build a topology and walk through interesting scenarios.

If you boot a Cisco router like 7210 one, or even Juniper vMX, you could configure some interfaces, protocols and so on right away. With Alcatel-Lucent 7750 SR this approach doomed to fail, you should know how bring to life 7750 virtual Service Router (vSR) once you booted it before any further configuration steps.

And this short post will be just about that, what should you configure on 7750 SR after the first boot to make it running with Unetlab or GNS3?