vagrant-clusterfuck 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cba58d5d4d165c18113081ff30076ede950e7af4
|
4
|
+
data.tar.gz: f4f48a7daa02d37d0575bd4a9eb71b4618cdf2e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6146382c4282742cb969dd155d1958aa688284b14727ea7ede7710ea51fc3a79c6d2dfc445890e72739b870d39391375cf7fa0038b76de2b2e3770b01d3743b
|
7
|
+
data.tar.gz: fe2838fb2e8e943205b99c15b143d03cafe0a3726353e93427064ba87e71b45b4e4164dd7e547b1e1d126164f400083b7b28dc6ae2654f2a8646ab5478142818
|
data/cluster.rb
CHANGED
@@ -31,7 +31,7 @@ host11 = Machine.new(:host11, routes: spine.bgp_announce, gateway: leaf1)
|
|
31
31
|
# A BGPPeer is just a machine with BGP information so that its BGP neighbours
|
32
32
|
# will automatically add it as a BGP peer. This is for a node to run e.g.
|
33
33
|
# ExaBGP.
|
34
|
-
host21 =
|
34
|
+
host21 = ExaBGPPeer.new(:host21, routes: spine.bgp_announce, gateway: leaf2)
|
35
35
|
host22 = Machine.new(:host22, routes: spine.bgp_announce, gateway: leaf2)
|
36
36
|
|
37
37
|
# The spines and leaves have their own subnets
|
@@ -20,11 +20,11 @@ module Clusterfuck
|
|
20
20
|
destination: "/tmp/quagga/daemons"
|
21
21
|
|
22
22
|
box.vm.provision :file,
|
23
|
-
source:
|
23
|
+
source: tmp_bgp_config("../../../templates/quagga.zebra.conf.erb"),
|
24
24
|
destination: "/tmp/quagga/zebra.conf"
|
25
25
|
|
26
26
|
box.vm.provision :file,
|
27
|
-
source: tmp_bgp_config,
|
27
|
+
source: tmp_bgp_config("../../../templates/quagga.bgpd.conf.erb"),
|
28
28
|
destination: "/tmp/quagga/bgpd.conf"
|
29
29
|
|
30
30
|
box.vm.provision :shell, inline: <<-EOS
|
@@ -42,24 +42,20 @@ EOS
|
|
42
42
|
|
43
43
|
private
|
44
44
|
# TODO clean up these messy functions
|
45
|
-
def tmp_zebra_config
|
46
|
-
File.expand_path("../../../templates/quagga.zebra.conf", __FILE__)
|
47
|
-
end
|
48
|
-
|
49
45
|
def tmp_daemons_config
|
50
46
|
File.expand_path("../../../templates/quagga.daemons", __FILE__)
|
51
47
|
end
|
52
48
|
|
53
|
-
def tmp_bgp_config
|
49
|
+
def tmp_bgp_config(template)
|
54
50
|
temp = Tempfile.new("routes")
|
55
51
|
ObjectSpace.undefine_finalizer(temp) # finalizer removes it, nthx
|
56
|
-
temp.write(bgp_config)
|
52
|
+
temp.write(bgp_config(template))
|
57
53
|
temp.flush
|
58
54
|
temp.path
|
59
55
|
end
|
60
56
|
|
61
|
-
def bgp_config
|
62
|
-
path = File.expand_path(
|
57
|
+
def bgp_config(template)
|
58
|
+
path = File.expand_path(template, __FILE__)
|
63
59
|
ERB.new(File.read(path)).result(binding)
|
64
60
|
end
|
65
61
|
end
|
data/lib/clusterfuck/version.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
!
|
3
3
|
! BGPd configuration file
|
4
4
|
!
|
5
|
-
hostname
|
5
|
+
hostname <%= name %>-bgp
|
6
6
|
password zebra
|
7
7
|
!enable password please-set-at-here
|
8
8
|
!
|
@@ -21,7 +21,7 @@ router bgp <%= bgp_asn %>
|
|
21
21
|
neighbor <%= node.ip_in_same_subnet(self) %> next-hop-self
|
22
22
|
neighbor <%= node.ip_in_same_subnet(self) %> advertisement-interval 1
|
23
23
|
<% end %>
|
24
|
-
|
24
|
+
|
25
25
|
ip community-list standard cm-prefmod-300 permit 65534:300
|
26
26
|
ip community-list standard cm-prefmod-200 permit 65534:200
|
27
27
|
ip community-list standard cm-prefmod-100 permit 65534:100
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-clusterfuck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Eskildsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -71,13 +71,14 @@ files:
|
|
71
71
|
- lib/clusterfuck/bgp_peer.rb
|
72
72
|
- lib/clusterfuck/cluster.rb
|
73
73
|
- lib/clusterfuck/core_ext/ipaddr.rb
|
74
|
+
- lib/clusterfuck/exabgp_peer.rb
|
74
75
|
- lib/clusterfuck/machine.rb
|
75
76
|
- lib/clusterfuck/quagga_bgp_router.rb
|
76
77
|
- lib/clusterfuck/subnet_factory.rb
|
77
78
|
- lib/clusterfuck/version.rb
|
78
79
|
- templates/quagga.bgpd.conf.erb
|
79
80
|
- templates/quagga.daemons
|
80
|
-
- templates/quagga.zebra.conf
|
81
|
+
- templates/quagga.zebra.conf.erb
|
81
82
|
- templates/routes.sh.erb
|
82
83
|
- test/bgp_network_test.rb
|
83
84
|
- test/bgp_peer_test.rb
|
@@ -105,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
106
|
version: '0'
|
106
107
|
requirements: []
|
107
108
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
109
|
+
rubygems_version: 2.4.5
|
109
110
|
signing_key:
|
110
111
|
specification_version: 4
|
111
112
|
summary: Clusterfuck lets you fuck with clusters
|