Install & Run Elasticsearch

About

Zephyr Enterprise requires Elasticsearch as the search engine. Zephyr can work with Elasticsearch 7.9.2.

Notes:

  • Elasticsearch must be running before you install Zephyr Enterprise. You connect your Zephyr instance to Elasticsearch during product installation. See below for complete information.

  • This page describes installation of Elasticsearch in its default configuration with authentication disabled. For information on turning on authentication, see Enable Authentication in Elasticsearch.

In This Topic

Install and configure Elasticsearch on a single node

On Windows

  1. Download Elasticsearch.

  2. Unzip the downloaded file.

  3. Open the file elasticsearch-7.9.2\config\elasticsearch.yml and make the following changes.

    If you are going to connect to Elasticsearch using the IP address:

    cluster.name: zephyr node.name: "ESNode1" network.host: 192.168.0.1 http.port: 9200 bootstrap.memory_lock: true xpack.security.enabled: false discovery.seed_hosts: ["192.168.0.1"] indices.query.bool.max_clause_count: 9024

    If you are going to connect to Elasticsearch using the hostname:

    cluster.name: zephyr node.name: "ESNode1" network.host: 127.0.0.1 http.port: 9200 bootstrap.memory_lock: true xpack.security.enabled: false discovery.seed_hosts: ["127.0.0.1"] indices.query.bool.max_clause_count: 9024
  4. Start Elasticsearch by running the elasticsearch-7.9.2\bin\elasticsearch.bat file.

You can also install Elasticsearch on Windows as a service. To do that:

  1. Open the command prompt as a user or admin.

  2. Navigate to the <Elasticsearch>/bin folder.

  3. Run the following command:
    elasticsearch-service.bat install

Now check your Windows services. You will see the running Elasticsearch service.

For more information on system configuration, see Configuring System Settings.

On Linux

Install Elasticsearch using the .tar.gz file

  1. Download Elasticsearch.

  2. Use the following command to unpack the archive:

    tar -xvf elasticsearch-7.9.2-linux-x86_64.tar.gz
  3. Open the file elasticsearch-7.9.2\config\elasticsearch.yml and make the following changes.

    If you a going to connect to Elasticsearch using the IP address:


    If you are going to connect to Elasticsearch using the hostname:

     

  4. Start Elasticsearch by running the following command:

For more information on system configuration, see Configuring System Settings.

Install Elasticsearch using the .rmp file

  1. Download Elasticsearch.

  2. Install Elasticsearch by running the command below:

  3. Open the /etc/elasticsearch/elasticsearch.yml file for editing and configure it in the following way.

    If you a going to connect to Elasticsearch using the IP address:

    If you are going to connect to Elasticsearch using the hostname:

  4. Run the command below to open the system configuration file:

  5. Uncomment this line:

  6. Start Elasticsearch by running the following command:

For more information on system configuration, see Configuring System Settings.

Configure an Elasticsearch cluster (3 nodes)

  • 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).

On Windows

  1. Download Elasticsearch.

  2. Unzip the downloaded file on all three machines.

  3. On each node, open the file elasticsearch-7.9.2\config\elasticsearch.yml and make the following changes:

Elasticsearch node 1:

Elasticsearch node 2:

Elasticsearch node 3:

4. Start Elasticsearch on each node by running the elasticsearch-7.9.2\bin\elasticsearch.bat file.

On Linux

  1. Download Elasticsearch.

  2. Install Elasticsearch on all three machines by using the following command:

  3. On each node, open the /etc/elasticsearch/elasticsearch.yml file for editing and configure it in the following way:

Elasticsearch node 1:

Elasticsearch node 2:

Elasticsearch node 3:

Note:  The discovery.seed_hosts parameter should contain all the IP addresses used in the cluster.

4. On all three nodes, run the command below to open the system configuration file:

5. Uncomment this line:

6. Start Elasticsearch on all the nodes by running the following command:

After configuring the cluster, change the number_of_shards and number_of_replicas values in the <Zephyr>\tomcat\webapps\flex\WEB-INF\template\zephyr\_settings.json file:

For a single node, leave the default values.

For more information on system configuration, see Configuring System Settings.

Enable Elasticsearch Authentication

By default Elasticsearch installs in its default configuration with authentication disabled. Zephyr can work with Elasticsearch in this configuration.

You may want to enable authentication for more secure connection between Zephyr and Elasticsearch. You can do this, and Zephyr will be able to work with Elasticsearch in this case as well. For complete information on configuration steps, see Enable Authentication in Elasticsearch.

Connect Zephyr to Elasticsearch

Elasticsearch must be running before you install Zephyr Enterprise. You connect Zephyr to Elasticsearch during product installation. To do this, specify either the IP address of your Elasticsearch server, or its host name depending on the settings you have specified in the elasticsearch.yml file.

  • Single-node installation
    Specify http://192.168.0.1:9200, or http://localhost:9200 when prompted to configure Elasticsearch.

  • Cluster installation
    Specify the following IP addresses and port numbers when prompted to configure Elasticsearch. Use commas to separate them:

    http://192.168.0.1:9200,http://192.168.0.2:9200,http://192.168.0.3:9200

 

See Also

Zephyr On-Premise Production Installation
Set Up Zephyr Data Center Cluster
Connecting to an External Database
Enable Authentication in Elasticsearch