OpsCode Chef on Arista EOS switches

Configuring switches can be cumbersome and boring.  At least I find it something  I would really like to automate and make it better available for colleagues.

For coding the infrastructure we have chosen for Opscode Chef and rolled out our own private Chef infrastructure. We can automate an awful lot: roll-out new Hypervisors, applications, configurations, services. But coding the underlay is still something that is in development. Cisco has an integration with OnePK/Chef/Puppet or with an expect script. But what really intrigues me are the implementations that makes directly use of the network Operating System on the device itself. Integrations which allows for off-the-shelve installation of the Chef-client, with or without an additional plugin.

Arista switches can easily be integrated in the Chef deployment and allows for easy central configuration.

Copy the chef client and the Arista devops plugin to the extension on the switch.

arista_devops1


Install the two extensions and verify if they are installed correctly.

arista_devops2

Make sure you have DNS lookup servers configured in the switch configuration. This is needed for the chef-client name resolving otherwise this will fail.

Go to the bash of the switch and create in /persist/local/chef the client.rb and the validation.pem key. A client.rb example can be as follows.

arista_devops3


When this is done, run the chef-client on the switch.

arista_devops4

When everything is correctly configured, no errors and you have a working connection to your chef server the switch will announce himself to chef and upload all the device details.
In this case I created a separate environment ‘mccx_netw’ for the device so everything will be grouped together nicely.

arista_devops5
When selecting the switch you will see all the switch details that chef collected.
 

arista_devops7

Now configure the switch to run chef-client every 10 minutes

arista_devops6
The logs will be put in /mnt/flash/scheduled/chef-client.

Now you can create cookbooks or use the already available one on github to code Arista switches.

https://github.com/aristanetworks/chef-eos

1 Comments

Daniel Clarke
very cool, it would be interesting to see what other switches support the chef client.

Not Published

0/1000 characters
Go Top