-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
318 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
AllCops: | ||
Exclude: | ||
- vendor/**/* | ||
- ruby/**/* | ||
- test/**/* | ||
- files/**/* | ||
- .kitchen/**/* | ||
|
||
AlignParameters: | ||
Enabled: false | ||
Encoding: | ||
Enabled: false | ||
UselessAssignment: | ||
Enabled: false | ||
LineLength: | ||
Max: 300 | ||
MethodLength: | ||
Max: 11 | ||
HashSyntax: | ||
EnforcedStyle: hash_rockets | ||
IfUnlessModifier: | ||
Enabled: false | ||
TrivialAccessors: | ||
ExactNameMatch: true | ||
Style/RegexpLiteral: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,34 @@ | ||
# chef-vxfld | ||
vxfld (https://github.com/CumulusNetworks/vxfld) cookbook for chef | ||
Description | ||
=========== | ||
|
||
This cookbook installs the Cumulus VXLAN BUM flooding suite. | ||
|
||
Requirements | ||
============ | ||
|
||
Chef 11 or higher required (for Chef environment use). | ||
|
||
Platforms | ||
-------- | ||
|
||
* Ubuntu | ||
|
||
License and Author | ||
================== | ||
|
||
Author:: David Wahlstrom (<[email protected]>) | ||
Author:: Jordan Tardif (<[email protected]>) | ||
|
||
Copyright 2015 Dreamhost, LLC | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
default['vxfld']['vxrd']['packages'] = ['vxfld'] | ||
default['vxfld']['vxrd']['svcnode_ip'] = '' | ||
default['vxfld']['vxrd']['src_ip'] = node['ipaddress'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
default['vxfld']['vxsnd']['packages'] = ['vxfld'] | ||
default['vxfld']['vxsnd']['src_ip'] = node['ipaddress'] | ||
default['vxfld']['vxsnd']['peers'] = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name 'vxfld' | ||
maintainer 'DreamHost' | ||
maintainer_email '[email protected]' | ||
license 'Apache 2.0' | ||
description 'Cumulus\'s VXLAN BUM flooding suite.' | ||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) | ||
version '0.1.8' | ||
|
||
recipe 'vxsnd', '' | ||
recipe 'vxrd', '' | ||
|
||
%w( ubuntu debian ).each do |os| | ||
supports os | ||
end | ||
|
||
%w( apt ).each do |dep| | ||
depends dep | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# Cookbook Name:: vxfld | ||
# Recipe:: default | ||
# | ||
# Copyright 2015, Dreamhost LLC | ||
# | ||
# 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. | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# | ||
# Cookbook Name:: vxfld | ||
# Recipe:: vxrd | ||
# | ||
# Copyright 2015, Dreamhost LLC | ||
# | ||
# 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. | ||
# | ||
|
||
node['vxfld']['vxrd']['packages'].each do |p| | ||
package p do | ||
action :upgrade | ||
end | ||
end | ||
|
||
# logs may not go here based on logdest configuration, but at least | ||
# we'll have a directory in place to catch the default configuration | ||
# and follow a relatively normal logging file structure | ||
directory '/var/log/vxfld' do | ||
action :create | ||
owner 'root' | ||
group 'root' | ||
mode '0755' | ||
end | ||
|
||
template '/etc/vxrd.conf' do | ||
source 'vxrd.conf.erb' | ||
owner 'root' | ||
group 'root' | ||
mode '0644' | ||
end | ||
|
||
file '/etc/default/vxrd' do | ||
content 'START=yes' | ||
end | ||
|
||
service 'vxrd' do | ||
supports :status => true, :restart => true | ||
action :enable | ||
subscribes :restart, resources(:template => '/etc/vxrd.conf'), :delayed | ||
node['vxfld']['vxrd']['packages'].each do |p| | ||
subscribes :restart, resources(:package => p), :delayed | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# | ||
# Cookbook Name:: vxfld | ||
# Recipe:: vxsnd | ||
# | ||
# Copyright 2015, Dreamhost LLC | ||
# | ||
# 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. | ||
# | ||
|
||
node['vxfld']['vxsnd']['packages'].each do |p| | ||
package p do | ||
action :upgrade | ||
end | ||
end | ||
|
||
package node['vxfld']['vxsnd']['packages'] do | ||
action :upgrade | ||
end | ||
|
||
# logs may not go here based on logdest configuration, but at least | ||
# we'll have a directory in place to catch the default configuration | ||
# and follow a relatively normal logging file structure | ||
directory '/var/log/vxfld' do | ||
action :create | ||
owner 'root' | ||
group 'root' | ||
mode '0755' | ||
end | ||
|
||
template '/etc/vxsnd.conf' do | ||
source 'vxsnd.conf.erb' | ||
owner 'root' | ||
group 'root' | ||
mode '0644' | ||
end | ||
|
||
file '/etc/default/vxsnd' do | ||
content 'START=yes' | ||
end | ||
|
||
service 'vxsnd' do | ||
supports :status => true, :restart => true | ||
action :enable | ||
subscribes :restart, resources(:template => '/etc/vxsnd.conf'), :delayed | ||
node['vxfld']['vxsnd']['packages'].each do |p| | ||
subscribes :restart, resources(:package => p), :delayed | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
[common] | ||
# Log level is one of DEBUG, INFO, WARNING, ERROR, CRITICAL | ||
loglevel = DEBUG | ||
|
||
# Destination for log message. Can be a file name, 'stdout', or 'syslog' | ||
logdest = stdout | ||
|
||
# log file size in bytes. Used when logdest is a file | ||
#logfilesize = 512000 | ||
|
||
# maximum number of log files stored on disk. Used when logdest is a file | ||
#logbackupcount = 14 | ||
|
||
# The file to write the pid. If using monit, this must match the one | ||
# in the vxrd.rc | ||
#pidfile = /var/run/vxrd.pid | ||
|
||
# The file name for the unix domain socket used for mgmt. | ||
#udsfile = /var/run/vxrd.sock | ||
|
||
# UDP port for vxfld control messages | ||
#vxfld_port = 10001 | ||
|
||
# This is the address to which a vxrd sends control messages for registration | ||
svcnode_ip = <%= node['vxfld']['vxrd']['svcnode_ip'] %> | ||
|
||
# Holdtime (in seconds) for soft state. It's how long the service node waits | ||
# before ageing out an IP address for a VNI. vxrd includes this in the register | ||
# msgs it sends to a vxsnd | ||
#holdtime = 90 | ||
|
||
# Local IP address to bind to for receiving control traffic from the snd | ||
src_ip = <%= node["vxfld"]["vxrd"]["src_ip"] %> | ||
|
||
[vxrd] | ||
# Number of times to refresh within the hold time. The higher this number | ||
# the more lost UDP refresh messages can be tolerated | ||
#refresh_rate = 3 | ||
|
||
# Seconds to poll the system for current VXLAN membership | ||
#config_check_rate = 5 | ||
|
||
# Enable self replication | ||
# Note: Use true, or on, for True and 0, no, false, or off, | ||
# for False | ||
head_rep = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[common] | ||
# Log level is one of DEBUG, INFO, WARNING, ERROR, CRITICAL | ||
loglevel = DEBUG | ||
|
||
# Destination for log message. Can be a file name, 'stdout', or 'syslog' | ||
logdest = stdout | ||
|
||
# log file size in bytes. Used when logdest is a file | ||
#logfilesize = 512000 | ||
|
||
# maximum number of log files stored on disk. Used when logdest is a file | ||
#logbackupcount = 14 | ||
|
||
# The file to write the pid. If using monit, this must match the one | ||
# in the vxsnd.rc | ||
#pidfile = /var/run/vxsnd.pid | ||
|
||
# The file name for the unix domain socket used for mgmt. | ||
#udsfile = /var/run/vxsnd.sock | ||
|
||
# UDP port for vxfld control messages | ||
#vxfld_port = 10001 | ||
|
||
# This is the address to which registration daemons send control messages for | ||
# registration and/or BUM packets for replication | ||
#svcnode_ip = 0.0.0.0 | ||
|
||
# Holdtime (in seconds) for soft state. It is used when sending a | ||
# register msg to peers in response to learning a <vni, addr> from a | ||
# VXLAN data pkt | ||
#holdtime = 90 | ||
|
||
# Local IP address to bind to for receiving inter-vxsnd control traffic | ||
src_ip = <%= node["vxfld"]["vxsnd"]["src_ip"] %> | ||
|
||
[vxsnd] | ||
# Space separated list of IP addresses of vxsnd to share state with | ||
svcnode_peers = <%= node["vxfld"]["vxsnd"]["peers"] %> | ||
|
||
# When set to true, the service node will listen for vxlan data traffic | ||
# Note: Use 1, yes, true, or on, for True and 0, no, false, or off, | ||
# for False | ||
enable_vxlan_listen = true | ||
|
||
# When set to true, the svcnode_ip will be installed on the loopback | ||
# interface, and it will be withdrawn when the vxsnd is no longer in | ||
# service. If set to true, the svcnode_ip configuration | ||
# variable must be defined. | ||
# Note: Use 1, yes, true, or on, for True and 0, no, false, or off, | ||
# for False | ||
#install_svcnode_ip = false | ||
|
||
# Seconds to wait before checking the database to age out stale entries | ||
#age_check = 90 | ||
# | ||
|
||
vxlan_listen_port = 4789 | ||
vxlan_dest_port = 4789 |