Skip to main content

ALM Octane - KM02494295 - Installing Elastic Search server - VERSION 2.4


https://softwaresupport.hpe.com/km/KM02494295


Content of KM from Jun 20, 2017:


Title

Installing Elasticsearch server

Summary

Elasticsearch is a required component of ALM Octane.  This document is provided as a service on how to install and configure Elasticsearch on a Red Hat Enterprise Linux / Centos or Windows platforms.

Topic

This article provides the steps for installing an Elasticsearch database. Elasticsearch is a required database component for ALM Octane.

Response

 

Elasticsearch is quite memory intensive and requires disk space to maintain indexes. Therefore, we recommend you have a dedicated machine.
The size of the customer environment (standalone or clustered, number of workspaces, amount of data, and so on) may affect whether you need a mid-level machine or an Elasticsearch cluster. Therefore, the decision to use an existing server depends on the type of operations anticipated. For example, for testing purposes by a small pilot team, you can start with an existing server machine.

Prerequisites

Minimal Hardware Requirements

·       CPU: Quad Core AMD64 processor or equivalent x86-compatible processor
·       Memory (RAM): 8 GB minimum
·       Free Disk Space: 80 GB minimum
More about Elasticsearch hardware can be found here.

Installing Elasticsearch requires Java.  Java 8 with the latest update is recommended. 

Linux

You can use your package manager to install OpenJDK:
su -c "yum install java-1.8.0-openjdk"
Oracle JDK can also be used – download from here.

Windows

Only Oracle JDK can be used on Windows. Please make sure %JAVA_HOME% system variable is defined upon successful JDK install. Otherwise, define it manually so it points to \jre\.
Also, make sure the correct Java version appears in the system PATH. Otherwise, add \jre\bin to it manually.

Installing Elasticsearch

Linux

Download Elasticsearch version 2.4 from here. Use the RPM, TAR, ZIP or DEB file with their respective methods of installation.  For example, in case of RPM use the following command:
rpm –Uvh elasticsearch-2.4.0.rpm
For details, see documentation.

Windows

Download Elasticsearch version 2.4 from here (use the ZIP file). Extract to a folder to install on Windows 2012 R2 in location without spaces, i.e. C:\Elasticsearch2.4 instead of C:\Program Files\Elasticsearch2.4.

Mandatory Elasticsearch Configuration

Prior to starting Elasticsearch, there are some configuration changes to do. 
These are Elasticsearch settings you have to configure prior to start:

·       System properties

The most important setting is the ES_HEAP_SIZE property, which you can adjust to provide Elasticsearch with as much memory as possible.  You should give Elasticsearch half of the available memory in the machine but no more than 31G.  This is crucial for decent Elastic performance.
You can also change the various directories that Elasticsearch uses to store data, logs, and so on.

Linux: /etc/sysconfig/elasticsearch

Change ES_HEAP_SIZE and other settings if needed.

Windows

Define Windows system variable ES_HEAP_SIZE and other settings if needed.
For example, if the RAM on the machine is 8GB, you need to set the value of the system variable to 4g.

·       Elasticsearch properties

Linux: /etc/elasticsearch/elasticsearch.yml, Windows: %ES_HOME% \config/elasticsearch.yml

·        cluster.name – Give your cluster a unique name.  You need this name when you configure ALM Octane to connect to the cluster.  Even a single server installation is considered a cluster.
·        node.name – If you do not assign the node a name, Elasticsearch generates a random name on every reboot.
·        bootstrap.memory_lockall – Set this value to true.  Swapping memory really hurts Elasticsearch performance.  This property allows the process to lock the memory and avoid swaps.  If you do not have a swap partition configured you can skip this setting.
·        network.host – By default, Elasticsearch binds only to the localhost address.   This means that unless you set this property to a public IP or the Fully Qualified Domain Name (FQDN) of the server, it will not be possible to access the server from any other machine.
Optionally, you may want to change default Elasticsearch ports – both defined in elasticsearch.yml:
·        HTTP port – default 9200 – used to query Elasticsearch via a REST API in interactive mode. Use http.port to change from default.
·        TCP port – default 9300 – used by clients, including ALM Octane, via binary access (Java SDK). Use transport.tcp.port to change from default.
Both ports should be open in the firewall and accessible from each ALM Octane server.

Configuring an Elasticsearch cluster

Elasticsearch can run on a single node but it is designed to run as a cluster.  Running a production environment on a single host Elasticsearch instance is not recommended. 
Elasticsearch clusters should have an odd number of nodes (total number of nodes / 2 + 1) so a cluster should have a minimum of 3 nodes. 
To configure an Elasticsearch cluster, modify the following parameters in elasticsearch.yml:

Linux: /etc/elasticsearch.yml, Windows: %ES_HOME% \config/elasticsearch.yml

·        cluster.name – The name should match on all nodes of the cluster to make sure they join the same cluster.
·        discover.zen.ping.unicast.hosts – Receives an array of the host names or IPs of the nodes in the cluster.  The array should include all nodes in the cluster. Elasticsearch nodes work on a peer-to-peer basis and discover each other to form the cluster.
Note:  The cluster nodes should be able to communicate with each other, meaning, the ports should be open in the firewall.

Start Elasticsearch

After all configurations are completed, you can start Elasticsearch via this command:

Linux

sudo service elasticsearch start
To make Elasticsearch run as a service on Linux issue the following commands that appear after you install rpm:
systemctl daemon-reload
systemctl enable elasticsearch.service
systemctl start elasticsearch.service
Read more here.

Windows

%ES_HOME%\bin\elasticsearch
To make Elasticsearch run as a service on Windows, read here.

Before Installing ALM Octane

Before you install ALM Octane, run the following command from the ALM Octane machine:
curl -XGET ':9200'
If the expected results are returned, including the Elasticsearch version, node name and the cluster name are what you expect them to be, you can proceed to install ALM Octane.

Restarting Elasticsearch

If you change Elasticsearch settings, restart its service.
Elasticsearch on a single node may be restarted using the following command:

Linux

sudo service elasticsearch restart

Windows

%ES_HOME%\bin\service manager
Use GUI for managing the installed service
If Elasticsearch cluster is deployed, it should be restarted using a “rolling restart.”  See details here.

Backing up Elasticsearch

Refer to the official guide on backing up Elasticsearch here.

Product\Version


 ALM Octane 12.53.16.

Comments

Anonymous said…
מגן אדם רוצה עובדה
Unknown said…
אני רוצה עובדה

Popular posts from this blog

Best freeware - XML editor

As a software developer, I open XML files all the time. I a heavy commercial XML editor. But nothing can compare to a small, thin and free XML editor like 'foxe'. A great feature is has is the alignment of long XML strings to readable XML format (Shift-F8). It help lot of times when the XML file was generated by some tool and was not readable. Homepage: http://www.firstobject.com/dn_editor.htm

Jenkins error: groovy.lang.MissingPropertyException

I tried to run groovy build step and got below error. This post will describe how I solved the problem. Caught: groovy.lang.MissingPropertyException: No such property: hudson for class: script

SSL in pictures

Here is my summary on SSL (or as I like to call it 'SSL for dummies')