Posted on August 28, 2015 11:41 am
 |  Asked by Werner Viljoen
 |  2029 views
RESOLVED
0
0
Print Friendly, PDF & Email

Purpose:

This Ansible playbook allows an administrator to easily configure a Cloud Vision Exchange (CVX) environment as well as configure a Virtual Extensible LAN (VXLAN) between two switches in an environment built using Arista switches, whether they be physical or virtual (vEOS). It is ideally suited for test environments and administrators wanting to test CVX and VXLAN. The playbook can be modified for more complex deployments.

Running the playbook:
From the /etc/ansible directory in the Linux CLI 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 # sudo ansible-galaxy install arista.eos.
  • 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. At the same time you can verify that you have the correct version of the arista.eos roles as at least one is not in version 1.0.0.
    • 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 CLI:
    • (config)# management api http-commands
    • (config)# no shutdown
  • Extract ANSIBLE_CVX_VXLAN.zip under the /etc/ansible directory.Make sure the files are extracted to /etc/ansible directory. Two files are extracted:
    • cvx_vxlan_playbook.yaml
    • cvx_vxlan_variables
  • Modify a hosts file with entries for the switches. This file contains destinations to run the playbook on and can contain switch groupings. The hosts file is automatically created containing examples when Ansible is installed. I use host-names instead of IP Addressing in my examples.
  • Modify the necessary variables in cvx_vxlan_variables file that was extracted.
  • Select the tasks NOT to run by pre-pending with a #. This is at the top of the cvx_vxlan_variables file.
  • Basic knowledge of the open-source Ansible DevOps tool and Linux CLI is preferably required.

While the prerequisites might seem a lot, most part of it is  just ensuring you have a working Ansible server and environment to use DevOps on the switches. Once the environment is prepared you can build customer playbooks for network wide deployment and auditing of configuration (http://ansible-eos.readthedocs.org/en/master/overview.html).

If the playbook runs successfully it should look like this:

[caption id=”attachment_6019″ align=”aligncenter” width=”300″]If the playbook runs successfully it will look something like this If the playbook runs successfully it will look something like this.[/caption]

 

 

Attachments:

Post your Answer

You must be logged in to post an answer.