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

systemd_networkd (11) Versions 0.3.0

Configures systemd_networkd

Policyfile
Berkshelf
Knife
cookbook 'systemd_networkd', '~> 0.3.0', :supermarket
cookbook 'systemd_networkd', '~> 0.3.0'
knife supermarket install systemd_networkd
knife supermarket download systemd_networkd
README
Dependencies
Changelog
Quality 17%

systemd_networkd Cookbook

This cookbook is responsible for configuring systemd-networkd.
A modified version of systemd networkd is required.

This can be found @ https://github.com/Intel-Corp/systemd

Requirements

  • systemd - systemd_networkd requires systemd > 216

Attributes

All keys are case sensitive. CamelCase is used instead of underscore.

Recipes

  • default: sets up directories and deletes old configurations
  • cpuport: configures attributes specific to cpu port
  • link: configures port state and port speed
  • static_mac_table: confgures the static MAC table (FDB)
  • switchport: configures port attributes
  • team: configures LAGs and LAG-specific features (e.g. LAG attributes)
  • ufd: configures uplink failure detection
  • backup: copies pre-requisities for backup tool - see below for ussage

Usage

Just include systemd_networkd in your node's run_list:
Below is a fully working example of the relevant configuration options.

{                                                                                                        
  "name": "IES",                                                                                          
  "description": "Default role",                                                                         
  "run_list": [
    "recipe[systemd_networkd]"
  ],
  "default_attributes": {                         
    "SystemdNetworkd": {
      "Backup": false,
      "Teams": {
        "team1": {
          "Enabled": true,
          "Members": [
            "sw0p9",
            "sw0p10"
          ],
          "Attributes": {
            "DefVlan2": "1"
          },
          "Vlans": {
            "lab": {
              "Id": "20",
              "EgressUntagged": "true",
              "Pvid" : "true"
            },
            "office": {
              "Id": "25"
            }
          }
        }
      },
      "UFD": {
        "sw0p1": {
          "Enabled": true,
          "BindCarrier": "sw0p2 sw0p3"
        },
        "sw0p5": {
          "Enabled": true,
          "BindCarrier": "sw0p6 sw0p7 sw0p8 sw0p9"
        }
      },
      "Ports": {
        "sw0p0": {
          "Attributes": {
            "LagMode": "1"
          },
          "L2HashKey": {
            "UseL3Hash": "1"
          },
          "L3HashConfig": {
            "UseTcp": "1"
          }
        },
        "sw0p4": {
          "Enabled": true,
          "FDB": [
            [
              "MACAddress",
              "AB:BC:CC:00:01:02",
              "VLANId",
              "2"
            ],
            [
              "MACAddress",
              "AB:BC:CC:00:01:02",
              "VLANId",
              "2"
            ],
            [
              "MACAddress",
              "AB:BC:CC:00:01:02",
              "VLANId",
              "3"
            ]
          ],
          "Attributes": [
            [
              "Autoneg",
              "1"
            ]
          ]
        },
        "sw0p5": {
          "Enabled": "false",
          "FDB": [
            [
              "MACAddress",
              "AB:BC:CC:00:01:02",
              "VLANId",
              "2"
            ],
            [
              "MACAddress",
              "AB:BC:CC:00:01:03",
              "VLANId",
              "2"
            ],
            [
              "MACAddress",
              "AB:BC:CC:00:01:03",
              "VLANId",
              "3"
            ]
          ],
          "Link": {
            "Link": [
              [
                "Duplex",
                "full"
              ],
              [
                "BitsPerSecond",
                "10240000"
              ]
            ]
          }
        },
        "sw0p6": {
          "Enabled": true,
          "FDB": [
            [
              "MACAddress",
              "AB:BC:CC:00:01:01",
              "VLANId",
              "2"
            ],
            [
              "MACAddress",
              "AB:BC:CC:00:01:01",
              "VLANId",
              "2"
            ],
            [
              "MACAddress",
              "AB:BC:CC:00:01:01",
              "VLANId",
              "3"
            ]
          ],
          "Vlans": {
            "lab": {
              "Id": "20",
              "EgressUntagged": "true"
            },
            "office": {
              "Id": "25"
            }
          }
        }
      }
    }
  }
}

