Fir haproxy configs to use with docker swarm
Change-Id: I8ac5792834245356112b112d8c4d540617d3b008
diff --git a/haproxy/proxy/listen/cicd/aptly.yml b/haproxy/proxy/listen/cicd/aptly.yml
index 35ae3d6..e170a5d 100644
--- a/haproxy/proxy/listen/cicd/aptly.yml
+++ b/haproxy/proxy/listen/cicd/aptly.yml
@@ -1,4 +1,4 @@
-parameters:
+gerreparameters:
_param:
haproxy_aptly_api_bind_host: ${_param:haproxy_bind_address}
haproxy_aptly_api_bind_port: 8084
@@ -24,15 +24,7 @@
- name: ${_param:cluster_node01_name}
host: ${_param:cluster_node01_address}
port: 18084
- params: check
- - name: ${_param:cluster_node02_name}
- host: ${_param:cluster_node02_address}
- port: 18084
- params: backup check
- - name: ${_param:cluster_node03_name}
- host: ${_param:cluster_node03_address}
- port: 18084
- params: backup check
+ params: check inter 10s fastinter 2s downinter 3s rise 3 fall 3
aptly-public:
mode: http
options:
@@ -45,14 +37,6 @@
port: ${_param:haproxy_aptly_public_bind_port}
servers:
- name: ${_param:cluster_node01_name}
- host: ${_param:cluster_node01_address}
+ host: localhost
port: 18085
- params: check
- - name: ${_param:cluster_node02_name}
- host: ${_param:cluster_node02_address}
- port: 18085
- params: check
- - name: ${_param:cluster_node03_name}
- host: ${_param:cluster_node03_address}
- port: 18085
- params: check
+ params: check inter 10s fastinter 2s downinter 3s rise 3 fall 3
diff --git a/haproxy/proxy/listen/cicd/artifactory.yml b/haproxy/proxy/listen/cicd/artifactory.yml
index 349d998..cb6184e 100644
--- a/haproxy/proxy/listen/cicd/artifactory.yml
+++ b/haproxy/proxy/listen/cicd/artifactory.yml
@@ -12,27 +12,25 @@
mode: http
options:
- forwardfor
-# - httpchk
+ - httpchk
- httpclose
- httplog
balance: source
+ acl:
+ is_docker: "path_reg ^/v[12][/.]*"
http_request:
+ - action: "add-header X-Artifactory-Override-Base-Url https://%[req.hdr(host)]/artifactory"
+ condition: "if is_docker"
- action: "add-header X-Forwarded-Proto https"
condition: "if { ssl_fc }"
+ - action: "set-path /artifactory/api/docker/%[req.hdr(host),lower,field(1,'.')]%[path]"
+ condition: "if is_docker "
binds:
- address: ${_param:haproxy_artifactory_bind_host}
port: ${_param:haproxy_artifactory_bind_port}
ssl: ${_param:haproxy_artifactory_ssl}
servers:
- name: ${_param:cluster_node01_name}
- host: ${_param:cluster_node01_address}
+ host: localhost
port: 18082
- params: check
- - name: ${_param:cluster_node02_name}
- host: ${_param:cluster_node02_address}
- port: 18082
- params: backup check
- - name: ${_param:cluster_node03_name}
- host: ${_param:cluster_node03_address}
- port: 18082
- params: backup check
+ params: check inter 10s fastinter 2s downinter 3s rise 3 fall 3
\ No newline at end of file
diff --git a/haproxy/proxy/listen/cicd/gerrit.yml b/haproxy/proxy/listen/cicd/gerrit.yml
index 3ee21b1..f6ded20 100644
--- a/haproxy/proxy/listen/cicd/gerrit.yml
+++ b/haproxy/proxy/listen/cicd/gerrit.yml
@@ -13,7 +13,7 @@
mode: http
options:
- forwardfor
-# - httpchk
+ - httpchk
- httpclose
- httplog
balance: source
@@ -26,17 +26,9 @@
ssl: ${_param:haproxy_gerrit_ssl}
servers:
- name: ${_param:cluster_node01_name}
- host: ${_param:cluster_node01_address}
+ host: localhost
port: 18083
- params: check
- - name: ${_param:cluster_node02_name}
- host: ${_param:cluster_node02_address}
- port: 18083
- params: backup check
- - name: ${_param:cluster_node03_name}
- host: ${_param:cluster_node03_address}
- port: 18083
- params: backup check
+ params: check inter 10s fastinter 2s downinter 3s rise 3 fall 3
gerrit_ssh:
mode: tcp
balance: source
@@ -45,14 +37,7 @@
port: ${_param:haproxy_gerrit_ssh_bind_port}
servers:
- name: ${_param:cluster_node01_name}
- host: ${_param:cluster_node01_address}
+ host: localhost
port: 29417
- params: check
- - name: ${_param:cluster_node02_name}
- host: ${_param:cluster_node02_address}
- port: 29417
- params: backup check
- - name: ${_param:cluster_node03_name}
- host: ${_param:cluster_node03_address}
- port: 29417
- params: backup check
+ params: check inter 10s fastinter 2s downinter 3s rise 3 fall 3
+
diff --git a/haproxy/proxy/listen/cicd/jenkins.yml b/haproxy/proxy/listen/cicd/jenkins.yml
index eda12f8..150fac0 100644
--- a/haproxy/proxy/listen/cicd/jenkins.yml
+++ b/haproxy/proxy/listen/cicd/jenkins.yml
@@ -13,7 +13,7 @@
mode: http
options:
- forwardfor
-# - httpchk
+ - httpchk
- httpclose
- httplog
balance: source
@@ -28,17 +28,9 @@
ssl: ${_param:haproxy_jenkins_ssl}
servers:
- name: ${_param:cluster_node01_name}
- host: ${_param:cluster_node01_address}
+ host: localhost
port: 18081
- params: check
- - name: ${_param:cluster_node02_name}
- host: ${_param:cluster_node02_address}
- port: 18081
- params: backup check
- - name: ${_param:cluster_node03_name}
- host: ${_param:cluster_node03_address}
- port: 18081
- params: backup check
+ params: check inter 10s fastinter 2s downinter 3s rise 3 fall 3
jenkins_jnlp:
mode: tcp
balance: source
@@ -47,14 +39,6 @@
port: ${_param:haproxy_jenkins_jnlp_bind_port}
servers:
- name: ${_param:cluster_node01_name}
- host: ${_param:cluster_node01_address}
+ host: localhost
port: 50001
- params: check
- - name: ${_param:cluster_node02_name}
- host: ${_param:cluster_node02_address}
- port: 50001
- params: backup check
- - name: ${_param:cluster_node03_name}
- host: ${_param:cluster_node03_address}
- port: 50001
- params: backup check
+ params: check inter 10s fastinter 2s downinter 3s rise 3 fall 3
diff --git a/haproxy/proxy/listen/docker/registry.yml b/haproxy/proxy/listen/docker/registry.yml
index 8d45e97..e0f63e8 100644
--- a/haproxy/proxy/listen/docker/registry.yml
+++ b/haproxy/proxy/listen/docker/registry.yml
@@ -23,14 +23,7 @@
ssl: ${_param:haproxy_docker_registry_ssl}
servers:
- name: ${_param:cluster_node01_name}
- host: ${_param:cluster_node01_address}
+ host: localhost
port: 15000
- params: check
- - name: ${_param:cluster_node02_name}
- host: ${_param:cluster_node02_address}
- port: 15000
- params: check
- - name: ${_param:cluster_node03_name}
- host: ${_param:cluster_node03_address}
- port: 15000
- params: check
+ params: check inter 10s fastinter 2s downinter 3s rise 3 fall 3
+
diff --git a/haproxy/proxy/listen/docker/visualizer.yml b/haproxy/proxy/listen/docker/visualizer.yml
index 6fec3ba..d4e74bb 100644
--- a/haproxy/proxy/listen/docker/visualizer.yml
+++ b/haproxy/proxy/listen/docker/visualizer.yml
@@ -8,7 +8,7 @@
mode: http
options:
- forwardfor
-# - httpchk
+ - httpchk
- httpclose
- httplog
balance: source
@@ -17,14 +17,6 @@
port: ${_param:haproxy_docker_visualizer_listen_port}
servers:
- name: ${_param:cluster_node01_name}
- host: ${_param:cluster_node01_address}
+ host: localhost
port: 18090
- params: check
- - name: ${_param:cluster_node02_name}
- host: ${_param:cluster_node02_address}
- port: 18090
- params: check
- - name: ${_param:cluster_node03_name}
- host: ${_param:cluster_node03_address}
- port: 18090
- params: check
+ params: check inter 10s fastinter 2s downinter 3s rise 3 fall 3
\ No newline at end of file