/ES_Cluster

Setting up a 3-node ES cluster

  1. Set value

sysctl -w vm.max_map_count=262144 echo 'vm.max_map_count=262144' >> /etc/sysctl.con

  1. Start docker swarm

docker swarm init

  1. Start master node with overlay network

docker-compose up -d

  1. Start an nginx service so that other nodes can view network

docker service create --name my-nginx --network es_cluster_with_overlay_backend --replicas 3 --publish published=8080,target=80 nginx:latest

  1. Start nodes on other hosts with overlay network

docker-compose up

Happy searching :)