Expose Elasticsearch port for binary protocol
Change-Id: I7bc5c3ee1051f3e1c03d6f6e3d9f8c8ed1c3b885
diff --git a/devops_portal/service/elasticsearch.yml b/devops_portal/service/elasticsearch.yml
index b945af3..647c4ef 100644
--- a/devops_portal/service/elasticsearch.yml
+++ b/devops_portal/service/elasticsearch.yml
@@ -6,5 +6,5 @@
configure_proxy: true
endpoint:
address: ${_param:haproxy_elasticsearch_bind_host}
- port: ${_param:haproxy_elasticsearch_bind_port}
+ port: ${_param:haproxy_elasticsearch_http_bind_port}
https: ${_param:haproxy_elasticsearch_ssl:enabled}
diff --git a/docker/swarm/stack/elasticsearch.yml b/docker/swarm/stack/elasticsearch.yml
index ae63d5c..7e3a7a6 100644
--- a/docker/swarm/stack/elasticsearch.yml
+++ b/docker/swarm/stack/elasticsearch.yml
@@ -17,12 +17,13 @@
discovery.type: ${_param:elasticsearch_discovery_type}
service:
cluster:
- image: ${_param:docker_image_oss_elasticsearch}
+ image: ${_param:docker_image_elasticsearch}
deploy:
replicas: ${_param:elasticsearch_replicas}
restart_policy:
condition: any
ports:
- - ${_param:haproxy_elasticsearch_exposed_port}:${_param:haproxy_elasticsearch_bind_port}
+ - ${_param:haproxy_elasticsearch_http_exposed_port}:${_param:haproxy_elasticsearch_http_bind_port}
+ - ${_param:haproxy_elasticsearch_binary_exposed_port}:${_param:haproxy_elasticsearch_binary_bind_port}
volumes:
- /srv/volumes/elasticsearch:/usr/share/elasticsearch/data
\ No newline at end of file
diff --git a/elasticsearch/client/pushkin/init.yml b/elasticsearch/client/pushkin/init.yml
index 217f1c8..9f37847 100644
--- a/elasticsearch/client/pushkin/init.yml
+++ b/elasticsearch/client/pushkin/init.yml
@@ -1,7 +1,7 @@
parameters:
_param:
pushkin_elasticsearch_host: ${_param:haproxy_elasticsearch_bind_host}
- pushkin_elasticsearch_port: ${_param:haproxy_elasticsearch_bind_port}
+ pushkin_elasticsearch_port: ${_param:haproxy_elasticsearch_http_bind_port}
elasticsearch:
client:
enabled: true
diff --git a/haproxy/proxy/listen/oss/elasticsearch.yml b/haproxy/proxy/listen/oss/elasticsearch.yml
index 2f5d1ee..3a4c98e 100644
--- a/haproxy/proxy/listen/oss/elasticsearch.yml
+++ b/haproxy/proxy/listen/oss/elasticsearch.yml
@@ -1,14 +1,16 @@
parameters:
_param:
haproxy_elasticsearch_bind_host: ${_param:haproxy_bind_address}
- haproxy_elasticsearch_bind_port: 9200
- haproxy_elasticsearch_exposed_port: 19200
+ haproxy_elasticsearch_http_bind_port: 9200
+ haproxy_elasticsearch_http_exposed_port: 19200
+ haproxy_elasticsearch_binary_bind_port: 9300
+ haproxy_elasticsearch_binary_exposed_port: 19300
haproxy_elasticsearch_ssl:
enabled: false
haproxy:
proxy:
listen:
- elasticsearch:
+ elasticsearch_http:
mode: http
options:
- forwardfor
@@ -21,18 +23,41 @@
condition: "if { ssl_fc }"
binds:
- address: ${_param:haproxy_elasticsearch_bind_host}
- port: ${_param:haproxy_elasticsearch_bind_port}
+ port: ${_param:haproxy_elasticsearch_http_bind_port}
ssl: ${_param:haproxy_elasticsearch_ssl}
servers:
- name: ${_param:cluster_node01_name}
host: ${_param:cluster_node01_address}
- port: ${_param:haproxy_elasticsearch_exposed_port}
+ port: ${_param:haproxy_elasticsearch_http_exposed_port}
params: check
- name: ${_param:cluster_node02_name}
host: ${_param:cluster_node02_address}
- port: ${_param:haproxy_elasticsearch_exposed_port}
+ port: ${_param:haproxy_elasticsearch_http_exposed_port}
params: backup check
- name: ${_param:cluster_node03_name}
host: ${_param:cluster_node03_address}
- port: ${_param:haproxy_elasticsearch_exposed_port}
+ port: ${_param:haproxy_elasticsearch_http_exposed_port}
params: backup check
+ elasticsearch_binary:
+ mode: tcp
+ options:
+ - tcpka
+ - tcplog
+ balance: source
+ binds:
+ - address: ${_param:haproxy_elasticsearch_bind_host}
+ port: ${_param:haproxy_elasticsearch_binary_bind_port}
+ ssl: ${_param:haproxy_elasticsearch_ssl}
+ servers:
+ - name: ${_param:cluster_node01_name}
+ host: ${_param:cluster_node01_address}
+ port: ${_param:haproxy_elasticsearch_binary_exposed_port}
+ params: check
+ - name: ${_param:cluster_node02_name}
+ host: ${_param:cluster_node02_address}
+ port: ${_param:haproxy_elasticsearch_binary_exposed_port}
+ params: backup check
+ - name: ${_param:cluster_node03_name}
+ host: ${_param:cluster_node03_address}
+ port: ${_param:haproxy_elasticsearch_binary_exposed_port}
+ params: backup check
\ No newline at end of file