summaryrefslogtreecommitdiffstats
path: root/roles/openshift_loadbalancer/templates
diff options
context:
space:
mode:
authorAndrew Lau <andrew@andrewklau.com>2017-01-18 21:28:01 +1100
committerAndrew Lau <andrew@andrewklau.com>2017-01-21 08:16:38 +1100
commitc537e9599fc01dfeddb84cbcc52fa6991cb3ab27 (patch)
tree8381b1ffb0b98d8325359e21f257af183174238f /roles/openshift_loadbalancer/templates
parent7b512bf5fc36ee9ad2df65d8e129aa52c939d98e (diff)
downloadopenshift-c537e9599fc01dfeddb84cbcc52fa6991cb3ab27.tar.gz
openshift-c537e9599fc01dfeddb84cbcc52fa6991cb3ab27.tar.bz2
openshift-c537e9599fc01dfeddb84cbcc52fa6991cb3ab27.tar.xz
openshift-c537e9599fc01dfeddb84cbcc52fa6991cb3ab27.zip
Add containzerized haproxy option
Diffstat (limited to 'roles/openshift_loadbalancer/templates')
-rw-r--r--roles/openshift_loadbalancer/templates/haproxy.docker.service.j217
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/openshift_loadbalancer/templates/haproxy.docker.service.j2 b/roles/openshift_loadbalancer/templates/haproxy.docker.service.j2
new file mode 100644
index 000000000..624876ab0
--- /dev/null
+++ b/roles/openshift_loadbalancer/templates/haproxy.docker.service.j2
@@ -0,0 +1,17 @@
+[Unit]
+After=docker.service
+Requires=docker.service
+PartOf=docker.service
+
+[Service]
+ExecStartPre=-/usr/bin/docker rm -f openshift_loadbalancer
+ExecStart=/usr/bin/docker run --rm --name openshift_loadbalancer -p {{ openshift_master_api_port | default(8443) }}:{{ openshift_master_api_port | default(8443) }} -v /etc/haproxy/haproxy.cfg:/etc/haproxy/haproxy.cfg:ro --entrypoint="haproxy -f /etc/haproxy/haproxy.cfg" {{ openshift.common.router_image }}:{{ openshift_image_tag }}
+ExecStartPost=/usr/bin/sleep 10
+ExecStop=/usr/bin/docker stop openshift_loadbalancer
+LimitNOFILE={{ openshift_loadbalancer_limit_nofile | default(100000) }}
+LimitCORE=infinity
+Restart=always
+RestartSec=5s
+
+[Install]
+WantedBy=docker.service