generate network-device configurations #2202
smnmtzgr
started this conversation in
Show and tell
Replies: 1 comment
-
This is great @smnmtzgr! From 23 mins, 30 secs to only 35 seconds! How often do you have to run template generation from this large config file? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I replaced Ansible+Jinja2 as templating-solution to generate the intended configuration of our network-devices. Since the data structure gets very big now (at the end I have a file with about 280.000 lines) Ansible+Jinja2 get very slow. It took 20 minutes to generate the final file out of the input data+template. Thats why I was looking at CUE. My goal was to make this a lot faster and to replace Jinja2 completely with CUE.
After learning CUE and reading the documentations I got my transform.cue files to a working state. I still need to refactor them and make them more efficient to prevent repeating-code... but my template-generating time to build the over 280.000 lines long file already dramatically reduced from 1418.42s (Ansible + Jinja2-Templating) to 35s (CUE).
Beta Was this translation helpful? Give feedback.
All reactions