2017-05-11 11:36:32 +02:00

107 lines
3.6 KiB
YAML

version: '2'
services:
es-master:
labels:
io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
io.rancher.container.hostname_override: container_name
io.rancher.sidekicks: es-storage
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
environment:
- "cluster.name=${cluster_name}"
- "node.name=$${HOSTNAME}"
- "bootstrap.memory_lock=true"
- "xpack.security.enabled=false"
- "ES_JAVA_OPTS=-Xms${master_heap_size} -Xmx${master_heap_size}"
- "discovery.zen.ping.unicast.hosts=es-master"
- "discovery.zen.minimum_master_nodes=${minimum_master_nodes}"
- "node.master=true"
- "node.data=false"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
mem_limit: ${master_mem_limit}
mem_swappiness: 0
cap_add:
- IPC_LOCK
volumes_from:
- es-storage
es-data:
labels:
io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
io.rancher.container.hostname_override: container_name
io.rancher.sidekicks: es-storage
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
environment:
- "cluster.name=${cluster_name}"
- "node.name=$${HOSTNAME}"
- "bootstrap.memory_lock=true"
- "xpack.security.enabled=false"
- "discovery.zen.ping.unicast.hosts=es-master"
- "ES_JAVA_OPTS=-Xms${data_heap_size} -Xmx${data_heap_size}"
- "node.master=false"
- "node.data=true"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
mem_limit: ${data_mem_limit}
mem_swappiness: 0
cap_add:
- IPC_LOCK
volumes_from:
- es-storage
depends_on:
- es-master
es-client:
labels:
io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
io.rancher.container.hostname_override: container_name
io.rancher.sidekicks: es-storage
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
environment:
- "cluster.name=${cluster_name}"
- "node.name=$${HOSTNAME}"
- "bootstrap.memory_lock=true"
- "xpack.security.enabled=false"
- "discovery.zen.ping.unicast.hosts=es-master"
- "ES_JAVA_OPTS=-Xms${client_heap_size} -Xmx${client_heap_size}"
- "node.master=false"
- "node.data=false"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
mem_limit: ${client_mem_limit}
mem_swappiness: 0
cap_add:
- IPC_LOCK
volumes_from:
- es-storage
depends_on:
- es-master
es-storage:
labels:
io.rancher.container.start_once: true
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
entrypoint: /bin/true
volumes:
- es-storage-volume:/usr/share/elasticsearch/data
volumes:
es-storage-volume:
driver: local
per_container: true