Tuesday, January 26, 2021

Tool to generate network devices configuration

Hi Folks,

Wrote Template Text Renderer tool to facilitate the process of generating static configuration files: TTR docs

One of the reasons creating it was a need for a tool that can take Excel spreadsheet as an LLD source and generate configuration out of it using Jinja2 templates.

TTR is one step above it, it is an attempt to generalise and simplify the process of combining various data sources with templates to obtain text outputs, TTR build with pluggability in mind and can be extended to support other data sources, templates engines etc.

Last but not least, TTR comes with templates collection included, so far not much in it and only Jinja2 templates, but capability is there.

Would be glad to hear your thoughts. Reference quick start to use as a module or CLI tool or XLSX data loader for examples.

To anticipate the questions around why to use excel as a source of config, well, its mainly for one off things like you have a task to deploy 50 new devices and need to generate configuration for them as fast as you can. Putting things in CMDB/DCNM might not make sense at this stage as things quiet likely to change. Also, unless you have means to generate configuration out of your CMDB/DCNM that makes even less sense to do so.

What make sense to do is to put things in an inventory that can be easily created, shared, updated, loaded in CMDB/DCNM later on, human friendly etc, and that is usually some form of a spreadsheet or text database like YAML file.

TTR helps to take that inventory and generate configuration for you, providing that data structured in a way compatible with TTR in the first place.



No comments:

Post a Comment