haproxy-tools 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.rdoc +16 -12
- data/docs/haproxy-1.5-configuration.txt +12176 -0
- data/lib/haproxy/treetop/config.treetop +1 -1
- data/lib/haproxy/version.rb +1 -1
- data/spec/fixtures/multi-pool.haproxy.cfg +1 -0
- data/spec/fixtures/simple.haproxy.cfg +1 -1
- data/spec/haproxy/parser_spec.rb +7 -2
- metadata +2 -1
data/lib/haproxy/version.rb
CHANGED
@@ -52,3 +52,4 @@ backend logs
|
|
52
52
|
server fake_logger 127.0.0.1:9999 backup
|
53
53
|
server prd_log_1 10.245.174.75:8000 cookie i-prd_log_1 check inter 3000 rise 2 fall 3 maxconn 1000
|
54
54
|
server prd_log_2 10.215.157.10:8000 cookie i-prd_log_2 check inter 3000 rise 2 fall 3 maxconn 1000
|
55
|
+
server prd_log_3 cloudloghost1:8000 cookie i-prd_log_2 check inter 3000 rise 2 fall 3 maxconn 1000
|
@@ -18,6 +18,6 @@ listen http_proxy 55.55.55.55:80
|
|
18
18
|
option forwardfor # This sets X-Forwarded-For
|
19
19
|
|
20
20
|
## Define your servers to balance
|
21
|
-
server web1
|
21
|
+
server web1 dnshost66:80 weight 1 maxconn 512 check
|
22
22
|
server web2 77.77.77.77:80 weight 1 maxconn 512 check
|
23
23
|
server web3 88.88.88.88:80
|
data/spec/haproxy/parser_spec.rb
CHANGED
@@ -12,7 +12,7 @@ describe "HAProxy::Parser" do
|
|
12
12
|
@config.backends.size.should == 2
|
13
13
|
logs_backend = @config.backend('logs')
|
14
14
|
|
15
|
-
logs_backend.servers.size.should ==
|
15
|
+
logs_backend.servers.size.should == 4
|
16
16
|
|
17
17
|
server1 = logs_backend.servers['prd_log_1']
|
18
18
|
server1.name.should == 'prd_log_1'
|
@@ -28,6 +28,11 @@ describe "HAProxy::Parser" do
|
|
28
28
|
server3.name.should == 'prd_log_2'
|
29
29
|
server3.host.should == '10.215.157.10'
|
30
30
|
server3.port.should == '8000'
|
31
|
+
|
32
|
+
server3 = logs_backend.servers['prd_log_3']
|
33
|
+
server3.name.should == 'prd_log_3'
|
34
|
+
server3.host.should == 'cloudloghost1'
|
35
|
+
server3.port.should == '8000'
|
31
36
|
end
|
32
37
|
end
|
33
38
|
|
@@ -74,7 +79,7 @@ describe "HAProxy::Parser" do
|
|
74
79
|
|
75
80
|
server1 = listener.servers['web1']
|
76
81
|
server1.name.should == 'web1'
|
77
|
-
server1.host.should == '
|
82
|
+
server1.host.should == 'dnshost66'
|
78
83
|
server1.port.should == '80'
|
79
84
|
server1.attributes['weight'].should == '1'
|
80
85
|
server1.attributes['maxconn'].should == '512'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haproxy-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Wadsworth
|
@@ -141,6 +141,7 @@ files:
|
|
141
141
|
- TODO
|
142
142
|
- docs/haproxy-1.3-configuration.txt
|
143
143
|
- docs/haproxy-1.4-configuration.txt
|
144
|
+
- docs/haproxy-1.5-configuration.txt
|
144
145
|
- haproxy-tools.gemspec
|
145
146
|
- lib/haproxy-tools.rb
|
146
147
|
- lib/haproxy/config.rb
|