forked from chaoss/grimoirelab
-
Notifications
You must be signed in to change notification settings - Fork 3
How to configure openSearch cluster?
shanchenqi edited this page Aug 18, 2021
·
18 revisions
Following are the steps to configure the OpenSearch cluster.
- 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
tar -zxf opensearch-1.0.0-linux-x64.tar.gz
cd opensearch-1.0.0
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
cd config/
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_3"]
cluster.initial_master_nodes: ["host_1","host_2","host_3"]
./opensearch-tar-install.sh
cd config
sudo chmod 400 *.pem
./bin/opensearch -d
https://<opensearch_ip>/_cluster/health?pretty
Return this:
{
"cluster_name" : "my-application",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 3,
"number_of_data_nodes" : 3,
"discovered_master" : true,
"active_primary_shards" : 12,
"active_shards" : 25,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}