• Ansible playbook for CVX and VXLAN configuration.

 
 
Print Friendly, PDF & Email

Purpose: This playbook allows an administrator to easily configure Cloud Vision Exchange (CVX)  and Virtual Extensible LAN (VXLAN) between two Arista switches. It is ideally suited for test environments and administrators wanting to test CVX and VXLAN functionality. The playbook can be modified for more advanced deployments. Running the playbook: From the cli under the /etc/ansible directory run: ansible-playbook cvx_vxlan_playbook.yaml Prerequisites:

  • An Ansible server (http://docs.ansible.com/ansible/intro_installation.html)
  • arista.eos roles for Ansible v1.0.1. To install run # sudo ansible-galaxy install arista.eos on the Ansible server. Rename the following files under /etc/ansible/roles/arista.eos/library to not have a .py extension i.e eos_config.py becomes eos_config.
    •  # cp eos_config.py eos_config
    •  # cp eos_vlan.py eos_vlan
    •  # cp eos_vxlan.py eos_vxlan
    •  # cp eos_vxlan_vlan.py eos_vxlan_vlan
    •  # cp eos_interface.py eos_interface
    •  # cp eos_ipinterface.py eos_ipinterface
    •  # cp eos_switchport.py eos_switchport
  • Pyeapi (https://eos.arista.com/introducing-the-python-client-for-eapi-pyeapi/)
  • Configure ~/.eapi.conf with entries for the switches. This file contains authentication and transport type information to the switches.
  • Enable eapi on switches via the cli:
    • (config)# management api http-commands
    • (config)# no shutdown
  • Download this attachment:  ANSIBLE_CVX_VXLAN
  • Extract ¨ANSIBLE_CVX_VXLAN.zip¨ under the /etc/ansible directory. Make sure the two files are extracted to the root of /etc/ansible. The files contained in the compressed file are:
    • cvx_vxlan_playbook.yaml
    • cvx_vxlan_variables
  • Modify the hosts file located under /etc/ansible with entries for the switches. This file contains destinations to run the playbook on. The hosts file is automatically created with examples when Ansible gets installed. In my environment I rely on DNS names instead of IP addresses.
  • Modify the necessary variables in the cvx_vxlan_variables file that was extracted.
  • Prepend tasks you which NOT to run e.g. interface configuration with a #. This is at the top of the cvx_vxlan_variables file.
  • Basic knowledge of Ansible  and the Linux cli is is desirable.

While the prerequisites might seem like a lot they are mostly around preparing a DevOps environment for use with Ansible. Once this environment is configured it can easily be used to create additional playbooks for network wide configuration deployment and auditing (http://ansible-eos.readthedocs.org/en/master/overview.html). If the playbook runs successfully it will look something like this: If the playbook runs successfully it will look something like this

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: