2015-07-17 12:20:31 +02:00
global
daemon
maxconn 4000
2015-08-05 11:10:53 +00:00
stats socket /run/haproxy.sock
2015-07-17 12:20:31 +02:00
defaults
mode http
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout check 10s
2015-09-27 08:52:21 +00:00
listen stats {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ haproxy_stats_port }}
2015-09-16 18:39:51 -07:00
mode http
stats enable
stats uri /
stats refresh 15s
stats realm Haproxy\ Stats
stats auth {{ haproxy_user }}:{{ haproxy_password }}
2015-09-27 08:46:04 +00:00
{% if enable_mariadb | bool %}
2015-07-17 12:20:31 +02:00
listen mariadb
mode tcp
option tcpka
2015-08-10 05:56:41 +00:00
option mysql-check user haproxy
bind {{ kolla_internal_address }}:{{ mariadb_port }}
2015-07-26 10:39:07 +00:00
{% for host in groups['mariadb'] %}
2015-08-10 05:56:41 +00:00
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ mariadb_port }} check inter 2000 rise 2 fall 5 {% if not loop.first %}backup{% endif %}
2015-07-17 12:20:31 +02:00
{% endfor %}
2015-09-27 08:46:04 +00:00
{% endif %}
2015-07-17 12:20:31 +02:00
2015-09-27 08:46:04 +00:00
{% if enable_rabbitmq | bool %}
2015-08-10 05:02:25 +00:00
listen rabbitmq_management
bind {{ kolla_internal_address }}:{{ rabbitmq_management_port }}
2015-07-26 10:39:07 +00:00
{% for host in groups['rabbitmq'] %}
2015-08-10 05:02:25 +00:00
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_management_port }} check inter 2000 rise 2 fall 5
2015-07-17 12:20:31 +02:00
{% endfor %}
2015-09-27 08:46:04 +00:00
{% endif %}
2015-07-17 12:20:31 +02:00
2015-09-27 08:46:04 +00:00
{% if enable_keystone | bool %}
2015-07-17 12:20:31 +02:00
listen keystone_public
bind {{ kolla_internal_address }}:{{ keystone_public_port }}
{% for host in groups['keystone'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ keystone_public_port }} check inter 2000 rise 2 fall 5
{% endfor %}
listen keystone_admin
bind {{ kolla_internal_address }}:{{ keystone_admin_port }}
{% for host in groups['keystone'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ keystone_admin_port }} check inter 2000 rise 2 fall 5
{% endfor %}
2015-09-27 08:46:04 +00:00
{% endif %}
2015-07-17 12:20:31 +02:00
2015-09-27 08:46:04 +00:00
{% if enable_glance | bool %}
2015-07-17 12:20:31 +02:00
listen glance_registry
bind {{ kolla_internal_address }}:{{ glance_registry_port }}
{% for host in groups['glance'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ glance_registry_port }} check inter 2000 rise 2 fall 5
{% endfor %}
listen glance_api
bind {{ kolla_internal_address }}:{{ glance_api_port }}
{% for host in groups['glance'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ glance_api_port }} check inter 2000 rise 2 fall 5
{% endfor %}
2015-09-27 08:46:04 +00:00
{% endif %}
2015-07-17 12:20:31 +02:00
2015-09-27 08:46:04 +00:00
{% if enable_nova | bool %}
2015-07-17 12:20:31 +02:00
listen nova_api
bind {{ kolla_internal_address }}:{{ nova_api_port }}
{% for host in groups['nova-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ nova_api_port }} check inter 2000 rise 2 fall 5
{% endfor %}
2015-08-06 13:14:23 +00:00
listen nova_api_ec2
bind {{ kolla_internal_address }}:{{ nova_api_ec2_port }}
{% for host in groups['nova-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ nova_api_ec2_port }} check inter 2000 rise 2 fall 5
{% endfor %}
2015-07-26 11:19:40 +00:00
listen nova_metadata
2015-08-06 13:14:23 +00:00
bind {{ kolla_internal_address }}:{{ nova_metadata_port }}
2015-07-26 11:19:40 +00:00
{% for host in groups['nova-api'] %}
2015-08-06 13:14:23 +00:00
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ nova_metadata_port }} check inter 2000 rise 2 fall 5
2015-07-26 11:19:40 +00:00
{% endfor %}
2015-09-20 04:41:37 +00:00
listen nova_novncproxy
bind {{ kolla_internal_address }}:{{ nova_novncproxy_port }}
{% for host in groups['nova-novncproxy'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ nova_novncproxy_port }} check inter 2000 rise 2 fall 5
{% endfor %}
2015-09-27 08:46:04 +00:00
{% endif %}
2015-09-20 04:41:37 +00:00
2015-09-27 08:46:04 +00:00
{% if enable_neutron | bool %}
2015-07-17 12:20:31 +02:00
listen neutron_server
bind {{ kolla_internal_address }}:{{ neutron_server_port }}
{% for host in groups['neutron-server'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ neutron_server_port }} check inter 2000 rise 2 fall 5
{% endfor %}
2015-09-27 08:46:04 +00:00
{% endif %}
2015-08-04 07:39:22 +00:00
2015-09-27 08:46:04 +00:00
{% if enable_horizon | bool %}
2015-08-25 07:41:13 +00:00
listen horizon
bind {{ kolla_internal_address }}:80
{% for host in groups['horizon'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:80 check inter 2000 rise 2 fall 5
{% endfor %}
2015-09-27 08:46:04 +00:00
{% endif %}
2015-08-25 07:41:13 +00:00
2015-09-27 08:46:04 +00:00
{% if enable_cinder | bool %}
2015-08-04 07:39:22 +00:00
listen cinder_api
bind {{ kolla_internal_address }}:{{ cinder_api_port }}
{% for host in groups['cinder-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ cinder_api_port }} check inter 2000 rise 2 fall 5
{% endfor %}
2015-09-27 08:46:04 +00:00
{% endif %}
2015-08-02 12:26:30 -07:00
2015-09-27 08:46:04 +00:00
{% if enable_heat | bool %}
2015-08-02 12:26:30 -07:00
listen heat_api
bind {{ kolla_internal_address }}:{{ heat_api_port }}
{% for host in groups['heat-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ heat_api_port }} check inter 2000 rise 2 fall 5
{% endfor %}
listen heat_api_cfn
bind {{ kolla_internal_address }}:{{ heat_api_cfn_port }}
{% for host in groups['heat-api-cfn'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ heat_api_cfn_port }} check inter 2000 rise 2 fall 5
{% endfor %}
2015-09-27 08:46:04 +00:00
{% endif %}
2015-08-28 11:26:40 -04:00
{% if enable_ironic | bool %}
listen ironic_api
bind {{ kolla_internal_address}}:{{ ironic_api_port }}
{% for host in groups['ironic-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ ironic_api_port }} check inter 2000 rise 2 fall 5
{% endfor %}
{% endif %}
2015-10-06 10:08:40 +01:00
{% if enable_swift | bool %}
listen swift_api
bind {{ kolla_internal_address}}:{{ swift_proxy_server_port }}
{% for host in groups['swift-proxy-server'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ swift_proxy_server_port }} check inter 2000 rise 2 fall 5
{% endfor %}
{% endif %}
2015-10-28 15:22:25 +03:00
{% if enable_murano | bool %}
listen murano_api
bind {{ kolla_internal_address }}:{{ murano_api_port }}
{% for host in groups['murano-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ murano_api_port }} check inter 2000 rise 2 fall 5
{% endfor %}
{% endif %}