Created
April 3, 2018 21:16
-
-
Save jmaitrehenry/b6e97872eaa8ef53b0e34fec6d861650 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
version: "3.4" | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.1.4 | |
environment: | |
- cluster.name=logs-cluster | |
# - bootstrap.memory_lock=true | |
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
- "discovery.zen.ping.unicast.hosts=tasks.elasticsearch" | |
- "discovery.zen.minimum_master_nodes=2" | |
- http.host=0.0.0.0 | |
- "path.data=/elasticsearch/{{.Task.Slot}}" | |
- "network.host=_eth0:ipv4_" | |
- xpack.security.enabled=false | |
- node.name="es{{.Task.Slot}}" | |
hostname: "es{{.Task.Slot}}" | |
ports: | |
- 9200:9200 | |
deploy: | |
restart_policy: | |
condition: on-failure | |
# endpoint_mode: dnsrr | |
mode: 'replicated' | |
replicas: 3 | |
resources: | |
limits: | |
memory: 1G | |
# ulimits: | |
# memlock: | |
# soft: -1 | |
# hard: -1 | |
volumes: | |
- /Users/jmaitrehenry/work/swarm-stack/elasticsearch:/elasticsearch | |
networks: | |
- elasticsearch | |
networks: | |
elasticsearch: | |
driver: overlay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Is it working like you wrote it? I am gettting those errors::
[2019-04-16T16:43:07,573][WARN ][o.e.d.z.ZenDiscovery ] ["es3"] not enough master nodes discovered during pinging (found [[Candidate{node={"es3"}{d__2r9NGRd6_JF-pXcGLrA}{GTzh0suOQnaKWHL7GRkn2g}{10.255.0.253}{10.255.0.253:9300}{ml.machine_memory=1073741824, ml.max_open_jobs=20, ml.enabled=true}, clusterStateVersion=-1}]], but needed [3]), pinging again