View Only
last person joined: 16 days ago 

Ask questions and share experiences with SD-WAN and Session Smart Router (formerly 128T).
  • 1.  Feature Friday: Configuration Templates in the SSR

    Posted 05-20-2022 13:36

    Hey everyone, Happy Friday!


    On Fridays, we want to bring to your attention a Juniper SD-WAN feature that you may not be familiar with. Today let's take a look at Config Templates in the Session Smart Router (SSR).


    Config Templates are a tool that allow you to easily deploy thousands of SSRs with just a few clicks. All you need to do is:

    1. Create a template
    2. Find a golden config of yours and click the button to copy to template
    3. Select the fields you want to templatize


    When you are ready to use the template, just go to your template, select CREATE AN INSTANCE and fill in the values. Lastly, just select Generate Configuration for Selected and voilà, your router configuration is in your Candidate config (still need to Commit).


    Here's a demo showing how that is done: Session Smart Routing Demo: Configuration Template


    Now, what I described is still pretty manual, so if you need to scale, the SSR has ways of doing that too. You can use Liquid templating language and conditional statements and loops to make it easy to create thousands of instances with few clicks.


    My friend @Preetham made a guide to help you learn how to do some advanced templating. You can find that here: Intro to Templating in 128T


    He broke down templating into 5 pieces:

    1. Basic Templating
    2. Using if-else conditions and loops within the template
    3. Deleting config elements.
    4. Emulating a dictionary within the template
    5. Using network filters to determine IPs in a network


    So yea, that's Configuration Templating with the SSR in a nutshell. Now, we want to hear from you:

    • Have you used templating before?
    • How many routers have you deployed and did you do it using templates?
    • Have you had a chance to try out any of the advanced templating features?
    • What do you think of the SSR Configuration Templates feature?


    Comment down below and let us know what you think!


    One last thing before I leave you, here are some more useful resources on Configuration Templating:

    Talk to you soon!

    #FeatureFriday #templates​​ #SSR #SessionSmartRouter​​

    Justin Melloni

  • 2.  RE: Feature Friday: Configuration Templates in the SSR

    This message was posted by a user wishing to remain anonymous
    Posted 07-21-2022 17:47
    This message was posted by a user wishing to remain anonymous

    I have used templating extensively on an SSR conductor running 5.4.5.  As of yet I haven't deployed any production routers using templates although I have developed and tested tools using the liquid template REST APIs to assist in deploying routes.  For my use case, I intend to render one router at a time as new sites are brought online so the notion of iteratively rendering multiple routers in one pass, does not apply in my case.

    My experience with templates involved converting older templates designed for use with netconf to json and liquid, so I did not import configuration from an existing router and templatize it.  All of the templates I worked with are advanced mode templates.   There is a way to create a GUI wizard to enter variables for an advanced template, but I have not explored that as I am using a python script to drive the conductors via the templating REST APIs.  That said, I did do a lot of manual testing of advanced templates by pasting different data into the variables window and rendering the template.

    I think the SSR templating feature is an awesome addition to the product as one can take a single router that has been working in a lab or prototype production environment, import it's configuration, define the variable components and create a template to be used over and over without much effort.

    As always there is some room for improvement, and in my experience there is a need for improvement in template debugging.  The json format required for liquid templates uses a strict syntax so an open brace towards the top of a file might be missing a closing brace hundreds of lines down.  My experience with the GUI is that it reports json parse error at the offending character and not line.  This makes it difficult if not impossible to find within the GUI (I may have missed some GUI controls, but my approach is to copy the json output into a text editor and advance by the number of characters reported in the GUI),.  Additionally, the error messages returned by the template rendering engine and the config engine can be confusing to first time users (after a little bit  you'll learn what the error messages are referring to).  

    Using advanced template mode with REST APIs can be a bit tricky.  I ended up deleting the template name, ignoring the return code for whether it existed or not, and then creating it. I would have preferred a mechanism to force an overwrite of the exiting configuration.  

    One feature request for the templating feature would be to have the conductor consult an MSR (Master System of Record) to obtain the variable data for a given site.  I believe the lack of this capability will drive many users to use the REST APIs over the GUI as they can write scripts to query their REST APIs.  This is unfortunate as were some of the issues with debugging in the GUI to be resolved it would be a great way for administrators not familiar with devops / scripting to deploy new sites.

    In summary SSR templating is a really useful feature which greatly improves the administrator experience of configuring multiple sites with configuration that varies only by a few variables.  Over time I'm sure it will evolve and become even better.

  • 3.  RE: Feature Friday: Configuration Templates in the SSR

    Posted 07-22-2022 17:44
    I agree, anonymous!
    As was previously mentioned, the templating feature makes for easy configuration. If you have a router already configured, you can copy that router's configuration and apply it to any new routers that you are bringing on. Templates allow you to pick and choose the exact configuration fields that you want to copy over, so you can make sure you are getting everything that you need and nothing that you don't, and you can always go in and modify. Using the templating feature saves so much time! 

    Jenna Ramos
    Information Development Engineer II

  • 4.  RE: Feature Friday: Configuration Templates in the SSR

    Posted 07-25-2022 10:37
    Thank you so much for your feedback here! I LOVE hearing about your experiences both good and bad. I have let Product Management know about some of the pitfalls you mentioned and will work with them on getting those improved. 

    I don't know if you'll get a chance to play around with our new WAN Assurance product, but the templates in that do allow for a Master System of Record. @Reid can even show you a demo where he deployed 6000 sites with the WAN Assurance templates.

    Anyway, thank you again for your feedback!​​

    Justin Melloni