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

quagga (14) Versions 0.3.7

Generic Quagga cookbook

Policyfile
Berkshelf
Knife
cookbook 'quagga', '= 0.3.7', :supermarket
cookbook 'quagga', '= 0.3.7'
knife supermarket install quagga
knife supermarket download quagga
README
Dependencies
Changelog
Quality 43%

Build Status
Code Climate
GitHub version

Description

This is a fork of https://github.com/ooyala/quagga-cookbook. The functionality here is much different, and this cookbook is not backwards comptaible.

This cookbook provides an interface via attributes to serveral Quagga daemons. It's written with
the intention of deploying Quagga on Cumulus switches, and managing
router configuration as code.

This cookbook currently supports the following daemons:

  • BGP
  • OSPF
  • Zebra

Requirements

Tested on:
* Cumulus Linux 1.5.3
* Cumulus Linux 2.5.11
* Ubuntu 14.04

Attributes

NOTE! Where you see "String or Array" for type, a String may be used only for single values. Use
an Array of Strings for multiple values.

General

Attribute Description Type Default
node[:quagga][:router_id] Router-id to use for all protocols. This is superseded by protocol-specific router-ids, if they are defined. String nil
node[:quagga][:enable_reload] Must be true in to enable reloading the quagga service (only applies to certain versions). Boolean true
node[:quagga][:max_instances] Sets /etc/defaults/quagga "MAX_INSTANCES" value. Integer 5
node[:quagga][:integrated_vtysh_config] Must be set to true in order to reload quagga (vs restart) on config changes. Details here and here. Boolean false
node[:quagga][:multiple_instance] Must be set to true in order to support multiple routing-instances or vrfs. Supported in Cumulus Linux 2.5.3SE and adopted in Cumulus Linux 3.0. Boolean false

BGP

