-
Notifications
You must be signed in to change notification settings - Fork 0
/
elastic-coldnode-playbook.yml
148 lines (143 loc) · 7.1 KB
/
elastic-coldnode-playbook.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
---
- name: setup elastic stack cold nodes
hosts: cold-nodes
vars:
- ansible_user: ansible
- ansible_password: ansibleadmin
- ansible_become_password: ansibleadmin
tasks:
- name: ensure docker is running
become: true
become_user: root
service:
name: docker
state: started
- name: starting elasticsearch cold container 1
delegate_to: 144.144.144.128
become: true
become_user: root
docker_container:
name: es-cold-1
image: 'docker.elastic.co/elasticsearch/elasticsearch:7.10.0'
ports:
- 144.144.144.128:9400:9400
- 144.144.144.128:9301:9301
env:
node.name: es-cold-1
network.host: 144.144.144.128
http.port: '9400'
transport.port: '9301'
node.roles: 'data'
node.attr.type: 'cold'
cluster.name: my-Cluster
path.repo: /usr/share/elasticsearch/elastic-backup
discovery.seed_hosts: 144.144.144.126,144.144.144.127,144.144.144.128,144.144.144.129,144.144.144.120,144.144.144.16,144.144.144.17,144.144.144.18,144.144.144.128,144.144.144.129,144.144.144.120
cluster.initial_master_nodes: 144.144.144.126,144.144.144.127,144.144.144.128
bootstrap.memory_lock: 'true'
ES_JAVA_OPTS: -Xms31g -Xmx31g
xpack.license.self_generated.type: basic
xpack.security.enabled: 'true'
xpack.security.http.ssl.enabled: 'true'
xpack.security.http.ssl.key: /usr/share/elasticsearch/config/certificates/elasticcold1-node/elasticcold1-node.key
xpack.security.http.ssl.certificate_authorities: /usr/share/elasticsearch/config/certificates/ca/ca.crt
xpack.security.http.ssl.certificate: /usr/share/elasticsearch/config/certificates/elasticcold1-node/elasticcold1-node.crt
xpack.security.transport.ssl.enabled: 'true'
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.certificate_authorities: /usr/share/elasticsearch/config/certificates/ca/ca.crt
xpack.security.transport.ssl.certificate: /usr/share/elasticsearch/config/certificates/elasticcold1-node/elasticcold1-node.crt
xpack.security.transport.ssl.key: /usr/share/elasticsearch/config/certificates/elasticcold1-node/elasticcold1-node.key
volumes:
- "/data3/elasticcoldnodes:/usr/share/elasticsearch/data"
- "/etc/ssl/certs/.elastic_certificates:/usr/share/elasticsearch/config/certificates"
- "/data4/elastic-backup:/usr/share/elasticsearch/elastic-backup"
ulimits:
- nofile:65535:65535
- memlock:-1:-1
network_mode: host
state: started
- name: starting elasticsearch cold container 2
delegate_to: 144.144.144.129
become: true
become_user: root
docker_container:
name: es-cold-2
image: 'docker.elastic.co/elasticsearch/elasticsearch:7.10.0'
ports:
- 144.144.144.129:9400:9400
- 144.144.144.129:9301:9301
env:
node.name: es-cold-2
network.host: 144.144.144.129
http.port: '9400'
transport.port: '9301'
node.roles: 'data'
node.attr.type: 'cold'
cluster.name: my-Cluster
path.repo: /usr/share/elasticsearch/elastic-backup
discovery.seed_hosts: 144.144.144.126,144.144.144.127,144.144.144.128,144.144.144.129,144.144.144.120,144.144.144.16,144.144.144.17,144.144.144.18,144.144.144.128,144.144.144.129,144.144.144.120
cluster.initial_master_nodes: 144.14445.172,144.14438.187,144.14432.195
bootstrap.memory_lock: 'true'
ES_JAVA_OPTS: -Xms31g -Xmx31g
xpack.license.self_generated.type: basic
xpack.security.enabled: 'true'
xpack.security.http.ssl.enabled: 'true'
xpack.security.http.ssl.key: /usr/share/elasticsearch/config/certificates/elasticcold2-node/elasticcold2-node.key
xpack.security.http.ssl.certificate_authorities: /usr/share/elasticsearch/config/certificates/ca/ca.crt
xpack.security.http.ssl.certificate: /usr/share/elasticsearch/config/certificates/elasticcold2-node/elasticcold2-node.crt
xpack.security.transport.ssl.enabled: 'true'
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.certificate_authorities: /usr/share/elasticsearch/config/certificates/ca/ca.crt
xpack.security.transport.ssl.certificate: /usr/share/elasticsearch/config/certificates/elasticcold2-node/elasticcold2-node.crt
xpack.security.transport.ssl.key: /usr/share/elasticsearch/config/certificates/elasticcold2-node/elasticcold2-node.key
volumes:
- "/data3/elasticcoldnodes:/usr/share/elasticsearch/data"
- "/etc/ssl/certs/.elastic_certificates:/usr/share/elasticsearch/config/certificates"
- "/data4/elastic-backup:/usr/share/elasticsearch/elastic-backup"
ulimits:
- nofile:65535:65535
- memlock:-1:-1
network_mode: host
state: started
- name: starting elasticsearch cold container 3
delegate_to: 144.144.144.120
become: true
become_user: root
docker_container:
name: es-cold-3
image: 'docker.elastic.co/elasticsearch/elasticsearch:7.10.0'
ports:
- 144.144.144.120:9400:9400
- 144.144.144.120:9301:9301
env:
node.name: es-cold-3
network.host: 144.144.144.120
http.port: '9400'
transport.port: '9301'
node.roles: 'data'
node.attr.type: 'cold'
cluster.name: myCluster
path.repo: /usr/share/elasticsearch/elastic-backup
discovery.seed_hosts: 144.144.144.126,144.144.144.127,144.144.144.128,144.144.144.129,144.144.144.120,144.144.144.16,144.144.144.17,144.144.144.18,144.144.144.128,144.144.144.129,144.144.144.120
cluster.initial_master_nodes: 144.144.144.126,144.144.144.127,144.144.144.128
bootstrap.memory_lock: 'true'
ES_JAVA_OPTS: -Xms31g -Xmx31g
xpack.license.self_generated.type: basic
xpack.security.enabled: 'true'
xpack.security.http.ssl.enabled: 'true'
xpack.security.http.ssl.key: /usr/share/elasticsearch/config/certificates/elasticcold3-node/elasticcold3-node.key
xpack.security.http.ssl.certificate_authorities: /usr/share/elasticsearch/config/certificates/ca/ca.crt
xpack.security.http.ssl.certificate: /usr/share/elasticsearch/config/certificates/elasticcold3-node/elasticcold3-node.crt
xpack.security.transport.ssl.enabled: 'true'
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.certificate_authorities: /usr/share/elasticsearch/config/certificates/ca/ca.crt
xpack.security.transport.ssl.certificate: /usr/share/elasticsearch/config/certificates/elasticcold3-node/elasticcold3-node.crt
xpack.security.transport.ssl.key: /usr/share/elasticsearch/config/certificates/elasticcold3-node/elasticcold3-node.key
volumes:
- "/data3/elasticcoldnodes:/usr/share/elasticsearch/data"
- "/etc/ssl/certs/.elastic_certificates:/usr/share/elasticsearch/config/certificates"
- "/data4/elastic-backup:/usr/share/elasticsearch/elastic-backup"
ulimits:
- nofile:65535:65535
- memlock:-1:-1
network_mode: host
state: started