integrate changes from rawmind0, use optional sysctl container to set max_map_count on hosts
This commit is contained in:
parent
6f9fbae82f
commit
39d094f15f
@ -2,8 +2,4 @@
|
||||
|
||||
A scalable Elasticsearch cluster
|
||||
|
||||
## Notes
|
||||
|
||||
You have to set vm.max_map_count to atleast 262144 on each of the hosts that will run Elasticsearch!
|
||||
|
||||
To do so run `sudo sysctl -w vm.max_map_count=262144`
|
||||
WARN: To avoid vm.max_map_count errors you could set "Update host sysctl" to true. Then param vm.max_map_count will be update to 262144 if it's less in your hosts.
|
||||
|
@ -5,6 +5,9 @@ services:
|
||||
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
|
||||
{{- if eq .Values.UPDATE_SYSCTL "true" -}}
|
||||
,es-sysctl
|
||||
{{- end}}
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
|
||||
environment:
|
||||
- "cluster.name=${cluster_name}"
|
||||
@ -35,6 +38,9 @@ services:
|
||||
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
|
||||
{{- if eq .Values.UPDATE_SYSCTL "true" -}}
|
||||
,es-sysctl
|
||||
{{- end}}
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
|
||||
environment:
|
||||
- "cluster.name=${cluster_name}"
|
||||
@ -66,6 +72,9 @@ services:
|
||||
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
|
||||
{{- if eq .Values.UPDATE_SYSCTL "true" -}}
|
||||
,es-sysctl
|
||||
{{- end}}
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
|
||||
environment:
|
||||
- "cluster.name=${cluster_name}"
|
||||
@ -91,7 +100,7 @@ services:
|
||||
- es-storage
|
||||
depends_on:
|
||||
- es-master
|
||||
|
||||
|
||||
es-storage:
|
||||
labels:
|
||||
io.rancher.container.start_once: true
|
||||
@ -100,6 +109,17 @@ services:
|
||||
volumes:
|
||||
- es-storage-volume:/usr/share/elasticsearch/data
|
||||
|
||||
{{- if eq .Values.UPDATE_SYSCTL "true" }}
|
||||
es-sysctl:
|
||||
labels:
|
||||
io.rancher.container.start_once: true
|
||||
image: rawmind/alpine-sysctl:0.1
|
||||
privileged: true
|
||||
environment:
|
||||
- "SYSCTL_KEY=vm.max_map_count"
|
||||
- "SYSCTL_VALUE=262144"
|
||||
{{- end}}
|
||||
|
||||
volumes:
|
||||
es-storage-volume:
|
||||
driver: local
|
@ -11,6 +11,18 @@
|
||||
description: "Name of the Elasticsearch Cluster"
|
||||
default: "es-cluster"
|
||||
|
||||
- variable: "UPDATE_SYSCTL"
|
||||
label: "Update host sysctl:"
|
||||
description: |
|
||||
Set true to avoid vm.max_map_count errors.
|
||||
WARN: If set true, host param vm.max_map_count will be update to 262144.
|
||||
default: false
|
||||
required: true
|
||||
type: enum
|
||||
options:
|
||||
- false
|
||||
- true
|
||||
|
||||
- variable: "master_heap_size"
|
||||
type: "string"
|
||||
required: true
|
||||
|
Loading…
x
Reference in New Issue
Block a user