forked from project-sunbird/sunbird-data-pipeline-devops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathes_telemetry_cluster_setup.yml
36 lines (35 loc) · 1.36 KB
/
es_telemetry_cluster_setup.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
- hosts: telemetry-search-cluster
name: Setup telemetry ES cluster
remote_user: ecosystem
become: yes
pre_tasks:
- name: Uncompressing and copying to system path
unarchive:
src: https://sunbirdpublic.blob.core.windows.net/installation/jre-8u144-linux-x64.tar.gz
dest: /opt/
remote_src: yes
keep_newer: yes
become: yes
register: tar
- name: Updating java jre to system path
become: yes
shell: update-alternatives --install /usr/bin/java java /opt/jre1.8.0_144/bin/java 9999
- name: Registering node name
set_fact:
es_instance_name: "{% for servername in play_hosts %}{% if inventory_hostname==servername %}es-node-{{ loop.index }}{% endif %}{% endfor %}"
roles:
- { role: es6,
es_config: {
cluster.name: "elasticsearch-telemetry-search",
discovery.zen.ping.unicast.hosts: "{{ groups['telemetry-search-cluster'] }}",
http.port: 9200,
transport.tcp.port: 9300,
node.data: "{{ es_etc_node_data | default('true') }}",
node.master: "{{ es_etc_node_master | default('true') }}",
bootstrap.memory_lock: true,
},
es_heap_size: "2g",
es_etc_discovery_zen_ping_unicast_hosts: "{{ groups['telemetry-search-cluster'] }}",
es_etc_cluster_name: "elasticsearch_telemetry_search"
}