Skip to content

Commit 5b828bd

Browse files
fix(tests): bumping elastic search to version 7.17.29 to allow proper test execution also on apple silicon based machine
1 parent ff43550 commit 5b828bd

3 files changed

Lines changed: 57 additions & 11 deletions

File tree

ansible/group_vars/all

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ couchdb:
352352
version: 2.3
353353

354354
elasticsearch:
355-
version: 6.7.2
355+
version: 7.17.29
356356

357357
elasticsearch_connect_string: "{% set ret = [] %}\
358358
{% for host in groups['elasticsearch'] %}\
Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,63 @@
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+
128
cluster.name: "{{ db.elasticsearch.cluster_name }}"
229
node.name: "{{ elasticsearch_name }}"
30+
331
network.host: 0.0.0.0
432
network.publish_host: {{ ansible_default_ipv4.address | default(ansible_host | default('127.0.0.1')) }}
533

634
http.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
2260
xpack.security.enabled: false
23-
bootstrap.memory_lock: true
61+
62+
# Allow memory locking
63+
bootstrap.memory_lock: true

tools/macos/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,12 @@ Bellow are the ansible commands required to prepare your machine:
102102
cd ./ansible
103103
104104
ansible-playbook setup.yml -e mode=HA
105+
ansible-playbook prereq.yml
105106
ansible-playbook couchdb.yml
106107
ansible-playbook initdb.yml
107108
ansible-playbook wipe.yml
109+
ansible-playbook elasticsearch.yml
110+
ansible-playbook etcd.yml
108111
ansible-playbook downloadcli-github.yml
109112
110113
ansible-playbook properties.yml
@@ -114,5 +117,8 @@ To run the unit tests execute the command bellow from the project's root folder:
114117
```bash
115118
# go back to project's root folder
116119
cd ../
120+
121+
export TESTCONTAINERS_RYUK_DISABLED="true"
122+
117123
./gradlew -PtestSetName="REQUIRE_ONLY_DB" :tests:testCoverageLean
118124
```

0 commit comments

Comments
 (0)