cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
423
Views
1
Helpful
3
Replies

NSO Friendly web config generator

Albertt
Level 1
Level 1

Hello, 

I was using ultraconfig website to generate my templates CLI based on JINJA of the router but I just wanted to move to different ways like NSO/Ansible to improve automation of it and maybe someday full orchestrate. I started using NSO and make some test but at some point if devices are not on sync with the network and sometimes I need this generator for offline equipments. What is currently the best recommended practices for implement in a easy/friendly way to generate CLI configs and at the same time if it's posible push config.

Usually I worked in this way: I had formulario to introduce the inputs and once I type or select the options after submit it generated the configuration in CLI.

So how is cisco recommend providing this form, and generate config? In case I need to develop by myself, what is your recomendation of tools/integrations/languajes?

Best regards,

1 Accepted Solution

Accepted Solutions

No problem @Albertt you could utilizes YANG models to define custom service models representing your network configs. NSO's built-in template language, (similar to J2), this allows you to use device configuration generation based on service parameters. You can use the web ui for creating custom forms to collect configuration inputs, the CLI for service management, and REST and NETCONF APIs for programmatic access too. T

This is a good integrated approach within the NSO ecosystem to enables both CLI config generation and configuration pushing, for a streamlined solution for netdevops which should align with your requirements for form-based input and configuration management.

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

View solution in original post

3 Replies 3

@Albertt just personal pref and exp here, i am not sure on the defined Cisco method. For network configuration mgmt and automation, a comprehensive approach would be to combine multiple tools and practices.

I would start by creating a web-based frontend using a modern framework like React/Vue.js (I have used Vercel in the past) to collect input data, the use Python with Streamlit (you can use Flask/Django too) for the backend, then Jinja2 for template-based config generation. You can store device information and templates in a database like PostgreSQL and for configuration pushes and more complex orchestration, integrate with Ansible or Cisco NSO.

This setup helps for for both offline config generation and live network management. Typicallu Python is the primary programming language due to its rich ecosystem of networking libraries, although Go is really getting popular now too. It makes great sense to implement version control using GitHub/Lab, and consider integrating with a CI/CD pipeline for automated testing and deployment. GitHub has actions etc.. but you can use a third party such as CircleCI/Jenkins etc... of you choice.

The only thing i would suggest for following best practices would be modular code design, proper error handling, and strong security measures throughout, this approach should provide the flexibility for generating configs for offline devices while offering a path towards advanced automation and orchestration as your needs evolve too.

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Albertt
Level 1
Level 1

Hello, Thanks for your feedback. Looks really nice, however. Do you know if there is a way to use native NSO instead of integration of Python/JINJA?

No problem @Albertt you could utilizes YANG models to define custom service models representing your network configs. NSO's built-in template language, (similar to J2), this allows you to use device configuration generation based on service parameters. You can use the web ui for creating custom forms to collect configuration inputs, the CLI for service management, and REST and NETCONF APIs for programmatic access too. T

This is a good integrated approach within the NSO ecosystem to enables both CLI config generation and configuration pushing, for a streamlined solution for netdevops which should align with your requirements for form-based input and configuration management.

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io