summaryrefslogtreecommitdiffstats
path: root/roles/haproxy/templates/haproxy.cfg.j2
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2015-08-21 23:49:49 -0400
committerAndrew Butcher <abutcher@redhat.com>2015-11-04 19:57:21 -0500
commit3778662ef816b2bb0a3788ed65229b45622a0139 (patch)
treea64dec3e317a55d87d86a5262ca2b598f625c9de /roles/haproxy/templates/haproxy.cfg.j2
parent399b19864653806c769ac954a6c79ef13a895d64 (diff)
downloadopenshift-3778662ef816b2bb0a3788ed65229b45622a0139.tar.gz
openshift-3778662ef816b2bb0a3788ed65229b45622a0139.tar.bz2
openshift-3778662ef816b2bb0a3788ed65229b45622a0139.tar.xz
openshift-3778662ef816b2bb0a3788ed65229b45622a0139.zip
Start of true master ha
Diffstat (limited to 'roles/haproxy/templates/haproxy.cfg.j2')
-rw-r--r--roles/haproxy/templates/haproxy.cfg.j248
1 files changed, 48 insertions, 0 deletions
diff --git a/roles/haproxy/templates/haproxy.cfg.j2 b/roles/haproxy/templates/haproxy.cfg.j2
new file mode 100644
index 000000000..bfcdcfdb1
--- /dev/null
+++ b/roles/haproxy/templates/haproxy.cfg.j2
@@ -0,0 +1,48 @@
+# Global settings
+#---------------------------------------------------------------------
+global
+ chroot /var/lib/haproxy
+ pidfile /var/run/haproxy.pid
+ maxconn 4000
+ user haproxy
+ group haproxy
+ daemon
+
+ # turn on stats unix socket
+ stats socket /var/lib/haproxy/stats
+
+#---------------------------------------------------------------------
+# common defaults that all the 'listen' and 'backend' sections will
+# use if not designated in their block
+#---------------------------------------------------------------------
+defaults
+ mode http
+ log global
+ option httplog
+ option dontlognull
+ option http-server-close
+ option forwardfor except 127.0.0.0/8
+ option redispatch
+ retries 3
+ timeout http-request 10s
+ timeout queue 1m
+ timeout connect 10s
+ timeout client 1m
+ timeout server 1m
+ timeout http-keep-alive 10s
+ timeout check 10s
+ maxconn 3000
+
+{% for frontend in haproxy_frontends %}
+frontend {{ frontend.name }}
+ bind {{ frontend.bind }}
+ default_backend {{ frontend.default_backend }}
+{% endfor %}
+
+{% for backend in haproxy_backends %}
+backend {{ backend.name }}
+ balance {{ backend.balance }}
+{% for server in backend.servers %}
+ server {{ server.name }} {{ server.address }} {{ server.opts }}
+{% endfor %}
+{% endfor %}