2. Install & Configure Elasticsearch

To be able to work with Zephyr Data Center, you need to install and configure Elasticsearch -- a search and analytics engine -- on a separate node. Depending on the number of concurrent users who will work with the Data Center, you may need to set up one Elasticsearch node or a cluster of nodes (see Recommended Configurations).

  • Currently, Zephyr Enterprise supports Elasticsearch 6.8.1 only.

  • If you use an Elasticsearch cluster, there is no need to use an external load balancer, as Elasticsearch used in a cluster has the load balancing capability.

To install Elasticsearch on Windows (on a single node or on cluster nodes):

1. Download Elasticsearch 6.8.1 (the ZIP archive).

2. Unzip the downloaded file.

3. Configure the elasticsearch-6.8.1\config\elasticsearch.yml file:

1. Specify the following properties in the elasticsearch.yml file:

cluster.name: zephyr node.name: "Node1" node.master: true node.data: 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"] xpack.security.enabled: false bootstrap.memory_lock: true
  • The number of Elasticsearch nodes you use in a cluster should be odd. That is, the minimum number of nodes you can use in a cluster is 3.

  • To avoid split-brain, you need to specify an appropriate value for the discovery.zen.minimum_master_nodes parameter. To determine it, follow the rule N/2+1, where N is the number of nodes in the cluster. In a three-node cluster, the parameter should be set to 2 (3/2+1=2 - rounded down to the nearest integer).

1. Specify the following properties in the elasticsearch.yml file on all Elasticsearch nodes:

Elasticsearch node 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 xpack.security.enabled: false bootstrap.memory_lock: true

Elasticsearch node 2:

#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 xpack.security.enabled: false bootstrap.memory_lock: true

Elasticsearch node 3:

discovery.zen.ping.unicast.hosts should list all the IPs and ports used in the cluster.

2. In the Zephyr\tomcat\webapps\flex\WEB-INF\classes\jdbc.properties file, specify the following values for the transport.nodes property:

transport.nodes=192.168.11.144:9300,192.168.11.145:9300.192.168.11.146:9300

4. Start the service by running the elasticsearch-6.8.1\bin\elasticsearch.bat file.

To install Elasticsearch on Linux (on a single node or on cluster nodes):

1. Download Elasticsearch 6.8.1 (the RPM archive), or run the following command in the Linux command prompt:

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.8.1.rpm

2. In the Linux command prompt, run one of the following commands to install Elasticsearch:

sudo rpm -ivh elasticsearch-6.8.1.rpm
sudo yum localinstall elasticsearch-6.8.1.rpm

3. Configure the etc\elasticsearch\elasticsearch.yml file:

1. Specify the following properties in the elasticsearch.yml file:

1. Specify the following properties in the elasticsearch.yml file on all Elasticsearch nodes (replace the IPs with your IPs):

Elasticsearch node 1:

Elasticsearch node 2:

Elasticsearch node 3:

2. After creating all the nodes, delete the /var/lib/elasticsearch/nodes folder on all the nodes, then restart.

4. Start Elasticsearch. The way you start and stop it depends on whether your system uses SysV init or systemd.

If SysV init is used, you start and stop Elasticsearch by running the service command:

sudo -i service elasticsearch start

sudo -i service elasticsearch stop

If systemd is used, you run the following commands:

sudo systemctl start elasticsearch.service

sudo systemctl stop elasticsearch.service

5. Run the following command to verify Elasticsearch is working properly:

curl -XGET '192.168.11.146:9200/_cat/health?v&pretty'


< Prev Step Next Step >

See Also

Set Up Zephyr Data Center
Support and Troubleshooting