Elasticsearch Docker容器处于非生产模式,以消除vm.max_map_count = 262144的要求 [英] Elasticsearch docker container in non-prod mode to eliminate vm.max_map_count=262144 requirement

查看:278
本文介绍了Elasticsearch Docker容器处于非生产模式,以消除vm.max_map_count = 262144的要求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何配置Elasticsearch Docker容器(elasticsearch:7.5.0)以使用更少的资源并以非生产模式运行?

How can I configure elasticsearch docker containers (elasticsearch:7.5.0) to use fewer resources and run in a nonproduction mode?

我想在Jenkins中运行容器并在我的桌面上达到用于在生产环境中运行docker映像的此弹性文档

I want to run containers in Jenkins and on my desktop and am hitting the requirement from this elastic doc for running docker images in production

我想弄清楚如何修改我的elasticsearch。 yml,我将其复制到容器中以对其进行配置,以将其设置为资源占用较少的模式。

I'd like to figure out how I can modify my elasticsearch.yml which I copy into the container to configure it to set the container into a less resource-intensive mode.

任何人都知道该怎么做吗?

anyone know how to do this?

推荐答案

您可以按照关闭单节点ES群集上的正式ES链接。如该链接中所述。

You can run your docker in development mode and create a single node ES cluster by following official ES link on single node ES cluster. As mention in this link.


要启动用于开发或
测试的单节点Elasticsearch集群,请指定单节点发现绕过引导检查:

To start a single-node Elasticsearch cluster for development or testing, specify single-node discovery to bypass the bootstrap checks:

简而言之,您要做的就是添加 -e发现。在您的docker命令中输入type = single-node ,这将启用开发模式,然后您不必满足生产环境的严格限制,即绕过引导检查 >。

In-short all you need to do is add -e "discovery.type=single-node" in your docker command, which would enable the dev mode and then you don't have to satisfy the hard limits of production environments ie it bypass bootstrap checks.

有关设置以及如何将其关闭的更多信息,请参见此处

More information on your settings and how to turn it off can be found here


node.store.allow_mmap。这是一个布尔设置,指示是否允许
不进行内存映射。默认值为允许。

node.store.allow_mmap. This is a boolean setting indicating whether or not memory-mapping is allowed. The default is to allow it.

因此,如果 -e discovery.type = single-node 环境不会将其关闭,那么您可以在 elasticsearch.yml 中明确将其设置为false。

So, if -e "discovery.type=single-node env. doesn't turn it off, then you can explicitly set it false in your elasticsearch.yml.

这篇关于Elasticsearch Docker容器处于非生产模式,以消除vm.max_map_count = 262144的要求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