This is an automated email from the ASF dual-hosted git repository.

style95 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 8d0a9b2bb Make ElasticSearch ports configurable. (#5294)
8d0a9b2bb is described below

commit 8d0a9b2bb7bdbf01ef5f75c70d64cd2653a793cb
Author: Dominic Kim <[email protected]>
AuthorDate: Tue Jul 26 13:38:10 2022 +0900

    Make ElasticSearch ports configurable. (#5294)
---
 ansible/group_vars/all                                     | 6 +++---
 ansible/roles/elasticsearch/templates/elasticsearch.yml.j2 | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ansible/group_vars/all b/ansible/group_vars/all
index 97a3c0cbb..f444dcd93 100644
--- a/ansible/group_vars/all
+++ b/ansible/group_vars/all
@@ -298,9 +298,9 @@ db:
     backend: "{{ db_activation_backend | default('CouchDB') }}"
   elasticsearch:
     protocol: "{{ elastic_protocol | default('http') }}"
-    port: 9200
+    port: "{{ elastic_port | default(9200) }}"
     index_pattern: "{{ elastic_index_pattern | default('openwhisk-%s') }}"
-    base_transport_port: 9300
+    base_transport_port: "{{ elastic_transport_port_base | default(9300) }}"
     confdir: "{{ config_root_dir }}/elasticsearch"
     dir:
       become: "{{ elastic_dir_become | default(false) }}"
@@ -343,7 +343,7 @@ elasticsearch:
 
 elasticsearch_connect_string: "{% set ret = [] %}\
                                {% for host in groups['elasticsearch'] %}\
-                               {{ ret.append( hostvars[host].ansible_host + 
':' + ((db.elasticsearch.port+loop.index-1)|string) ) }}\
+                               {{ ret.append( hostvars[host].ansible_host + 
':' + ((db.elasticsearch.port|int+loop.index-1)|string) ) }}\
                                {% endfor %}\
                                {{ ret | join(',') }}"
 mongodb:
diff --git a/ansible/roles/elasticsearch/templates/elasticsearch.yml.j2 
b/ansible/roles/elasticsearch/templates/elasticsearch.yml.j2
index f3129a300..c300a5b38 100644
--- a/ansible/roles/elasticsearch/templates/elasticsearch.yml.j2
+++ b/ansible/roles/elasticsearch/templates/elasticsearch.yml.j2
@@ -11,7 +11,7 @@ transport.tcp.port: {{ transport_port }}
 # Details: https://github.com/elastic/elasticsearch/pull/17282
 discovery.zen.ping.unicast.hosts:
 {% for es in groups['elasticsearch'] %}
-   - {{ hostvars[es].ansible_host }}:{{ db.elasticsearch.base_transport_port + 
host_group.index(es)|int }}
+   - {{ hostvars[es].ansible_host }}:{{ 
db.elasticsearch.base_transport_port|int + host_group.index(es)|int }}
 {% endfor %}
 discovery.zen.minimum_master_nodes: {{ (host_group|length / 2 + 1) | int}}
 

Reply via email to