Jump to: navigation, search

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.

Prerequisites

Before you install and configure Elasticsearch you must consider the following:

Elasticsearch:

Operating Systems:

Indexer:

  • Indexer cannot be run on either Linux or Docker.
  • IIS Web Service must run on the Indexer machine.
  • Multiple indexers can be run with a Load Balancer.

Architecture:

Shards and Nodes:

  • 1 shard is required for every 2 million interactions in a Genesys Interaction Analytics (GIA) solution and 20 million in a Genesys Interaction Recording (GIR) solution. For example, for a GIA solution if you have 32 million interactions you must have 16 shards.
  • The number of shards cannot be changed after SpeechMiner indices are created. SpeechMiner indices are created when the Elasticsearch Migration Tool is run or when you first run Uplatform (when migration is not required).
  • You must have one Data node for every 8 shards (16 million interactions in a Genesys Interaction Analytics (GIA) solution and 160 million in a Genesys Interaction Recording (GIR) solution).
  • A minimum of 2 Shards and 2 Data nodes are required for redundancy.
  • It is recommended that you use 3 Master nodes. Note: if you only use 1 Master node, the entire system is down when your 1 Master node is down.
  • You can use the same Elasticsearch node for both the Master and Data node when working with 5 or less Data nodes.
  • If you have more than 5 Data nodes, we recommend that you have 3 separate Master nodes.

Install and Configure Elasticsearch on Windows

Install Elasticsearch on Windows

  1. Download and run java x64 JVM version 8 or later.
  2. Set the JAVA_HOME system environment variable:
    1. Enter the Variable name JAVA_HOME.
    2. Enter the Variable value. That is, the location of the Destination Folder in which you installed java x64 JVM version 8 or later. For example, C:\Program Files\Java\jre1.8.0_161
  3. Download the Elasticsearch Installer from https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.16.msi.
  4. Run Elasticsearch.msi.
  5. Click Next in the Locations tab.
  6. Click Next in the Services tab.
  7. Set the Configuration tab as follow:
    • Cluster Name: Select a unique name.
      Important
      Use 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.
      Important
      Elasticsearch should include at least one Data node and one Master node.
    • 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.
      Important
      If you choose to first install Data, you can configure Unicast Hosts later in C:\ProgramData\Elastic\Elasticsearch\config\elasticsearch.yml
  8. Click Next > Install.
  9. Verify that Elasticsearch is functioning successfully:
    1. Open your Browser and in the Address field type http://<ElasticsearchMachineName>: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.
  10. Install SpeechMiner. For details refer to SpeechMiner installation.
  11. Configure SpeechMiner. For details refer to SpeechMiner configuration.
  12. Verify that the Indexer is running and is able to connect to Elasticsearch:
    1. Enter http://<IndexerHostName>/indexer/api/v1/status. The Indexer is running and is able to connect to Elasticsearch if you see isAvailable:true.

Configure Elasticsearch on Windows

Important
  • Edit your Elasticsearch configuration only in rare cases. For example, when adding an additional Master node to the system.
  • You can change the Data nodes indexer after the Indexer installation is complete. To do this, change the esNodes Environment value in the Indexer machine. You must use the following format: http://ES1:9200;http://ES2:9200;http://smithES2:9200
  • The number of shards and replicas are configured in the SpeechMiner database in the indexParamsTbl table in the numberOfShards and numberOfReplicas columns. You must configure the number of shards and replicas before you run UPlatform for the first time.
  • If the customer runs a Migration process, the number of shards and replicas should also be configured in the LuceneToESMigration tool configuration file.
  1. Open C:\ProgramData\Elastic\Elasticsearch\config\elasticsearch.yml.
    1. 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.
    2. 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
  2. Open C:\ProgramData\Elastic\Elasticsearch\config\jvm.options.
    1. Change the JVM heap' size to ~40% of your RAM memory. For example, if you have 32 GB RAM, ensure that both -Xmx and -Xms values are set to 12g. For example, -Xms12g and -Xmx12g.
  3. Restart the Elasticsearch service from the Services window to update the settings.

Upgrade Elasticsearch

To upgrade Elasticsearch using the Rolling Upgrades procedure refer to the Elasticsearch website.

See: https://www.elastic.co/guide/en/elasticsearch/reference/5.6/rolling-upgrades.html.

This page was last edited on November 1, 2020, at 12:49.
blog comments powered by Disqus