Browse Source

Merge "Add docs about elasticsearch cluster"

Jenkins 2 years ago
parent
commit
e2303ff82f
1 changed files with 60 additions and 0 deletions
  1. 60
    0
      doc/source/monitoring_and_logging.rst

+ 60
- 0
doc/source/monitoring_and_logging.rst View File

@@ -155,3 +155,63 @@ And for Kibana:
155 155
 
156 156
     $ kubectl get service kibana -o yaml | awk '/nodePort: / {print $NF}'
157 157
     31426
158
+
159
+ElasticSearch cluster
160
+=====================
161
+
162
+Documentation above describes using elasticsearch as one node service without
163
+ability to scale --- stacklight doesn't require elasticsearch cluster. This one
164
+node elasticsearch is master-eligible, so could be scaled with any another
165
+master, data or client node.
166
+
167
+For more details about master, data and client node types please read
168
+`elasticsearch node documentation <https://www.elastic.co/guide/en/
169
+elasticsearch/reference/5.2/modules-node.html>`_.
170
+
171
+CCP implementation of elasticsearch cluster contains three available services:
172
+
173
+* ``elasticsearch`` --- master-eligible service, represents master node;
174
+
175
+* ``elasticsearch-data`` --- data (non-master) service, represents data node,
176
+  contains `elasticsearch-data` volume for storing data;
177
+
178
+* ``elasticsearch-client`` --- special type of coordinating only node that can
179
+  connect to multiple clusters and perform search and other operations across
180
+  all connected clusters. Represents tribe node type.
181
+
182
+All these services can be scaled and deployed on several nodes with replicas -
183
+they will form cluster. It can be checked with command:
184
+
185
+::
186
+
187
+    $ curl -X GET http://elasticsearch.ccp.svc.cluster.local:9200/_cluster/health?pretty
188
+
189
+which will print total number of cluster nodes and number of data nodes. More
190
+detailed info about each cluster node called with command:
191
+
192
+::
193
+
194
+   $ curl -X GET http://elasticsearch.ccp.svc.cluster.local:9200/_cluster/state?pretty
195
+
196
+For example, we need elasticsearch cluster with 2 data nodes. Then, topology
197
+will be look like:
198
+
199
+::
200
+   replicas:
201
+     elasticsearch-data: 2
202
+     ...
203
+   nodes:
204
+     node1:
205
+       roles:
206
+         - controller
207
+         ...
208
+     node[2-3]:
209
+       roles:
210
+         - es-data
211
+   roles:
212
+     es-data:
213
+       - elasticsearch-data
214
+     controller:
215
+       - elasticsearch
216
+       - elasticsearch-client
217
+       ...

Loading…
Cancel
Save