~gandelman-a/charms/precise/nova-compute/unused_func

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/openstack/templates/haproxy.cfg

  • Committer: James Page
  • Date: 2013-10-15 12:04:13 UTC
  • mfrom: (46.1.83 nova-compute)
  • Revision ID: james.page@canonical.com-20131015120413-grclbw2ot5gbgp5r
Update of all Havana / Saucy / python-redux work:

* Full python rewrite using new OpenStack charm-helpers.

* Test coverage

* Havana support

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
global
 
2
    log 127.0.0.1 local0
 
3
    log 127.0.0.1 local1 notice
 
4
    maxconn 20000
 
5
    user haproxy
 
6
    group haproxy
 
7
    spread-checks 0
 
8
 
 
9
defaults
 
10
    log global
 
11
    mode http
 
12
    option httplog
 
13
    option dontlognull
 
14
    retries 3
 
15
    timeout queue 1000
 
16
    timeout connect 1000
 
17
    timeout client 30000
 
18
    timeout server 30000
 
19
 
 
20
listen stats :8888
 
21
    mode http
 
22
    stats enable
 
23
    stats hide-version
 
24
    stats realm Haproxy\ Statistics
 
25
    stats uri /
 
26
    stats auth admin:password
 
27
 
 
28
{% if units -%}
 
29
{% for service, ports in service_ports.iteritems() -%}
 
30
listen {{ service }} 0.0.0.0:{{ ports[0] }}
 
31
    balance roundrobin
 
32
    option tcplog
 
33
    {% for unit, address in units.iteritems() -%}
 
34
    server {{ unit }} {{ address }}:{{ ports[1] }} check
 
35
    {% endfor %}
 
36
{% endfor -%}
 
37
{% endif -%}