Steps to install Elastic Search
Table of Contents
Steps to Install External Elastic search 5.5.0:
Download Location for the Elastic search :
https://www.elastic.co/downloads/past-releases/elasticsearch-5-5-0
For Windows:
- Download elastic search version 5.5.0 from website (https://www.elastic.co/downloads/past-releases )
- Download zip file
- Unzip the file
- Go to the unzipped path >> config >> elasticsearch.yml file
For Linux (rpm) :
- Download .rpm file . In linux shell command prompt run the below command to Install elastic search version 5.5.0
sudo rpm -ivh elasticsearch-5.5.0.rpm
sudo yum localinstall elasticsearch-5.5.0.rpm
or
Download using wget command from linux shell command prompt
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.rpm - Go to the Installation path (etc/elasticsearch) >> elasticsearch.yml file
- Edit the elasticsearch.yml file
start the servie using below command
sudo systemctl start elasticsearch.service
location of the yml
/etc/elasticsearch/elasticsearch.yml
location of the index
/var/lib/elasticsearch
Location of the bin
/usr/share/elasticsearch
Location of the Logs
/var/log/elasticsearch/
Or
/usr/share/elasticsearch/logs
For Linux Debian
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb.sha512 shasum -a 512 -c elasticsearch-5.5.0.deb.sha512 sudo dpkg -i elasticsearch-5.5.0.deb #Start and Stop the Elastic Search sudo -i service elasticsearch start sudo -i service elasticsearch stop
Do the following changes Example Elasticsearch.yml and update the following parameters:
Elastic Search Single Node
ZEE Server and Elastic Search is in same Server
cluster.name: zephyr node.name: "Node1" node.master: true node.data: true transport.tcp.port: 9300 http.port: 9200 script.inline: true script.stored: true indices.query.bool.max_clause_count: 9012
ZEE and Elastic Search in Different Server
cluster.name: zephyr node.name: "Node1" node.master: true node.data: true script.inline: true script.stored: true network.bind_host: 192.168.45.21 network.publish_host: 192.168.45.21 network.host: 192.168.45.21 transport.tcp.port: 9300 http.port: 9200 discovery.zen.ping.unicast.hosts: ["192.168.45.21:9300"] indices.query.bool.max_clause_count: 9012
Sample elasticsearch.yml file attached : Example Elasticsearch.yml
Changes need to do in Zephyr
- In Jdbc properties need to change
#transport|node
transport.nodes=192.168.45.21:9300, 192.168.45.22:9300
ElasticSearch Cluster
- Elastic Search in cluster should be in Odd Number minimum node to be in elastic search cluster should be 3 node
- Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#ESNode 1 (192.168.11.144) cluster.name: zephyr node.name: "ESNode1" node.master: true node.data: true network.host: 192.168.11.144 http.port: 9200 transport.tcp.port: 9300 network.bind_host: 192.168.11.144 network.publish_host : 192.168.11.144 discovery.zen.ping.unicast.hosts: ["192.168.11.144:9300","192.168.11.145:9300","192.168.11.146:9300"] discovery.zen.minimum_master_nodes: 2 script.inline: true script.stored: true indices.query.bool.max_clause_count: 9012 ------------------------------------------------------------------------------------------------------------------------------------ #ESNode 2 (192.168.11.145) cluster.name: zephyr node.name: "ESNode2" node.master: true node.data: true network.host: 192.168.11.145 http.port: 9200 transport.tcp.port: 9300 network.bind_host: 192.168.11.145 network.publish_host : 192.168.11.145 discovery.zen.ping.unicast.hosts: ["192.168.11.144:9300","192.168.11.145:9300","192.168.11.146:9300"] discovery.zen.minimum_master_nodes: 2 script.inline: true script.stored: true indices.query.bool.max_clause_count: 9012 --------------------------------------------------------------------------------------------------------------------------------------- #ESNode 3 (192.168.11.146) cluster.name: zephyr node.name: "ESNode3" node.master: true node.data: true network.host: 192.168.11.146 http.port: 9200 transport.tcp.port: 9300 network.bind_host: 192.168.11.146 network.publish_host : 192.168.11.146 discovery.zen.ping.unicast.hosts: ["192.168.11.144:9300","192.168.11.145:9300","192.168.11.146:9300"] discovery.zen.minimum_master_nodes: 2 script.inline: true script.stored: true indices.query.bool.max_clause_count: 9012
NOTE :
discovery.zen.ping.unicast.hosts should contain all the elasticsearch system's host ip and port which are in cluster.
Sample elasticsearch.yml file attached :
ESNode 1 | |
EsNode 2 | |
EsNode 3 |
If elastic Search is in Cluster then in ZE we have to change the "number_of_shards" and "number_of_replicas"
Navigate to the ZE installation Dir
C:\Program Files\Zephyr\tomcat\webapps\flex\WEB-INF\template\zephyr
In this file _settings.json
change the number of shards and number of replicas
{
"index" : {
"number_of_shards" : 2,
"number_of_replicas" : 1
}
}
NOTE: for single node of the Elastic search this configuration should be default
Changes need to do in Zephyr
- In Jdbc properties need to change
#transport|node
transport.nodes=192.168.11.144:9300,192.168.11.145:9300.192.168.11.146:9300
Document Reference :
http://www.philipotoole.com/avoiding-elasticsearch-split-brain/
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-zen.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html
Starting Release 8.2, Zephyr Enterprise documentation is moving from its current location on Atlassian to a dedicated, standalone Zephyr Enterprise Documentation page. https://support.smartbear.com/zephyr-enterprise/docs/en/welcome-to-zephyr-enterprise.html