Skip to content

How do I use ndfc roles?

Allen Robel edited this page Aug 25, 2022 · 12 revisions

The main playbooks

These create the two fabrics and the MSD fabric and are located in the top-level directory:

Ref Playbook Description
1 example_ndfc_rest_fabric_switch_create_f1.yml creates VXLAN/EVPN fabric f1 without connectivity to an MSD fabric
2 example_ndfc_rest_fabric_switch_create_f2.yml creates VXLAN/EVPN fabric f2 without connectivity to an MSD fabric
3 example_ndfc_rest_fabric_msd_create_with_children.yml creates VXLAN/EVPN fabrics f1 and f2, connecting them through an MSD fabric

Hence, you should use either (1 and 2) OR 3 (which creates 1 and 2, but with MSD connectivity). That is, (1 and 2) are mutually exclusive to 3.

Inventory

The main playbooks read an inventory located in ndfc_common. You'll want to edit this to match the number of leafs, spines, and border gateways in your topology. You'll also change various details of the configuration to suit your requirements here. See ndfc_common/README.md. for details.

Roles used by the main playbooks

Below is a non-exhaustive list of roles used within the the above playbooks.

Role Description
ndfc_device_merged Merge a device into a fabric, given device_name
ndfc_network_replaced_all Replace all networks within a fabric, given fabric_name
ndfc_policy_vrf_rt_import_evpn_loop Import a vrf's route-targets into another vrf on a list of devices, given a list of device_name
ndfc_rest_config_deploy_all NDFC REST API POST calls to config-save and config-deploy for a fabric, given fabric_name
ndfc_rest_fabric_switch_create Create a switch fabric, given fabric_name
ndfc_rest_vpc_create Create a VPC pair, given vpc_name
ndfc_vpc_interface_merged_all Create (merge) all vpc interfaces for a vpc pair, given vpc_name

In the case of MSD, the following roles are used:

Role Description
ndfc_rest_fabric_msd_child_add Add a child fabric to an MSD fabric, given child_fabric, and msd_fabric
ndfc_rest_fabric_msd_create Create a multi-side domain fabric, given msd_fabric

What are the other roles for?

The remaining Roles are either used within the above roles, or provide extra functions such as creating external fabrics and service nodes. Other roles are provided as examples which facilitate various day2 ops, such as deleting a device, rediscovering a device, deleting a fabric, etc.