Given you want to create a cluster named my-ecs-cluster, having 2 nodes with IP address 192.168.45.21 and 192.168.45.21 (change it according to your setup, you might also want to use hostnames instead of IPs)

Then edit /opt/elasticsearch/config/elasticsearch.yml on the first node, changing/uncommenting the following lines: