~ubuntu-branches/ubuntu/natty/nova/natty

« back to all changes in this revision

Viewing changes to contrib/puppet/templates/haproxy.cfg.erb

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short, Chuck Short, Soren Hansen, Thierry Carrez
  • Date: 2011-02-18 09:36:22 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20110218093622-w13dzywbd7vq2qh7
Tags: 2011.2~bzr700-0ubuntu1
[ Chuck Short ]
* New upstream version.

[ Soren Hansen ]
* Rely on --logdir to find and use the correct logfile.
* Remove the postrotate magic for all but nova-objectstore. It is not
  needed anymore due to using RotatingFileHandler for logging.

[ Thierry Carrez ]
* Ship adminclient in a separate package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# this config needs haproxy-1.1.28 or haproxy-1.2.1
 
2
 
 
3
global
 
4
    log 127.0.0.1    local0
 
5
    log 127.0.0.1    local1 notice
 
6
    #log loghost    local0 info
 
7
    maxconn 4096
 
8
    #chroot /usr/share/haproxy
 
9
    stats socket /var/run/haproxy.sock
 
10
    user haproxy
 
11
    group haproxy
 
12
    daemon
 
13
    #debug
 
14
    #quiet
 
15
 
 
16
defaults
 
17
    log    global
 
18
    mode    http
 
19
    option    httplog
 
20
    option    dontlognull
 
21
    retries    3
 
22
    option redispatch
 
23
    stats enable
 
24
    stats uri /haproxy
 
25
    maxconn    2000
 
26
    contimeout    5000
 
27
    clitimeout    50000
 
28
    srvtimeout    50000
 
29
 
 
30
 
 
31
listen    nova-api 0.0.0.0:8773
 
32
    option httpchk GET / HTTP/1.0\r\nHost:\ example.com
 
33
    option forwardfor
 
34
    reqidel ^X-Forwarded-For:.*
 
35
    balance    roundrobin
 
36
<% api_servers.to_i.times do |offset| %><% port = api_base_port.to_i + offset -%>
 
37
    server    api_<%= port %> 127.0.0.1:<%= port %> maxconn 1 check 
 
38
<% end -%>
 
39
    option    httpclose        # disable keep-alive