Skip to content

How to configure openSearch cluster?

shanchenqi edited this page Aug 18, 2021 · 18 revisions

Following are the steps to configure the OpenSearch cluster.

0. Create a user for Linux, set password and grant root privileges to the user

  • a. Add the Username
adduser <username>
  • b. Grant Root Privileges to the User
visudo

After the root user line, you will add in your new user with the same format for us to grant admin privileges.

<username> ALL=(ALL:ALL)ALL

1.Download the tarball from the (OpenSearch downloads page).

su username
wget https://artifacts.opensearch.org/releases/bundle/opensearch/1.0.0/opensearch-1.0.0-linux-x64.tar.gz

2.Extract the TAR file to a directory

tar -zxf opensearch-1.0.0-linux-x64.tar.gz
cd opensearch-1.0.0

3.Set the vm.max_map_count setting

sudo vi /etc/sysctl.conf

add this line:

vm.max_map_count=262144

run the following command to reload the new sysctl configuration:

sudo sysctl -p

4.edit opensearch configuration file and ensure the following are set:

cluster.name: my-application
node.name: node-1
path.data: /home/opensearch/data
path.logs: /home/opensearch/logs
network.host: 0.0.0.0
http.port: 8200
discovery.seed_hosts: ["host_1", "host_2","host_2"]
cluster.initial_master_nodes: ["host_1","host_2","host_3"]

5.Run OpenSearch

./opensearch-tar-install.sh
Clone this wiki locally