jaegertracing / jaeger-openshift

Support for deploying Jaeger into OpenShift
https://jaegertracing.io/
Apache License 2.0
57 stars 37 forks source link

Set vm.max_map_count for Elasticsearch #51

Open pavolloffay opened 6 years ago

pavolloffay commented 6 years ago

I am creating an umbrella issue to track issues related to Elasticsearch image.

At the moment we are using quay.io/pires/docker-elasticsearch-kubernetes:5.6.2 because official 5.x image requires root permissions to run.

Somebody reported the same issue on https://github.com/elastic/elasticsearch-docker/issues/114. The last comment says that it will be fixed in 6.x. I have tried docker.elastic.co/elasticsearch/elasticsearch:6.1.2 on minishift and it worked out of the box with this fix https://github.com/kubernetes/minikube/issues/2367

minishift start
minishift ssh 'echo "sysctl -w vm.max_map_count=262144" | sudo tee -a /var/lib/boot2docker/bootlocal.sh'
minishift stop && minishift start
oc run es --image-pull-policy=IfNotPresent --restart=Never --image=docker.elastic.co/elasticsearch/elasticsearch:6.1.2
pavolloffay commented 6 years ago

For the limit issue see also: https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html.

VishalWadhwa commented 6 years ago

Hi This would work if we have control on host machine to change this value. In openshift kind of an environment we have control only on individual pod (if we use it as CAAS), how can we change vm.max_map_count in this kind of an environment?

pavolloffay commented 6 years ago

I am not aware of any other approach. https://github.com/openshift/openshift-ansible which deploys logging stack with ES uses the same approach

pavolloffay commented 6 years ago

Note that commands in the first comment do not work in minishift > 18. https://github.com/minishift/minishift/issues/2424 changed default boot2docker to centos.

It does still work if the minishift is started with --iso-url b2d

pavolloffay commented 5 years ago

minishift ssh -- 'sudo sysctl -w vm.max_map_count=262144'