Backup Tool and Usage

2 Methods of runing the backup or dumping the memory resident configuration

There are 2 files in systemd_networkd/files/default

1) cfgdump.rb 
   Copied to /usr/bin/cfgdump
2) intel_switch.rb 
   Copied to /opt/chef/embedded/apps/ohai/lib/ohai/plugins/intel/intel_switch.rb

Method 1 (Chef Server):
On the chef workstation, modify the configuration to include a key "Backup": true under "SystemdNetworkd".
You will need the cookbook "ohai" and copy the intel_switch plugin to the cookbooks/ohai/files/ directory.
Running the chef-client on the node will result in /etc/systemd/network/backup/XXXX being created.

Method 2 (Solo):
You should clone your working copy of the chef repo to a node.
Copy the ohai plugin to /opt/chef/embedded/apps/ohai/lib/ohai/plugins/intel/intel_switch.rb 
Copy the cfgdump.rb to /usr/bin/cfgdump
Execute cfgdump

License and Authors

Authors:
- David O Neill (david.m.oneill@intel.com)

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

systemd_networkd CHANGELOG

0.2.9

  • Added support for Learning attribute modification on lag device

0.2.8

  • Added support for Link section within LAG interface configuration
  • Removed port number retriction
  • Clean up inconsistent entries in sysfs/networkd/chef
    Cross checked systemd-network against chef and updated accordingly
  • Added VLAN section for sw0p0
  • Fixed RateLimit missing check in if statement
  • Fix for incrroect key CpuRateLimt shoud be RateLimit
  • Add rxprioritymap back to cpu qos attrs
  • fixes for rate limiting on all ports
  • Added support for pvid attribute.

0.2.7

  • Added the ohai plugin - This should be copied using the ohai cookbook
  • Fixed bug in folder creation

0.2.6

  • Readme cleanup

0.2.5

  • More Food critic fixes

0.2.4

  • More Food critic fixes
  • Changes in GIT repository location on github

0.2.3

  • Readme and Food critics

0.2.2

  • Numerous food critic fixes

0.2.1

  • Added backup support
  • fixed deprecations chef 11 - chef 12

0.2.0

  • Cookbook redesign
  • One cookbook for systemd_networkd configuration

0.1.3 (2015-04-01)

  • Added uplink failure detection (UFD) support
  • Added support for QOS attributes
  • Added supuport configuration options

0.1.2 (2015-03-01)

  • Added Team support
  • Added vlan support for switchports

0.1.1 (2015-02-01)

  • Added frame forwarding database (FDB / static mac table) support
  • Added switchport support and port attributes

0.1.0 (2015-01-01)

  • Initial release of systemd_networkd

Collaborator Number Metric
            

0.3.0 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.0 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.0 failed this metric

FC033: Missing template file: systemd_networkd/recipes/cpuport.rb:32
FC033: Missing template file: systemd_networkd/recipes/link.rb:37
FC033: Missing template file: systemd_networkd/recipes/link.rb:49
FC033: Missing template file: systemd_networkd/recipes/static_mac_table.rb:32
FC033: Missing template file: systemd_networkd/recipes/switchport.rb:32
FC033: Missing template file: systemd_networkd/recipes/team.rb:24
FC033: Missing template file: systemd_networkd/recipes/team.rb:35
FC033: Missing template file: systemd_networkd/recipes/team.rb:47
FC033: Missing template file: systemd_networkd/recipes/team.rb:61
FC033: Missing template file: systemd_networkd/recipes/ufd.rb:27
FC064: Ensure issues_url is set in metadata: systemd_networkd/metadata.rb:1
FC066: Ensure chef_version is set in metadata: systemd_networkd/metadata.rb:1
FC069: Ensure standardized license defined in metadata: systemd_networkd/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.3.0 passed this metric

Testing File Metric
            

0.3.0 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.0 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 include a tag that matches this cookbook version number