Last active
August 29, 2015 14:17
-
-
Save brandocorp/0f11efdb4680b2f3aeb4 to your computer and use it in GitHub Desktop.
Elasticsearch Unicast across Docker Hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Docker Host 01 | |
# eth0: 192.168.1.10 | |
# | |
docker run -d \ | |
-p 9200:9200 \ | |
-p 9300:9300 \ | |
ehazlett/elasticsearch \ | |
--cluster.name=unicast \ | |
--network.publish_host=192.168.1.10 \ | |
--discovery.zen.ping.multicast.enabled=false \ | |
--discovery.zen.ping.unicast.hosts=192.168.1.20 \ | |
--discovery.zen.ping.timeout=3s \ | |
--discovery.zen.minimum_master_nodes=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Docker Host 02 | |
# eth0: 192.168.1.20 | |
# | |
docker run -d \ | |
-p 9200:9200 \ | |
-p 9300:9300 \ | |
ehazlett/elasticsearch \ | |
--cluster.name=unicast \ | |
--network.publish_host=192.168.1.20 \ | |
--discovery.zen.ping.multicast.enabled=false \ | |
--discovery.zen.ping.unicast.hosts=192.168.1.10 \ | |
--discovery.zen.ping.timeout=3s \ | |
--discovery.zen.minimum_master_nodes=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checking the cluster health should reveal the following:
Docker Host 01
Docker Host 02