summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
blob: 3c18d362406cb5f19e33b2824d5b262037547eef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
global
    #chroot /var/run/haproxy
    daemon
    user haproxy
    group haproxy
    maxconn 4000
    pidfile /var/run/haproxy/haproxy.pid
    log 127.0.0.1 local0
    tune.bufsize 1000000
    stats socket /var/run/haproxy.sock
    stats timeout 2m

defaults
    log global
    maxconn 8000
    option redispatch
    option dontlognull
    option splice-auto
    timeout http-request 10s
    timeout queue 1m
    timeout connect 10s
    timeout client 6m
    timeout server 6m
    timeout check 10s
    retries 5

listen  proxy-glance_registry_cluster
    bind {{ internal_vip.ip }}:9191
    option tcpka
    option tcplog
    balance source
{% for host,ip in haproxy_hosts.items() %}
    server {{ host }} {{ ip }}:9191 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}

listen  proxy-glance_api_cluster
    bind {{ internal_vip.ip }}:9292
    option tcpka
    option httpchk
    option tcplog
    balance source
{% for host,ip in haproxy_hosts.items() %}
    server {{ host }} {{ ip }}:9292 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}

listen  proxy-nova-novncproxy
    bind {{ internal_vip.ip }}:6080
    option tcpka
    option tcplog
    balance source
{% for host,ip in haproxy_hosts.items() %}
    server {{ host }} {{ ip }}:6080 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}

listen  proxy-network
    bind {{ internal_vip.ip }}:9696
    option tcpka
    option tcplog
    balance source
{% for host,ip in haproxy_hosts.items() %}
    server {{ host }} {{ ip }}:9696 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}

listen  proxy-volume
    bind {{ internal_vip.ip }}:8776
    option tcpka
    option httpchk
    option tcplog
    balance source
{% for host,ip in haproxy_hosts.items() %}
    server {{ host }} {{ ip }}:8776 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}

listen  proxy-keystone_admin_cluster
    bind {{ internal_vip.ip }}:35357
    option tcpka
    option httpchk
    option tcplog
    balance source
{% for host,ip in haproxy_hosts.items() %}
    server {{ host }} {{ ip }}:35357 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}

listen  proxy-keystone_public_internal_cluster
    bind {{ internal_vip.ip }}:5000
    option tcpka
    option httpchk
    option tcplog
    balance source
{% for host,ip in haproxy_hosts.items() %}
    server {{ host }} {{ ip }}:5000 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}

listen  proxy-nova_compute_api_cluster
    bind {{ internal_vip.ip }}:8774
    mode tcp
    option httpchk
    option tcplog
    balance source
{% for host,ip in haproxy_hosts.items() %}
    server {{ host }} {{ ip }}:8774 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}

listen  proxy-nova_metadata_api_cluster
    bind {{ internal_vip.ip }}:8775
    option tcpka
    option tcplog
    balance source
{% for host,ip in haproxy_hosts.items() %}
    server {{ host }} {{ ip }}:8775 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}

listen  proxy-cinder_api_cluster
    bind {{ internal_vip.ip }}:8776
    mode tcp
    option httpchk
    option tcplog
    balance source
{% for host,ip in haproxy_hosts.items() %}
    server {{ host }} {{ ip }}:8776 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}

listen stats
    mode http
    bind 0.0.0.0:8888
    stats enable
    stats refresh 30s
    stats uri /
    stats realm Global\ statistics
    stats auth admin:admin