Installation

Installation of Elasticsearch 8.X on Windows

Introduction

This document provides a comprehensive guide on installing and configuring Elasticsearch in a Windows environment. The instructions cover the installation process, configuration settings, and integration with the OvalEdge (OE) application.

Elasticsearch Server Installation

1. Download the Elasticsearch 8.0.0 installer for Windows from this link https://ovaledge.s3.us-west-1.amazonaws.com/OvalEdge+Clients/Glencore/elasticsearch-8.0.0-windows-x86_64.zip

2. Extract the contents of the downloaded archive to a directory on the Windows Server. 

    For example, extract it to C:\Program Files\elasticsearch-8.0.0.

3. Open a command prompt as an administrator and navigate to the Elasticsearch bin directory. 

    For example, navigate to C:\Program Files\elasticsearch-8.0.0-windows-x86_64\elasticsearch-8.0.0\bin.


Expose Elasticsearch as a Service

1. Run the command "elasticsearch-service.bat install" to install/expose Elasticsearch as a Windows service.

Set up Heap size for Elasticsearch

1. For efficient, elasticsearch heap allocation(to run elasticsearch smoothly), we recommend using the following JVM settings: -Xms5g -Xmx5g. 

2. Go to the elasticsearch installation folder(conf), copy jvm.options file, and place it in jvm.options.d folder.
3. Open jvm.options file present in jvm.options.d folder and search for values like -Xms and -Xmx.

4. If it's commented, uncomment it and change the value to -Xms8g -Xmx8g.

5. Open the Elasticsearch configuration file located at C:\Program Files\elasticsearch-8.0.0-windows-x86_64\elasticsearch-8.0.0\config\elasticsearch.yml in a text editor.

6. Configure Elasticsearch by setting the following parameters in the configuration file: add the following lines in the yaml file.

7. Save the configuration file and close the text editor.

Start Elasticsearch as a Service

1. To start the Elasticsearch service, navigate to C:\Program Files\elasticsearch-8.0.0-windows-x86_64\elasticsearch-8.0.0\bin path and run the command: net start elasticsearch-service-x64

2. Enable authentication to Elasticsearch by setting a password to the elastic user.

3. To set the Password for Elasticsearch, run the following command >> go to bin folder > open cmd >> type the following command:
elasticsearch-setup-passwords.bat interactive

4. Provide the same password to all the other users that are prompted for and store the password for the future.  
5. Restart Elasticsearch and integrate it with OE applications.

Integrating Elasticsearch with OvalEdge

1. Navigate to the oasis.properties in c:\ovaledge\ext-prop\ 

2. Provide Elasticsearch credentials that were set up while installing the Elasticsearch application as shown below.

3. After updating the ES details restart the tomcat service to reflect the changes.