OpsCode Chef on Arista EOS switchesEdwin Beekman
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.
Install the two extensions and verify if they are installed correctly.
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.
When this is done, run the chef-client on the switch.
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.
When selecting the switch you will see all the switch details that chef collected.
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.