Install, Configure and Run Elasticsearch
Elasticsearch is a fast, clever search engine with the power to handle large data volumes. It is a scalable search engine based on distributed data storage that performs real-time searches and supports multi-tenancy. Elasticsearch streamlines backup processes and ensures data integrity. It uses Javascript Object Notation (JSON) and Java application program interfaces (APIs) and automatically indexes JSON documents. With Elasticsearch each index can have its own settings and each index can be easily recovered if a server crashes.
Install Elasticsearch
- Download and run java x64 JDK version 8 or later.
- Set the JAVA_HOME system environment variable:
- Enter the Variable name JAVA_HOME.
- Enter the Variable value. That is, the location of the Destination Folder in which you saved java x64 JDK version 8 or later.
- Download the Elasticsearch Installer from https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.msi.
- Run Elasticsearch.msi.
- Click Next in the Locations tab.
- Click Next in the Services tab.
- Set the Configuration tab as follow:
- Cluster Name: Select a unique name.
ImportantUse the same name in all the ES Nodes you install.
- Node Name: Enter your computer name.
- Role: Select Master or Data as needed and deselect Ingest.
ImportantElasticsearch should include at least one Data node and one Master node, but it is not recommended to use the same server for both Master and Data.
- Memory: Select ~40% of your available RAM memory and mark Lock JVM memory to prevent the Elasticsearch memory from being swapped.
- Network host: Enter the server's Hostname or IP Address.
- Discovery: Enter the (number of master nodes) / 2 + 1.
For example, set 2 if there are 3 master nodes in your cluster. - Unicast Hosts: Add all the master nodes host:port to your cluster.
ImportantIf you choose to first install Data, you can configure Unicast Hosts later in C:\ProgramData\Elastic\Elasticsearch\config\elasticsearch.yml
- Cluster Name: Select a unique name.
- Click Next > Install.
- Verify that Elasticsearch is functioning successfully:
- Open your Browser and in the Address field type http://<MachineName>:9200/_cluster/health.
Elasticsearch is working as expected if the page opens and the Status attribute is green or yellow.
IF the page does not open or the Status attribute is red, contact Genesys Customer Care for assistance.
- Open your Browser and in the Address field type http://<MachineName>:9200/_cluster/health.
- Verify that the Indexer is running and is able to connect to Elasticsearch:
- Enter http://localhost/indexer/api/v1/status. The Indexer is running and is able to connect to Elasticsearch if you see isAvailable:true.
Edit the Elasticsearch Configuration
Important
Edit your Elasticsearch configuration in rare cases. For example, when adding an additional Master node to the system.- Open C:\ProgramData\Elastic\Elasticsearch\config\elasticsearch.yml.
- Change the following settings:
- cluster.name
- node.name
- Set bootstrap.memory_lock to true.
- Set network.host as the hostname or the server IP address.
- Set discovery.zen.minimum_master_nodes to (number of master-eligible nodes / 2 + 1). For example, if there are three Master-Eligible nodes, then discovery.zen.minimum_master_nodes should be set to 2.
- Set discovery.zen.ping.unicast.hosts to a list of Master-Eligible nodes.
- By default, a node is a Master-Eligible node, a Data node and an Ingest node.
- To create a dedicated Master-Eligible node, add the following settings to the node section:
node.master: true
node.data: false
node.ingest: false - To create a dedicated Data node, add the following settings to the node section:
node.master: false
node.data: true
node.ingest: false
- To create a dedicated Master-Eligible node, add the following settings to the node section:
- Change the following settings:
- Open C:\ProgramData\Elastic\Elasticsearch\config\jvm.config.
- Change the JVM heap size to ~40% of your RAM memory. For example, if you have 32 RAM, change both -Xms2g and -Xmx2g to -Xms12g and -Xmx12g to -Xms12g and -Xmx12g.
- Restart the Elasticsearch service from the Services window to update the settings.
Comments or questions about this documentation? Contact us for support!
