Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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:

  1. Download elastic search version 5.5.0 from website (https://www.elastic.co/downloads/past-releases )
  2. Download zip file 
  3. Unzip the file
  4. Go to the unzipped path >> config >> elasticsearch.yml file


For Linux (rpm) :

  1. 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

  2.  Go to the Installation path (etc/elasticsearch) >> elasticsearch.yml file
  3. Edit the elasticsearch.yml file
  4. 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 

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 Steps to install Elastic Search and update the following parameters:

Elastic Search Single Node 

ZEE Server and Elastic Search is in same Server

Single node Elastic Search
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: 4096

ZEE and Elastic Search in Different Server

Single node Elastic Search
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: 4096


Sample elasticsearch.yml file attached : Steps to install Elastic Search

Changes need to do in Zephyr

  1. 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):

cluster node Elastic Search
#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: 4096
 
------------------------------------------------------------------------------------------------------------------------------------
 
#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: 4096
 
---------------------------------------------------------------------------------------------------------------------------------------


#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: 4096
 
 
 

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 :


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

  1. 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


  • No labels