Terraform expands into the in depth Cisco IOS XE programmability and automation ecosystem
IOS XE’s huge, programmable function set
The Cisco IOS XE ecosystem is programmatically managed and helps quite a lot of tooling. This consists of Ansible to YANG Suite, pyATS over NETCONF, RESTCONF, gNxI, and even with legacy CLIs. With the addition of the brand new Cisco IOS XE Terraform supplier, we add a further instrument into the IOS XE configuration administration toolbox.
Within the programmability lifecycle, we handle gadget onboarding, configuration, monitoring and optimization. In Day 0, we’ve gadget onboarding together with Pre-boot Execution Surroundings (iPXE), Zero Contact Provisioning (ZTP), and VM automation. In Day 1, we configure units utilizing Community Configuration Protocol (NETCONF), RESTCONF, gNMI, YANG Knowledge Fashions, OpenConfig, YANG Suite tooling, Ansible, pyATS, and now Terraform. In Day 2, we monitor units utilizing the TIG MDT container, YANG on-change help, gRPC dial-out with DNS and mutual TLS, and gNMI or NETCONF dial-in. Past Day 2, we optimize our units utilizing gNOI cert/os/reset.proto, Visitor Shell with NETCONF, CentOS 8 with Python 3, Utility Internet hosting with Docker, and CLI to YANG. These options and protocols knit programmability into Cisco IOS XE.
Introducing Terraform with IOS XE
Why Terraform? Terraform simplifies complicated community configurations by orchestrating provisioning, configuration and state administration within the cloud in addition to on-prem within the campus enterprise community and the info middle.
Why Terraform within the Campus? Terraform is a perfect answer for cloud-native prospects, particularly these already utilizing this tooling in different points of their community to consolidate cloud-native provisioning with on-prem gadget configuration. Moreover, we are able to now use Terraform for different cloud companies and infrastructure in addition to use it with current steady integration/steady deployment (CI/CD) tooling and pipelines.
Terraform is an Infrastructure as Code tooling that permits community operators to simply view operational information, configure units and handle community assets. Since Terraform is cloud native, it really works effectively with Cisco IOS XE cloud native options for routing, switching, and wi-fi platforms together with the Cisco Catalyst 9000 Household switches, the Cisco Catalyst 8000V (digital) router and the Cisco Wi-fi LAN Controller (WLC) 9800-CL (CL stands for “Cloud”). In addition to simply managing cloud-native options, Terraform can even configure campus options. With Cisco IOS XE, we are able to automate with any tooling on any interface.
Safe Department Connectivity
The connection between Cisco and Terraform continues to develop. Cisco just lately launched Terraform help for Utility Centric Infrastructure (ACI). We are able to Leverage Cisco Intersight Service for HashiCorp Terraform. Additional, we are able to now combine Terraform configurations with DevOps pipelines to handle the IOS XE options in a extra versatile, constant, and dependable approach.
Terraform, a cloud native tooling, can be utilized natively by all cloud suppliers comparable to Google Cloud Platform, Microsoft Azure, and AWS. For instance, we are able to use Terraform to configure an IPsec crypto tunnel between a Cisco Catalyst 9300X and an AWS Digital Non-public Cloud (VPC). We are able to additionally provision extra assets throughout the cloud and configure extra options on our Catalyst 9300X all on the similar time.
- An execution plan file defines the supplier and assets. It’s written in HashiCorp Configuration Language (HCL), much like JSON, and saved with a .tf extension.
- A supplier is a plugin to make a set of assets accessible.
- A useful resource (or infrastructure useful resource) describes a number of infrastructure objects managed by Terraform. With the IOS XE Terraform supplier, assets might be thought of the identical as a configurable function.
Utilizing the IOS XE Terraform Supplier
- Allow RESTCONF on the gadget to organize it to be used with Terraform. The Terraform supplier was constructed by abstracting RESTCONF & YANG into HashiCorp Configuration Language (HCL) to be simply used as a REST API. Due to this fact, RESTCONF is a prerequisite.
System# conf t System(config)# restconf
- Set up Terraform.
$ apt-get set up terraform
- Clone the IOS XE Terraform Supplier GitHub repository.
$ git clone email@example.com:CiscoDevNet/terraform-provider-iosxe.git
Terraform execution plan information are written in HCL, which is similar to JSON. For every useful resource, a JSON mapping reformats the function from CLI to JSON.
Discover examples of JSON mappings and options configuration utilizing the Cisco IOS XE Terraform supplier on GitHub together with options so as to add safety, redundancy, and customary protocols to your community.
Utilizing a function exterior of those listed within the examples on GitHub? Concern not! All options supported by the REST API (extra particularly RESTCONF & YANG) can be prolonged and managed with Terraform by following these steps. This lets you configure options utilizing the IOS XE Terraform supplier.
VLAN Administration with Terraform
On this VLAN instance, we begin with no VLAN 511 configured on our Cisco IOS XE gadget. We discover the terraform.tf file, which has a useful resource to configure VLAN 511. We initialize terraform after which apply the adjustments to our gadget.
Throughout the Terraform execution plan file, we’ve a useful resource to configure VLAN 511 on a Cisco IOS XE gadget:
With useful resource within the Terraform execution plan file, we are able to now initialize Terraform utilizing “terraform init”. After efficiently initializing Terraform, we are able to deploy the adjustments within the Terraform execution plan file to the gadget utilizing “terraform apply -auto-approve.”
Now, we’ve VLAN 511 efficiently configured on our IOS XE gadget! Take a look at the complete tutorial to configure a VLAN and different step-by-step tutorials exhibiting the right way to use the IOS XE Terraform supplier.
The place to go from right here
Terraform expands the Cisco IOS XE ecosystem to permit us to simply handle our community each within the cloud and on-prem. From configuring an IPsec tunnel between the general public cloud and an IOS XE gadget, to enabling and configuring VMs, to provisioning utilizing Cisco vManage and Cisco DNA Heart, Terraform has your again. With Terraform getting into the Cisco IOS XE realm, the probabilities are countless.
Able to get began? Acquire hands-on expertise with Terraform by means of the Cisco DevNet sandbox and studying labs.