~cbjchen/charms/trusty/cinder-ceph/remove_stale_key

« back to all changes in this revision

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

  • Committer: james.page at ubuntu
  • Date: 2014-12-15 09:18:58 UTC
  • mfrom: (20.1.9 cinder-ceph)
  • Revision ID: james.page@ubuntu.com-20141215091858-qryinzazthotmi3p
[corey.bryant,r=james-page] Sort out charmhelpers issues.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
    retries 3
15
15
    timeout queue 1000
16
16
    timeout connect 1000
 
17
{% if haproxy_client_timeout -%}
 
18
    timeout client {{ haproxy_client_timeout }}
 
19
{% else -%}
17
20
    timeout client 30000
 
21
{% endif -%}
 
22
 
 
23
{% if haproxy_server_timeout -%}
 
24
    timeout server {{ haproxy_server_timeout }}
 
25
{% else -%}
18
26
    timeout server 30000
 
27
{% endif -%}
19
28
 
20
29
listen stats {{ stat_port }}
21
30
    mode http
25
34
    stats uri /
26
35
    stats auth admin:password
27
36
 
28
 
{% if units -%}
29
 
{% for service, ports in service_ports.iteritems() -%}
30
 
listen {{ service }}_ipv4 0.0.0.0:{{ ports[0] }}
31
 
    balance roundrobin
32
 
    {% for unit, address in units.iteritems() -%}
33
 
    server {{ unit }} {{ address }}:{{ ports[1] }} check
34
 
    {% endfor %}
35
 
listen {{ service }}_ipv6 :::{{ ports[0] }}
36
 
    balance roundrobin
37
 
    {% for unit, address in units.iteritems() -%}
38
 
    server {{ unit }} {{ address }}:{{ ports[1] }} check
39
 
    {% endfor %}
 
37
{% if frontends -%}
 
38
{% for service, ports in service_ports.items() -%}
 
39
frontend tcp-in_{{ service }}
 
40
    bind *:{{ ports[0] }}
 
41
    bind :::{{ ports[0] }}
 
42
    {% for frontend in frontends -%}
 
43
    acl net_{{ frontend }} dst {{ frontends[frontend]['network'] }}
 
44
    use_backend {{ service }}_{{ frontend }} if net_{{ frontend }}
 
45
    {% endfor %}
 
46
{% for frontend in frontends -%}
 
47
backend {{ service }}_{{ frontend }}
 
48
    balance leastconn
 
49
    {% for unit, address in frontends[frontend]['backends'].items() -%}
 
50
    server {{ unit }} {{ address }}:{{ ports[1] }} check
 
51
    {% endfor %}
 
52
{% endfor -%}
40
53
{% endfor -%}
41
54
{% endif -%}