Product Database: Automate Cisco EoL checks (V0.3)
Update 21st December 2016: This post is about an older version of the Product Database. To see the latest version, please take a look at the Product Database Project page.
Almost a year ago, I started a side project to create a web service that automates End-of-Life (EoL) checks. My primary intention was to learn Django and some other web technologies. Furthermore, I liked to play with the Cisco API console (more specific the Cisco EoX API).
After I finished the first version, it ran for quite some time in my company. Some months ago, I decided to extend this Project a little bit. The first step was a review of what I’ve done last year. I recognized fast that the code needs some updates…
Product Database V0.3
The Product Database that I like to talk about in this post is Version 0.3. The entire source code and the setup instructions are available on the Product-Database Github repository. This version is mainly a backend update with some improvements to the user interface. I also removed some almost unused features, e.g. the simple backup mechanism (use the Django data export instead). The current stable version provides the following new features/changes:
- a full UI rewrite with some nice extensions
- improved version of the database import feature using Excel (now you can import anything that is part of the database)
- use of the Cisco EoX API Version 5 (including the End of Security/Vulnerability Support date)
- a Notification Center, to show recent events on the dashboard (including EoX syncs and some custom messages created by the administrator).
- optional LDAP integration
Quick Note: I won’t maintain an update path until a stable version 1.0, but I will maintain the database structure starting with this version. This means, it is possible, that you need to rebuild the server in upcoming versions, but it will be possible to import older database backups. I need to change a lot in the database schema for Version 0.3, therefore an update to this version is not possible.
As already mentioned, I changed a lot in the backend and include this information as a reference. The installation process is quite easy, because all required actions are done by one central Ansible playbook. Further details about the installation options are included in the readme file in the GitHub repository.
Update to Ubuntu 16.04
The first (and almost largest change) in version 0.3 is the move to the most recent Version of Ubuntu Linux 16.04. It introduced two major changes that affects the product database:
- it ships without python 2.x (but this is required for Ansible)
- it now uses systemd as the default process manager (version 14.04 used Upstart)
The second point required large changes to the deployment scripts. I decide to do a complete rewrite of it, to make it a little bit more simpler. This allowed me, to solve some issues with the last version of the Product Database, including the inability to restart the celery worker processes on the platform.
If you like to read more about the changes in Ubuntu 16.04, I found a good blog post on the DigitalOcean Community Blog: What’s New in Ubuntu 16.04. The new deployment scripts can be found in the deploy/appliance directory of the repository.
New User Interface
After I rebuild the deployment scripts and services to use systemd, I take a look at the user interface. The previous version shipped with all frontend dependencies directly in the repository, including Bootstrap, JQuery and datatables. I found this approach not very useful, therefore I switched to an implementation that uses Bower. Bower is a tool to manage this dependencies and it is more useful from my perspective. If you like to learn more about Bower (a NodeJS tool), please take a look at the bower homepage.
If you just like to use the Product Database, you don’t need any knowledge about the internals of the deployment process, because it is all done automatically by the deployment script. I also added an installation procedure that can be used on a single server (a separate Ansible Control node was always required in the past).
The next step was a complete redesign of the user interface. I changed a lot under the hood to make it more maintainable (at least for me) and I also introduced some new features, including the column based search and a quick introduction to the user interface.
There are some minor changes associated to the user interface, including a login-only mode, to make the site private. Furthermore, I add some edit capabilities to the Product Lists that use the Django Permission system. I’ll continue with this type of implementation to get rid of the Django Admin pages in the long run.
Automate EoL checks
I don’t make a lot of changes to the “Bulk EoL check” feature and moved it without any modification to the new user interface. The reason was quite simple: I like to extend it to make it more intuitive to use, shareable and persistent in the upcoming versions. It is easier to rewrite this feature in a new, clean way.
This part of the application looks exactly like it was in Version 2.0, therefore please take a look on my last blog post about it here.
What’s next…
Okay, this release was just to give me a better starting point for the further development. The planned features that I will add to the Product Database in the next months are as follows:
- change the entire appliance to use HTTPs (and allow custom certificates in the deploy script)
- store Product migration options (custom and from the Cisco EoX API)
- add an annotate/note feature to Products and Product Groups
- add additional data from the Cisco Product Information API/Serial Number to Information API
- implement an Asset Audit (improved version of the “Bulk EoL check”)
You will also see some more content related to this side project, including ways to gather and maintain data from various sources (Cisco Price lists, website etc.). I will also start to release more often stable releases.
I hope that’s helpful and if you have any feedback on the project, please leave a comment below. That’s it for today, thank you for reading.
Links within this post
- What's new in Ubuntu 16.04 (DigitalOcean Blog)
- Systemd (Wikipedia)
- Bower - a package manager for the web
Related posts
- Automate Cisco EoL checks using the Cisco EoX API – post for the previous version 0.2