Table of Contents

Standalone Elasticsearch Cluster Installer

Note

Elasticsearch is only supported up to version 6.8, which is no longer supported by Elastic. We therefore recommend using Storage as a Service instead, or if you do want to continue using self-hosted storage, using OpenSearch.

About this tool

The Standalone Elasticsearch Cluster Installer can be used to install Elasticsearch 6.8.23 on Windows. This version of Elasticsearch has been tested for use with DataMiner.

The installer includes AdoptOpenJDK 8 as well as Kibana. It sets up an Elasticsearch service and creates a firewall rule named Elasticsearch to allow TCP traffic on ports 9200 and 9300.

You can download this tool from DataMiner Dojo.

Note

You will need to run this tool as administrator.

Requirements

Configuration

Before you run the installer, you first need to create a configuration file.

To do so, first create a sample configuration by running the following command:

./SLDataGateway.installers.Elastic.Runner.exe run-stand-alone -g

In this file, you can then configure the settings detailed below.

NOTE: In case the cluster consists of only one node, you can instead start a one-click installation by executing run_localhost_configuration.bat.

Configuration settings

InstallerDependenciesDirectory

This setting should be set to the path containing the installer dependencies. This is the folder that contains the following subfolders: elasticsearch, java, and kibana.

Note

When the installer has been decompressed, the dependencies will be located in the folder ./elastic_installer_dependencies.

Networkhost & NetworkPublishHost

This is an elasticsearch.yml setting that should be bound to the IP of the node. It is the IP address or hostname that Elasticsearch binds to for connecting to other Elasticsearch nodes. For more information, refer to the Elasticsearch information on the network settings of the elasticsearch.yml configuration file.

ClusterName

The name of the cluster. Will be placed in elasticsearch.yml.

DiscoveryHosts

This is an elasticsearch.yml setting that should reference the IPs of the other nodes. For more information, refer to the Elasticsearch information on the discovery setting of the elasticsearch.yml configuration file.

MasterNode

This is an elasticsearch.yml setting that indicates if the node is a master node. For more information, refer to the Elasticsearch information on the master node setting of the elasticsearch.yml configuration file.

MinimumMasterNodes

This is an elasticsearch.yml setting that determines how many master nodes are needed to start up. For more information, refer to the Elasticsearch information on the minimum master nodes setting of the elasticsearch.yml configuration file.

RepoPath

Optional. This setting (which corresponds with the Path.Repo Elasticsearch setting) allows you to define a snapshot path. For a cluster, this should be a shared file location. If this setting is not filled in, it will be commented out in the Elasticsearch configuration.

Configuration example

<ElasticConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <ElasticYamlSettings>
      <ClusterName>DMS</ClusterName>
      <NodeName>DataMinerBestMiner</NodeName>
      <DataPath>C:\ProgramData\Elasticsearch</DataPath>
      <RepoPath>C:\ProgramData\RepoPath</RepoPath>
      <NetworkHost>0.0.0.0</NetworkHost>
      <NetworkPublishHost>0.0.0.0</NetworkPublishHost>
      <DiscoveryHosts>
         <string>"IP1"</string>
         <string>"IP2"</string>
      </DiscoveryHosts>
      <MinimumMasterNodes>1</MinimumMasterNodes>
      <MasterNode>true</MasterNode>
      <DataNode>true</DataNode>
   </ElasticYamlSettings>
   <InstallerDependenciesDirectory>unspecified</InstallerDependenciesDirectory>
   <ElasticTargetDirectory>C:\Program Files\Elasticsearch</ElasticTargetDirectory>
</ElasticConfiguration>
Note

The InstallerDependenciesDirectory element should be updated using the path where the dependencies are located. The default location is ./elastic_installer_dependencies.

Running the installer

Run the following command as administrator to run the installer:

./SLDataGateway.Installers.Elastic.Runner.exe run-stand-alone -c "<path to configuration file>"

In case you are setting up a cluster, run the installers on the different nodes at approximately the same time. This is necessary because at some point the installers will need the input from the other installers in order to continue.

After installation

After installation, Elasticsearch will by default only use 4 GB of heap space. In most cases, this will not be enough. Use one of the methods described below to increase the heap space.

Using the Registry Editor

  1. Go to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\elasticsearch-service-x64\Parameters\Java

  2. Open the Options key and locate the -xmsZg and -xmxZg settings. In both settings, change “Z” to the amount of heap space (in gigabytes) you want Elasticsearch to use (example: -xms16 and -xmx16g). Default: 1

  3. Restart the Elasticsearch service.

Using the Elasticsearch service manager

  1. Open a command window and go to the Elasticsearch installation folder. Default: C:\Program Files\Elasticsearch.

  2. Go to the bin folder, and run elasticsearch-service.bat manager.

  3. In the service manager window, go to the Java tab, and locate the -xmsZg and -xmxZg settings. In both settings, change “Z” to the amount of heap space (in gigabytes) you want Elasticsearch to use (example: -xms16 and -xmx16g). Default: 1

  4. Click Apply and then click OK.

  5. Restart the Elasticsearch service.

Note