Comprehensive Example
Nexus-as-Code for Application Centric Infrastructure (ACI) can be used to instantiate ACI fabrics in minutes. A comprehensive example is available at https://github.com/netascode/nac-aci-comprehensive-example.git
.
├── README.md
├── data
│ ├── access_policies.yaml
│ ├── apic.yaml
│ ├── defaults.yaml
│ ├── fabric_policies.yaml
│ ├── node_1101.yaml
│ ├── node_1102.yaml
│ ├── node_2201.yaml
│ ├── node_2202.yaml
│ ├── node_policies.yaml
│ ├── pod_policies.yaml
│ ├── tenant_PROD.yaml
│ ├── tenant_infra.yaml
│ ├── tenant_mgmt.yaml
│ └── vmm_domains.yaml
├── main.tf
This repository contains a full example of provisioning an ACI fabric. This example assumes a clean environment whereby only the initial Application Policy Infrastructure Controller (APIC) configuration has been completed. Should you want to include additional switches, it is recommended to add another node_xxx.yaml
file. One for each additional switch. Also make sure to add the new nodes with their respective Serial Numbers (SNs) to the nodes:
section, starting at line 18 in node_policies.yaml
. An example of adding another leaf switch can be found below:
- id: 103
pod: 1
role: leaf
serial_number: SN-1-103
name: leaf-103
oob_address: 10.51.77.96/24
oob_gateway: 10.51.77.254
update_group: MG1
fabric_policy_group: all-leafs
access_policy_group: all-leafs
For more information on how to use the data model, navigate to the data model section on this page. To learn more about how to use this code, make sure to check out the ACI -> Simple Example. The guide for Continuous Integration / Continuous Development (CI/CD) can also be used for this example code. Whilst the CI/CD example section makes use of the Simple Example (containing a single tenant), this can be replaced with the comprehensive example.
Note that if you do not have an ACI environment available you can leverage the DevNet Sandbox environment. For this scenario is it is recommended to use the reservation sandbox to avoid issues with shared resources. Please refer to the Sandbox section in the menu.
Note that the more resources you add to a single Terraform state file, the longer it takes to calculate actions. It is advised to use multiple backends for when you have a large number of resources to manage. For more information about scaling, please visit the scaling section.