Catalyst Center Templates
Overview
Catalyst Center is maturing into a very robust tool for the network administrator. The lessons learned over a decade from Prime guided us toward a tool that will transform the future of networks. Prime has served many organizations for over a decade; Catalyst Centers’ capabilities and unique UI make it a robust successor. Additionally, Catalyst Center can easily accomplish various network automation tasks that would ordinarily take days to achieve. Lastly, to aid in understanding Catalyst Center’s capabilities, we provide a helpful Catalyst Center template tutorial.
Secondly, an area where Catalyst Center excels is in the area of automation. Catalyst Center uses a simple hierarchical workflow mechanism that enables the deployment of network settings, credentials, images, and templates to the network. Catalyst Center’s hierarchical approach to intent automates and provides policy continuity.
Finally, many will probably find the whole prospect of change and the development of automation templates a daunting task. It may seem cumbersome to revisit today’s methods to build configurations. As a result, reviewing their construction and changing their deployment approach may feel a little overwhelming.
In this ongoing Catalyst Center Automation Series, our focus is on using multiple approaches to automating the network. This will help enable you, the network administrator, with the capability to solve more types of configuration issues from Catalyst Center and to deal with the dynamics of an enterprise network.
Within this series, we cover the following;
- PnP Preparation – explains the overall Plug and Play set up steps
- Onboarding Templates – explains in-depth how to deploy Day 0 templates
- Day N Templates – dives into Day N template constructs with both regular and composite templates and use cases
- Application Policys – explores Application Policys and SD-AVC in Catalyst Center and their use
- Telemetry – explains how to deploy Telemetry for assurance
- Advanced Automation – explores Advanced Automation techniques
- Dynamic Automation – a deployment lab for dynamic automation
How?
To aid customers in the transition toward automation, we have put together a set of small helpful tutorials within a Github repository. As a result, we hope to demystify some of the complexities of setting up plug-and-play and help guide customers through the complexities. In this way, the tutorial provides a glimpse into the fundamentals of building Velocity and Jinja2 templates and provides examples that you can download and expand from. These sample templates and JSON files are supplied for easy import into Catalyst Centers’ template editor for quicker adoption.
Firstly, we delve into the concepts of building templates and methodologies for using both Onboarding and DayN templates at length. Secondly, answers to many of the questions that come up during automation workshops are explained. The hope is that you find the information both helpful and informative. Thus, information is included, which will hopefully give a well-rounded explanation of automation methods and concepts.
The DNAC-TEMPLATES repository includes tutorials, scripts and samples of:
- Velocity Scripting
- Jinja2 Scripting
- Variables
- Binding Variables
- Composite Templates
These samples build a tutorial that aims to be a practical guide to aid engineers to rapidly begin using Catalyst Center automation and help them work towards a template strategy. This will enable engineers to reduce the time and effort needed to instantiate the network.
As a result, the tutorial also does an in-depth flyby about setting up Plug and Play onboarding and templates. Additionally, it has a section on advanced Velocity and Jinja2 templating and troubleshooting tools which may help during faultfinding to determine what is failing in a deployment.
In order to keep this repository relevant, new content is added frequently to the repository DNAC-TEMPLATES, so stay tuned…
Furthermore, the repository is also directly available from Github at DNAC-TEMPLATES.
Intent-Based Networking
To deploy Intent, we use combinations of either one or multiple templates and the Design Settings and Policies within the UI. Lastly, Day N methods allow for one or multiple templates by using composite templates that combine many regular templates into one logical flow.
Additionally:
- Intent is a combination of configuration templates, configuration, policy, code, and settings.
- Logical constructs modify or choose between various results via decision (‘IF’) statements.
- Looping structures within the template allow for repetition of configuration
- Variables may be used when the device is being onboarded or provisioned
Tutorial Sections
Various sections will be covered within this github repository. Please use this menu as the main index for navigating content. You will find various examples within the various folders of this repository, with supplied explanation readme files for reference.
Tasks
- PnP Onboarding – This section explains the overall Plug and Play Methodology
- Onboarding Templates – This section will explain Onboarding Templates in Cisco Catalyst Center and their use in bringing various devices under Cisco Catalyst Center management
- DayN Templates – This section will explain how to use templates for ongoing (Day-N) changes to the network
Templating
- Building Templates – This section will explain how to build a template on Cisco Catalyst Center from scratch
Velocity Language
- Velocity Variables – This section explains Template Variables in depth, and how and where to use them
- Velocity Scripting – This section will dive into Velocity Language Template Scripting constructs and use cases
- Advanced Velocity Scripting – This section will dive into Advanced Velocity Language Template examples
Jinja2 Language
- Jinja2 Variables – This section explains Template Variables in depth, and how and where to use them
- Jinja2 Scripting – This section will dive into Jinja2 Language Template Scripting constructs and use cases
- Advanced Jinja2 Scripting – This section will dive into Advanced Jinja2 Language Template examples
Advanced Use Cases
- Embedded Event Manager – This section will dive into EEM (Embedded Event Manager) Scripting and various use cases
- System Variables – This section explains Cisco Catalyst Centers System Variables
Orchestration of Cisco Catalyst Center
- REST API Orchestration – This section is a high level discussion of utlilizing REST API with Cisco Catalyst Center
- Python Orchestration – This section is a high level discussion of utilizing Python with Cisco Catalyst Center
- Ansible Orchestration – This section is a high level discussion of Ansible orchestration of Cisco Catalyst Center
- CICD Orchestration – This section is a high level discussion of CICD orchestration of Cisco Catalyst Center
Fault-Finding
- Troubleshooting – This section will dive into Troubleshooting Velocity based Template Constructs
Catalyst Center Labs
This section built out in a lab format to guide you through the typical steps to complete various automation tasks delivered by Cisco Catalyst Center. It allows for customers to practice Cisco Catalyst Center workflows with Onboarding, DayN Templates, and Application Policy automation on both Wired and Wireless Platforms, while reducing the time and effort needed to instantiate the network The lab will also introduce advanced velocity templating topics and troubleshooting tools, which may help determine common failure scenarios in a deployment.
To help customers succeed with Cisco Catalyst Center automation, you may utilize the above labs as they have been designed to work within DCLOUD’s Cisco Enterprise Networks Hardware Sandbox Labs in either:
New Catalyst Center Lab Content
This newer and more modular lab approach is designed to deal with and includes concepts from the legacy labs in a newer more modular format.
- Lab 1 Wired Automation – Covers green and brown field use cases (allow 4.0 hrs)
- Lab 2 Wireless Automation – Covers traditional wireless automation (allow 4.0 hrs)
Legacy Lab Content
In this section you will continue to find all the existing labs which deal with specifics in separate easy to do labs.
- PnP Preparation – The lab covers setup for Plug and Play (allow 1.5 hrs)
- Onboarding Templates – The lab covers in depth topics in deploying Day 0 templates (allow 1.5 hrs)
- Day N Templates – The lab covers Day N template constructs and use cases (allow 0.5 hrs)
- Composite Templates – This lab covers building a composite template on Cisco Catalyst Center (allow 0.5 hrs)
- Application Policys – This lab covers Application Policy & SDAVC in Cisco Catalyst Center (allow 1.0 hrs)
- Telemetry – This lab explains how to deploy Streaming Telemetry for Cisco Catalyst Center Assurance (allow 0.5 hrs)
- Advanced Automation – This lab will explore Advanced Automation examples (allow 1.5 hrs)
- Dynamic Automation – This lab will explore additional Advanced Automation examples (allow 2.0 hrs)
- Rest-API Orchestration – This lab uses Postman Collections to automate Cisco Catalyst Center (allow 2.0 hrs)
- Wireless Automation – This lab covers Traditional Wireless Automation (allow 6.0 hrs)
- Orchestration – This lab covers Postman and Ansible orchestration (allow 4.0 hrs)
- CICD Orchestration This lab covers Python, Ansible and JENKINS to orchestrate via REST-API (allow 4.0 hrs)
Examples
When building the template you will need to select a scripting language. Specific examples of Templates in the two scripting languages supported are available in sub folders within the following folders:
The conditions that they are used are documented and are explained in Onboarding Templates and examples of DayN Templates are explained in DayN Templates
These examples must be used with two conditions:
- Deployed a PnP Discovery method and DHCP scope – see PnP Workflow
- Build the template with methods detailed – see Creating Templates
In conclusion, if you found this repository or any section helpful, please fill in comments and feedback on how it could be improved.
We’d love to hear what you think. Ask a question or leave a comment below.
And stay connected with Cisco DevNet on social!
Twitter @CiscoDevNet | Facebook | LinkedIn
Visit the new Developer Video Channel
Hi
I am starting out with VTL and have a very basic question that I can’t find an answer to on any of these blogs. I need to create some vlans on a switch on onboarding template but cant work out how this can be done in DNAC VTL. In my case users supply a list of vlan ids and then the template creates the vlans on the switch. For example the user is prompted to enter a list of vlan ids (222,333,444) which then creates the vlans on the switch as below
vlan 222
vlan 333
vlan 444
Cheers
Hi Mike,
Please see the content within the repository…
https://github.com/kebaldwi/DNAC-TEMPLATES/tree/master/LABS#dnac-template-labs
There is a Composite Lab there https://github.com/kebaldwi/DNAC-TEMPLATES/blob/master/LABS/LAB4-Composite-Template/README.md#Composite
In that location see the Template folder and either the zip file, or the 2125 Template folder with JSON files for import.
There is an example code with the JSON file https://github.com/kebaldwi/DNAC-TEMPLATES/blob/master/LABS/LAB4-Composite-Template/templates/2125templates/Platinum_PortAssign_Template.json
Hope that helps… I will be creating a series of Blogs over the next few weeks to advertise this a bit better… These JSON files are also in the DAYN folder in the repository.