Attribute Description Type Default
node[:quagga][:bgp] A hash containing the BGP processes and their configuration. Keys are the local ASNs/processes (Integer), values are the data for that process (Hash). Hash {}
node[:quagga][:bgp][$LOCAL_ASN][:router_id] Sets the router-id for this BGP process. String nil
node[:quagga][:bgp][$LOCAL_ASN][:redistribute] Route types to redistribute into BGP (eg: ["connected","ospf"]. String or Array nil
node[:quagga][:bgp][$LOCAL_ASN][:hold_time] BGP hold time (must also set keepalive_interval). Integer nil
node[:quagga][:bgp][$LOCAL_ASN][:keepalive_interval] BGP keepalive interval (must also set hold_time). Integer nil
node[:quagga][:bgp][$LOCAL_ASN][:max_paths] Maximum number of ECMP paths. Integer nil
node[:quagga][:bgp][$LOCAL_ASN][:multipath_relax] Allow for ECMP of different ASNs. Boolean false
node[:quagga][:bgp][$LOCAL_ASN][:neighbors] A hash containing neighbors and their configuration. Keys are the neighbor IPs or group names (String), values are the data for that neighbor or group (Hash). Hash nil
node[:quagga][:bgp][$LOCAL_ASN][:neighbors][$NEIGHBOR][:peer_group] Set to true if this is a peer-group. String nil
node[:quagga][:bgp][$LOCAL_ASN][:neighbors][$NEIGHBOR][:peer_type] The neighbor peer type to use with interface or peer-group. String nil
node[:quagga][:bgp][$LOCAL_ASN][:neighbors][$NEIGHBOR][:remote_as] The remote-as for this neighbor. Integer nil
node[:quagga][:bgp][$LOCAL_ASN][:neighbors][$NEIGHBOR][:connect_timer] Time in seconds between connection attempts. Integer nil
node[:quagga][:bgp][$LOCAL_ASN][:neighbors][$NEIGHBOR][:default_originate] Set to true to advertise a default route to this neighbor. Boolean false
node[:quagga][:bgp][$LOCAL_ASN][:neighbors][$NEIGHBOR][:default_originate_map] The name of the route-map to use with default-originate. String nil
node[:quagga][:bgp][$LOCAL_ASN][:neighbors][$NEIGHBOR][:peer_group_range] The IP range(s) to permit for this group (BGP Dynamic Neighbors). String or Array nil
node[:quagga][:bgp][$LOCAL_ASN][:neighbors][$NEIGHBOR][:soft_reconfig_in] Enable soft-reconfiguration-inbound (to enable dispaly of received routes). Boolean false
node[:quagga][:bgp][$LOCAL_ASN][:neighbors][$NEIGHBOR][:prefix_list_in] Name of the prefix-list to use for filtering incoming routes. String nil
node[:quagga][:bgp][$LOCAL_ASN][:neighbors][$NEIGHBOR][:prefix_list_out] Name of the prefix-list to use for filtering outgoing routes. String nil
node[:quagga][:bgp][$LOCAL_ASN][:neighbors][$NEIGHBOR][:route_map_in] Name of the route-map to use for filtering incoming routes. String nil
node[:quagga][:bgp][$LOCAL_ASN][:neighbors][$NEIGHBOR][:route_map_out] Name of the route-map to use for filtering outgoing routes. String nil
node[:quagga][:bgp][$LOCAL_ASN][:address_family] A hash containing address families and their configuration. Keys are the family-type names (String), values are the data for that family (Hash). Hash nil
node[:quagga][:bgp][$LOCAL_ASN][:address_family][$FAMILY][:redistribute] Route types to redistribute into BGP (eg: ["connected","ripng","ospf6"]. String or Array nil
node[:quagga][:bgp][$LOCAL_ASN][:address_family][$FAMILY][:max_paths] Maximum number of ECMP paths in the address family. Integer nil

OSPF

Attribute Description Type Default
node[:quagga][:ospf][:router_id] Sets the router-id for OSPF. String nil
node[:quagga][:ospf][:redistribute] Route types to redistribute into OSPF (eg: ["connected","bgp"]. String or Array []
node[:quagga][:ospf][:passive_default] Set passive-interface default (Active interfaces must be defined). needs tests Boolean true
node[:quagga][:ospf][:passive_ints] Names of passive interfaces. String or Array nil
node[:quagga][:ospf][:areas] A Hash containing areas and their configurations. Keys are the area IDs (eg: 0.0.0.0), values are the data for that area. Hash {}
node[:quagga][:ospf][:areas][$AREA][:networks] Networks to include in the area. String or Array nil
node[:quagga][:ospf][:networks] needs description & tests. String or Array []

OSPF6

Attribute Description Type Default
node[:quagga][:ospf6][:router_id] Sets the router-id for OSPF. String nil
node[:quagga][:ospf6][:redistribute] Route types to redistribute into OSPF (eg: ["connected","bgp"]. String or Array []
node[:quagga][:ospf6][:areas] A Hash containing areas and their configurations. Keys are the area IDs (eg: 0.0.0.0), values are the data for that area. Hash {}
node[:quagga][:ospf6][:areas][$AREA][:interfaces] Interfaces to include in the area. String or Array nil
node[:quagga][:ospf6][:networks] needs description & tests. String or Array []

Prefix Lists

Attribute Description Type Default
node[:quagga][:prefix_lists] A hash containing all of the prefix-lists to configure in quagga. Keys are the prefix-list names, values are hashes filled with the entries. Hash {}
node[:quagga][:prefix_lists][$LIST] A hash containing all of the entries in a particular $LIST. Keys are sequence numbers, values are hashes filled with the details of the entry. Hash {}
node[:quagga][:prefix_lists][$LIST][$SEQ][:prefix] The prefix affected by this rule (must be x.x.x.x/x). If left out, rule will match any prefix String any
node[:quagga][:prefix_lists][$LIST][$SEQ][:ge] The minimum prefix length to accept (eg: 24) Integer nil
node[:quagga][:prefix_lists][$LIST][$SEQ][:le] The maximum prefix length to accept (eg: 24) Integer nil
node[:quagga][:prefix_lists][$LIST][$SEQ][:action] The action to take (either 'permit' or 'deny'). String nil

Route Maps

Attribute Description Type Default
node[:quagga][:route_maps] A hash containing all of the route-maps to configure in quagga. Keys are the route-map names, values are hashes filled with the entries. Hash {}
node[:quagga][:route_maps][$MAP] A hash containing all of the entries in a particular $MAP. Keys are sequence numbers, values are hashes filled with the details of the entry. Hash {}
node[:quagga][:route_maps][$MAP][$SEQ][:action] The action to take (either 'permit' or 'deny'). String nil
node[:quagga][:route_maps][$MAP][$SEQ][:set] A hash containing all the actions to set when mapping the route (must be a identified below). If left out the rule will not do anything Hash {}
node[:quagga][:route_maps][$MAP][$SEQ][:set][:aggregator] The aggregator AS as well as the aggregator IP address Hash {}
node[:quagga][:route_maps][$MAP][$SEQ][:set][:aggregator] Hash containing the aggregator AS and IP address Hash {}
node[:quagga][:route_maps][$MAP][$SEQ][:set][:aggregator][:as] The aggregator AS Integer nil
node[:quagga][:route_maps][$MAP][$SEQ][:set][:aggregator][:ip] The aggregator IP address String nil
node[:quagga][:route_maps][$MAP][$SEQ][:set][:local_preference] The local prefernce to set on the route Integer nil

Static Routes

Attribute Description Type Default
node[:quagga][:static_routes] A hash containing static routes to configure. This will work for ipv4 and ipv6 static routes. Keys are the prefixes, values are the next-hop addresses. Hash nil
node[:quagga][:static_routes][$ROUTE] The next-hop address for given $ROUTE String any

Multiple Routing Instances (VRFs)

Attribute Description Type Default
node[:quagga][:multiple_instance] Must be set to true in order to support multiple routing-instances or vrfs. Supported in Cumulus Linux 2.5.3SE and adopted in Cumulus Linux 3.0. Boolean false
node[:quagga][:interfaces][$IF_NAME] The interface you wish to assign to a routing table followed by a specific table. Array nil
node[:quagga][:bgp][$LOCAL_ASN][:neighbors] A hash containing neighbors and their configuration. Local ASN need to have the table specified. Keys are the neighbor IPs or group names followed by (String) values for that neighbor or group (Hash). Hash nil
node[:quagga][:static_routes][$ROUTE] A hash, with a specified table, containing static routes to configure. Keys are the prefixes, values are the next-hop addresses. Hash nil

Usage

Simply set the desired attributes (see Attributes section above) then call the proper recipe (quagga::bgpd, quagga::ospfd). There is also a provider for zebra, but no recipe as of yet.

BGP Example

The following example will create BGP process 64512 with dynamic neighbors. Devices in the 10.0.0.0/8 range ('hosts' peer-group) will be able to peer with this process. A regular neighbor 192.168.52.1 is configured here also. Neighbors in the group and the normal neighbor will receive a default route when peered with this instance.

node.set[:quagga][:bgp]['64512'][:log_neighbor_changes] = true
node.set[:quagga][:bgp]['64512'][:neighbors]['hosts'][:remote_as] = 64512
node.set[:quagga][:bgp]['64512'][:neighbors]['hosts'][:default_originate] = true
node.set[:quagga][:bgp]['64512'][:neighbors]['hosts'][:peer_group] = true
node.set[:quagga][:bgp]['64512'][:neighbors]['hosts'][:peer_group_range] = '10.0.0.0/8'
node.set[:quagga][:bgp]['64512'][:neighbors]['192.168.52.1'][:remote_as] = 64512
node.set[:quagga][:bgp]['64512'][:neighbors]['192.168.52.1'][:default_originate] = true

include_recipe 'quagga::bgpd'

Unnumbered BGPv6 Example

The following example will create BGP process 64511 with unnumbered neighbors. We are also required to set the address family when working with these interfaces.

node.set[:quagga][:bgp]['64511'][:neighbors]['swp1'][:peer_type] = 'interface'
node.set[:quagga][:bgp]['64511'][:neighbors]['swp1'][:remote_as] = 64512
node.set[:quagga][:bgp]['64511'][:neighbors]['swp1'][:soft_reconfig_in] = true
node.set[:quagga][:bgp]['64511'][:neighbors]['swp1'][:ipv6] = true
node.set[:quagga][:bgp]['64511'][:address_family]['ipv6'] = {}

include_recipe 'quagga::bgpd'

OSPF Example

The following example will create an OSPF area 0, with quagga reload enabled and an OSPF-specific router-id. All interfaces with addresses in 10.0.0.0/8 will actively participate in OSPF, except for the ones explicitly listed as :passive_ints.

node.set[:quagga][:integrated_vtysh_config] = true
node.set[:quagga][:ospf][:router-id] = 10.0.0.1
node.set[:quagga][:ospf][:passive_default] = false
node.set[:quagga][:ospf][:areas][0.0.0.0][:networks] = '10.0.0.0/8'
node.set[:quagga][:ospf][:passive_ints] = ['lo', 'br-access']

include_recipe 'quagga::ospfd'

Static Route Example

The following example will create a static route to 10.0.0.0/24 using the next hop of 172.16.1.1

node.set[:quagga][:static_routes]['10.0.0.0/24'] = '172.16.1.1'

include_recipe 'quagga::zebra'

Mutliple Routing-Instaces (VRFs) Example

The following example will create a routing table with a static route, a bgp neighbor and a specific interface all on table 100.

node.set[:quagga][:multiple_instance] = true
node.set[:quagga][:interfaces]['swp1 table 100'] = []
node.set[:quagga][:bgp]['64512 table 100'][:neighbors]['1.1.1.1'][:remote_as] = 64512
node.set[:quagga][:static_routes]['10.0.0.0/24'] = '172.16.1.1 table 100'

Contributing

Any form of contribution is welcome! Feature requests, bug reports, pull requests, whatever!
If you add features, make sure there are tests for them, and if you change any code, make sure
the existing tests all pass before creating a pull request.

Tests are run on a Cumulus VX VM using serverspec.

Testing requirements:
* Vagrant
* VirtualBox

To run the tests (after installing prerequisites):
* bundle install
* rake rubocop
* bundle exec rake integration:vagrant
* foodcritic .

Author and License

Maintainer, Authors and Contributors

Role Individual
Author (pre-0.2) Ooyala Inc.
Maintainer (0.2+) Ian Clark
Contributor James Farr Gomez

Copyright 2014, Ooyala Inc.

Copyright 2015-2017, Contributers

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

0.3.7 (2017-04-28)

Features:

  • Added in support for bgp multipath-relax (@nertwork)

0.3.6 (2017-04-25)

Features:

  • Added in support for multi-path bgp for different address-family routes (@nertwork)

0.3.5 (2017-04-13)

Features:

  • Added in support for ipv6 bgp and static routes (@nertwork)

0.3.4 (2017-02-01)

No changes made just version bump

0.3.3 (2017-02-01)

Features:

  • Added in support for ospf3 or ospfv6 (@nertwork)

0.3.2 (2016-07-11)

Features:

  • Added in support BGP connect_timer (@fzylogic)

0.3.1 (2016-05-18)

Bugfixes:

  • Fixing route_map bug (@nertwork)

0.3.0 (2016-05-18)

Features:

  • Added in support for Travis CI Testing (@nertwork)

  • Added in support for route-mapping (@nertwork)

  • Added in support for CodeClimate (@nertwork)

Bugfixes:

  • Some code cleanup (@nertwork)

0.2.10 (2016-04-20)

No changes made, just a version bump

0.2.9 (2016-04-15)

Bugfixes:

  • fix issues with override attributes and the LWRPs (removed new_resource attribute passing)

0.2.8 (2016-02-22)

Features:

  • add global BGP timer attributes (@floored1585)

0.2.7 (2016-02-18)

Features:

  • add BGP maximum-paths support (@floored1585)

0.2.6 (2016-02-17)

Bugfixes:

  • fix multiple lint issues / improve code consistency (@floored1585)

0.2.4 (2015-11-04)

Features:

  • add Ubuntu 14.04 platform testing (@floored1585)

Bugfixes:

  • remove duplicate service in recipies/default.rb (@floored1585)

0.2.3 (2015-11-02)

Features:

  • add multiple instance support for BGP (@nertwork)
  • add static route tests (@nertwork)
  • add route redistribution support for OSPF (@floored1585)
  • add prefix list support (@floored1585)

Bugfixes:

  • fix style issues (@floored1585)

Collaborator Number Metric
            

0.3.7 failed this metric

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

Contributing File Metric
            

0.3.7 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.3.7 failed this metric

FC017: LWRP does not notify when updated: quagga/providers/bgp.rb:23
FC017: LWRP does not notify when updated: quagga/providers/ospf.rb:23
FC017: LWRP does not notify when updated: quagga/providers/ospf6.rb:23
FC017: LWRP does not notify when updated: quagga/providers/zebra.rb:23
FC059: LWRP provider does not declare use_inline_resources: quagga/providers/bgp.rb:1
FC059: LWRP provider does not declare use_inline_resources: quagga/providers/ospf.rb:1
FC059: LWRP provider does not declare use_inline_resources: quagga/providers/ospf6.rb:1
FC059: LWRP provider does not declare use_inline_resources: quagga/providers/zebra.rb:1
FC066: Ensure chef_version is set in metadata: quagga/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: quagga/metadata.rb:1
FC069: Ensure standardized license defined in metadata: quagga/metadata.rb:1
Run with Foodcritic Version 11.1.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.3.7 passed this metric

No Binaries Metric
            

0.3.7 passed this metric

Testing File Metric
            

0.3.7 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.3.7 passed this metric