1+ # Elastic Search 6.7.2 setup (kept for reference)
2+ #cluster.name: "{{ db.elasticsearch.cluster_name }}"
3+ #node.name: "{{ elasticsearch_name }}"
4+ #network.host: 0.0.0.0
5+ #network.publish_host: {{ ansible_default_ipv4.address | default(ansible_host | default('127.0.0.1')) }}
6+
7+ #http.port: 9200
8+ #transport.tcp.port: {{ transport_port }}
9+
10+ # minimum_master_nodes need to be explicitly set when bound on a public IP
11+ # set to 1 to allow single node clusters
12+ # Details: https://github.com/elastic/elasticsearch/pull/17282
13+ #discovery.zen.ping.unicast.hosts:
14+ #{% for es in groups ['elasticsearch' ] %}
15+ # - {{ hostvars[es] .ansible_host }}:{{ db.elasticsearch.base_transport_port|int + host_group.index(es)|int }}
16+ #{% endfor %}
17+ #discovery.zen.minimum_master_nodes: {{ (host_group|length / 2 + 1) | int}}
18+
19+ #gateway.recover_after_nodes: {{ (host_group|length / 2 + 1) | int }}
20+ #gateway.expected_nodes: {{ host_group|length }}
21+ #gateway.recover_after_time: 5m
22+
23+ #xpack.security.enabled: false
24+ #bootstrap.memory_lock: true
25+
26+ # Elastic Search 7.17.29 setup
27+
128cluster.name: "{{ db.elasticsearch.cluster_name }}"
229node.name: "{{ elasticsearch_name }}"
30+
331network.host: 0.0.0.0
432network.publish_host: {{ ansible_default_ipv4.address | default(ansible_host | default('127.0.0.1')) }}
533
634http.port: 9200
7- transport.tcp.port: {{ transport_port }}
835
9- # minimum_master_nodes need to be explicitly set when bound on a public IP
10- # set to 1 to allow single node clusters
11- # Details: https://github.com/elastic/elasticsearch/pull/17282
12- discovery.zen.ping.unicast.hosts:
36+ # Elasticsearch 7.x transport port
37+ transport.port: {{ transport_port }}
38+
39+ {% if host_group |length == 1 %}
40+
41+ # Single node deployment (local OpenWhisk tests)
42+ discovery.type: single-node
43+
44+ {% else %}
45+
46+ # Multi-node Elasticsearch 7.x cluster
47+ discovery.seed_hosts:
1348{% for es in groups ['elasticsearch' ] %}
1449 - {{ hostvars[es] .ansible_host }}:{{ db.elasticsearch.base_transport_port|int + host_group.index(es)|int }}
1550{% endfor %}
16- discovery.zen.minimum_master_nodes: {{ (host_group|length / 2 + 1) | int}}
1751
18- gateway.recover_after_nodes: {{ (host_group|length / 2 + 1) | int }}
19- gateway.expected_nodes: {{ host_group|length }}
20- gateway.recover_after_time: 5m
52+ cluster.initial_master_nodes:
53+ {% for es in groups ['elasticsearch' ] %}
54+ - {{ hostvars[es] .ansible_host }}
55+ {% endfor %}
2156
57+ {% endif %}
58+
59+ # Disable security for OpenWhisk
2260xpack.security.enabled: false
23- bootstrap.memory_lock: true
61+
62+ # Allow memory locking
63+ bootstrap.memory_lock: true
0 commit comments