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.2.2

Generic Quagga cookbook

Policyfile
Berkshelf
Knife
cookbook 'quagga', '= 0.2.2', :supermarket
cookbook 'quagga', '= 0.2.2'
knife supermarket install quagga
knife supermarket download quagga
README
Dependencies
Quality 0%

Description

This is a fork of https://github.com/ooyala/quagga-cookbook.

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

Linux (only tested on recent versions of Debian and Ubuntu)

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

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][: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][:remote_as] The remote-as for this neighbor. 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] Set to true if this is a peer-group. 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

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). Boolean true needs tests
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 []

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

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] = 23456
node.set[:quagga][:bgp]['64512'][:neighbors]['192.168.52.1'][:default_originate] = true

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'

Author and License

Original Author Bao Nguyen opensource-cookbooks@ooyala.com

Current Maintainer (0.2.0 onwards) Ian Clark ian@f85.net

Copyright 2014, Ooyala Inc.

Copyright 2015, Ian Clark

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.

Foodcritic Metric
            

0.2.2 failed this metric

FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/bgpd.rb:3
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:1
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:3
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:4
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:6
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:7
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:8
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:9
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:10
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:11
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:12
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:13
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:16
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:17
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:19
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:20
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:21
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/ospfd.rb:3
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/ospfd.rb:4
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/ospfd.rb:5
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/ospfd.rb:6
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/zebra.rb:3
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/zebra.rb:4
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/zebra.rb:5
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/recipes/bgpd.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/recipes/ospfd.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/templates/default/vtysh.conf.erb:3
FC002: Avoid string interpolation where not required: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/providers/bgp.rb:29
FC002: Avoid string interpolation where not required: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/providers/ospf.rb:29
FC002: Avoid string interpolation where not required: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/providers/zebra.rb:28
FC017: LWRP does not notify when updated: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/providers/bgp.rb:23
FC017: LWRP does not notify when updated: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/providers/ospf.rb:23
FC017: LWRP does not notify when updated: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/providers/zebra.rb:21
FC019: Access node attributes in a consistent manner: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:19
FC019: Access node attributes in a consistent manner: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:20
FC019: Access node attributes in a consistent manner: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/attributes/default.rb:21
FC023: Prefer conditional attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/recipes/bgpd.rb:27
FC023: Prefer conditional attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/recipes/ospfd.rb:28
FC023: Prefer conditional attributes: /tmp/cook/23f891d4e24ae8b17dced3c1/quagga/recipes/zebra.rb:13