DevOps Automation can streamline daily operations and eliminate the need to navigate through multiple GUI interfaces to accomplish such routine tasks as house-keeping static routes, VLANs or EPGs.
This Hackathon example is to showcase how we leverage Terraform Cloud, Webex Chatbot and Webhook programming to integrate Cisco Application Centric Infrastructure (ACI), Cisco Firepower Management Center (FMC) and Virtualized Compute infrastructure (VMware in this example) to automate end-to-end Data Center infrastructural provisoning.
The repository is originally developed to be triggered by a Terraform Cloud account to execute planning, cost estimation and then deployment. Therefore, the login credentials to APIC controller as well as such parameters as the target ACI tenant name are defined in "Variables" section of the Terraform Cloud environment. If the code is to be tested in a private Terraform environment, one may have to manually include these parameters in the variable file.
Name | Version |
---|---|
terraform | >= 1.0.4 |
Name | Version |
---|---|
aci | >= 0.7.1 |
fmc | >= 0.1.1 |
vsphere | >= 2.0.2 |
This sample is developed and tested with Cisco ACI 5.2(1g) and Terraform Cloud 1.0.4. However, it is expected to work with Cisco ACI >=4.2 and terraform >=0.13.
A 3-Tier application composing of Web, App and Database Tiers with 2-armed mode Service Graph between App-Tier and Database-Tier is a very typical application profile. This sample serves as a quick reference to create all the necessary components on APIC with Terraform HCL. More complicated applicatioon profiles can be derived from this sample.
End users input parameters such as EPGs, BDs, Contracts, VM names and what-nots will be gathered by a service portal.
The input will be converted into tfvars files to be consumed by Terraform Cloud. The update of these files to GitHub repository will trigger Terraform Cloud to kick-start its processing.
Terraform files (main.tf, variables.tf.json) will be modified and pushed to github repository which is linked to Terraform Cloud. A Terraform Cloud agent on-premise will push the changes to the APIC controller, the Firepower Management Center and the hypervisor controller.
A Webhook application will be notified by Terraform Cloud on the change request. This webhook will call Webex Chatbot to formulate an actionable message and post it on the webex team room for attention and follow-up. Once the approver has approved or denied the change request, the webhook will trigger Terraform to continue run or discard the change request. It will also delete the webex actionable message and post another confirmation message as record.
All terraform variables in this use case are around the 3-tier application sample. It can be modified to cater for any application profile or scenario.
To provision:
To destroy:
Owner
Contributors
Categories
CollaborationData CenterSecurityProducts
Application Centric Infrastructure (ACI)Secure FirewallWebexProgramming Languages
HCLLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community