ssh -i ec2-user@ec2-52-90-10-56.compute-1.amazonaws.com sudo rpm -i https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.1-x86_64.rpm sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service -Xms4g
-Xmx4gEdit /etc/elasticsearch/elasticsearch.yml
cluster.name: demo-cluster
node.name: demo-node-1
network.host: <node-1-private-ip>
discovery.seed_hosts: ["<node-1-private-ip>", "<node-2-private-ip>"]
cluster.initial_master_nodes: ["<node-1-private-ip>"]
node.master: true
In the video above is I set "node.master: false" for Node 2. But you can make Node 2 as master as well
Go to the terminal of each node and run the following command
sudo systemctl start elasticsearch.serviceRunning the following command to verify that the cluster is up and is composed of two nodes
curl -X GET http://<node-1-ip>:9200/_cluster/health?prettyYou should also get the same results with node-2-ip as well