Configuring a three node Elasticsearch cluster
For a default setup, deploy and configure a three node Elasticsearch cluster.
Before you begin
About this task
Procedure
-
In VMware vSphere Client, check the VM settings that were created from the OVA and change them if required.
Primarily, check these settings:
- Memory
- Must be at least 32 GB
- Hard disk 1 (primary disk)
- Must be at least 100 GB
- Hard disk 2 (data disk)
- Must be at least 1 TB
- Power on the VM.
-
Open the console to launch the configuration wizard (first-boot procedure).
Depending on your version of vSphere Client, you might either have a Launch Console or an Open Console link to do so.
The wizard is text based. To work in the wizard, use the Tab key to navigate, the Space bar to select items, and the Enter key to apply your selections.
- Accept the CentOS and IBM Eula license agreements when prompted.
-
Set up the passwords for the
rootandbuilderaccounts.With thebuilderaccount, you can later log in to the virtual machine via SSH. -
Configure the network.
Within the Network Configuration window, select either Static or Obtain IP via DHCP.
- If you select the Static IP option, complete these fields to configure the static address:
Parameter Value Hostname The fully qualified host name of the Elasticsearch node IP Address The IPv4 address of the Elasticsearch node Netmask The netmask for the assigned IP address Gateway The IP address of the default gateway for the IP subnet Note: This is the network gateway, not the IBM StoredIQ gateway.Primary DNS Host The IP address for the domain name server - If you select the Obtain IP via DHCP option, provide this information:
Parameter Value Hostname The fully qualified host name of the Elasticsearch node
Also select Restart network services to restart the node after your configuration is complete.
- If you select the Static IP option, complete these fields to configure the static address:
- Repeat steps 1 to 3 for each OVA for a minimum of three nodes.
-
Log in to the first node in the Elasticsearch cluster that is used to set up or upgrade the cluster across the other nodes.
Use the
builderaccount and the password that you configured in step 3.ssh builder@primary_es_node_ip -
Copy the sample cluster-setup.properties file to the
builderhome directory.At the prompt[builder@localhost ~]$, enter the following command:cp /etc/siq/cluster-setup.properties.sample cluster-setup.properties -
Edit the file by using this command:
vi cluster-setup.propertiesThe file defines the following properties. Only configuration of theES_HOSTSproperty is mandatory.~/cluster-setup.propertiesNote CLUSTER_NAME=ElasticsearchCluster name string. ES_HOSTS=IP_address_1,IP_address_2,IP_address_3Required. The first entry in the list becomes node1. Insert the IP addresses generated in step 3.
STUNNEL_ENABLED=falseSet to trueto have the inter-node communication within the Elasticsearch cluster encrypted using stunnel.If you want to encrypt all communication with and within the Elasticsearch cluster, set this property to
falseandSTUNNEL_HTTPS_ENABLED=falsetotrue.COUNTRY_ABBR=USUsed for x509 certificate generation. STATE_PROVINCE=TexasUsed for x509 certificate generation. ES_USER=elasticsearchDo not modify. ADMIN_USER=builderDo not modify. CITY=AustinUsed for x509 certificate generation. COMPANY_NAME=IBMUsed for x509 certificate generation. DEPT_NAME=StoredIQUsed for x509 certificate generation. CONTACT_EMAIL=storediqsupport@us.ibm.comUsed for x509 certificate generation. EXPIRATION_DAY=3650Used for x509 certificate generation. LUKS=trueDo not modify. SEARCHGUARD_ENABLED=falseAs of IBM StoredIQ 7.6.0.20, using Search Guard to secure all communication with and within the Elasticsearch node is no longer supported. This property is ignored; you do not have to remove it. STUNNEL_HTTPS_ENABLED=falseSet to trueto secure all communication with and within the Elasticsearch cluster by using stunnel encryption.For more information about the additional configuration steps, see Securing Elasticsearch cluster communication.
ACTIVE_ML_PREDICTION_CONTAINER_DISABLED=FalseYou can set this property to trueto free resources if you don't want to use machine learning models for tagging. -
Run the cluster setup with the properties file that you created.
At the prompt
[builder@localhost ~]$, enter:/siq/bin/cluster-setup.sh cluster-setup.propertiesThe setup script generates properties/configs for each node and runs the setup against each node by using SSH.
-
Accept the server certificate and enter the password for each node when prompted.
After the script is executed successfully, the setup of the Elasticsearch cluster is complete.
Data is stored in the /siq/var/data/elasticsearch directory. Log files are written to the /siq/var/log/elasticsearch directory.
-
Test the setup by using these commands:
curl -X GET 'http://primary_es_node_ip:9200' curl -X GET 'http://primary_es_node_ip:9200/_cluster/health?pretty=true' curl -X GET 'http://primary_es_node_ip:9200/_cluster/state?pretty'