Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

eos (6) Versions 1.0.1

Manage Arista EOS device running-config

Policyfile
Berkshelf
Knife
cookbook 'eos', '= 1.0.1', :supermarket
cookbook 'eos', '= 1.0.1'
knife supermarket install eos
knife supermarket download eos
README
Dependencies
Changelog
Quality 0%

eos Cookbook for Arista EOS

The eos cookbook simplifies management of Arista EOS
network devices. Arista EOS uses the standard el6 32-bit Chef client. By
including the eos::default recipe in your runlist, it will perform the
following actions needed on EOS:
- Relocate /etc/chef to /persist/sys/chef with a symlink back to /etc/chef
- Enable eAPI (‘management api http-commands’) with unix-sockets as the
transport in the running-config
- Add/enhances several ohai plugins

Requirements

This cookbook is designed and tested with Chef 12 and EOS 4.15 and 4.16. Other
versions are likely to work but are not fully tested at this time.

  • Arista EOS 4.15 or greater
  • Chef client 32-bit RPM for RedHat/CentOS/el
  • Arista Ruby client for eAPI (rbeapi) rubygem and dependencies:
    • rbeapi 1.0 or greater which requires:
      • netaddr
      • net_http_unix
      • inifile

Installing

Installing Chef on an Arista switch requires the steps below. While the
manual steps are displayed, below, for reference, it is suggested to use a tool
such as Arista’s CloudVision or ZTP Server to take advantage of the zero-touch
provisioning capability of Arista devices to load a desired EOS version,
additional packages, and a base config, automatically.

  • Download the Chef client for RedHat/CentOS (32-bit)
  • Copy the rpm to the switch.

    Arista#copy http://my_server/path/chef-12.6.0-1.el6.i386.rpm extension:
    
  • Install the RPM:

    Arista#extension chef-12.6.0-1.el6.i386.rpm
    
  • Configure EOS to install the chef-client after a reload

    Arista#copy installed-extensions boot-extensions
    
  • Ensure recipe[‘eos’] is in the default runlist for any EOS devices

Installing behind a firewall

By default, the chef_gem resource will reach out to rubygems.org to find the
necessary rubygems. When installing on devices without access to the Internet,
additional steps are required. These, too, should be automated whenever
possible.

One solution is to download the rubygem binaries to the Chef server, then use a
recipe to install those on devices. Example:

Download the rubygem binaries:

gem fetch inifile
gem fetch netaddr
gem fetch net_http_unix
gem fetch rbeapi

Then, create a recipe to copy these files to nodes and install the packages:

cookbook_file “#{Chef::Config[:file_cache_path]}/rbeapi.gem” do
  source ‘rbeapi-1.0.gem’
end
resources(:cookbook_file => “#{Chef::Config[:file_cache_path]}/rbeapi.gem”).run_action(:create)

chef_gem ‘rbeapi’ do
  source “#{Chef::Config[:file_cache_path]}/rbeapi.gem”
  version ‘1.0’
  compile_time false
  action :upgrade
end

NOTE: the chef_gem resource requires the version to be specified when
installing from a local file.

Finally, include that recipe in the EOS device’s default runlist.
recipe[eos::rbeapi_local]

Using

There are 2 general methods to use this cookbook to manage an Arista switch:
Managing the entire config as a whole or using discrete resources. The
eos_switchconfig resource manages the running-config from a template or file.
Discrete resources, such as eos_vlan, provide selective, granular management of
individual components. Eos_switchconfig is the recommended method for most
network teams. However, eos_vlan is provided to serve as an example for
additional discrete resources to be managed, if desired.

eos_switchconfig

eos_switchconfig 'running-config' do
  action :create
  source 'eos_config.erb'
  variables({
    hostname: 'veos01',
    domainname: 'example.com',
    nameservers: ['10.0.2.3'],
    ntp_server: '10.0.2.3',
    ntp_source_intf: 'Management1',
    static_routes: {
      '0.0.0.0/0' => '10.0.2.2'
    },
    l3ports: [
      Ethernet1: {
        ip_addr: '192.168.8.2/24'
      }
    ],
    l2ports: [
      Ethernet2: {},
      Ethernet3: {},
      Ethernet4: {}
    ]
  })
end

For more examples, see the [test recipes](test/cookbooks/eos_test/recipes).

Contributing

Community contributions are welcome. Please ensure all pull-requests include
spec tests. See [CONTRIBUTING](CONTRIBUTING.md) for more detail.

Authors & Support

For support, please open a GitHub issue. This module is maintained by Arista
[EOS+ Consulting Services](mailto://eosplus-dev@arista.com). Commercial support
options are available upon request.

License

All files in this package are covered by the included BSD 3-clause
[license](LICENSE) unless otherwise noted.

Dependent cookbooks

ohai ~> 4.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Change Log

1.0.1 (2016-10-10)

Full Changelog

Merged pull requests:

v1.0 (2016-10-10)

Full Changelog

Implemented enhancements:

Merged pull requests:

0.1.4 (2013-11-26)

  • updated providers to support new attributes in Devops Extension

0.1.3 (2013-09-04)

  • updated provider to use the Devops Extension for EOS

0.1.2 (2013-07-19)

  • fixed bug found with portchannel data bag entries
  • added some additional debug messages to aid with troubleshooting
  • change ohai plugin attributes from default to normal for plugin path
  • fixed minor issue with get_config to find the right attribute

0.1.1 (2013-07-02)

  • fixed bug found in edit_portchannel in lag provider
  • added initial support for ohai
  • added ohai plugin (eos/version)

0.1.0 (2013-07-01)

  • Initial release of eos cookbook
  • Initial release of interface (resource/provider/recipe)
  • Initial release of vlan (resource/provider/recipe)
  • Initial release of switchport (resource/provider/recipe)
  • Initial release of portchannel (resource/provider/recipe)

* This Change Log was automatically generated by github_changelog_generator

Collaborator Number Metric
            

1.0.1 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Foodcritic Metric
            

1.0.1 failed this metric

FC033: Missing template: /tmp/7dee826f6013fd1e4d1b2591/eos/recipes/template.rb:1