Elasticsearch configuration for docker bridge


(Olga) #1

Hello to everyone!
I'm trying to change the current configuration of ELK cluster from docker host mode into docker bridge and faced with some problems.
According to the documentation: https://www.elastic.co/blog/docker-networking when I run elasticsearch in bridge mode, I need to provide the following configuration:

"When running Elasticsearch, you will need to ensure it publishes to an IP address that is reachable from outside the container; this can be configured via the setting network.publish_host.
For the discovery between the nodes you have to configure Zen Discovery via the settings discovery.zen.ping.unicast.hosts and discovery.zen.minimum_master_nodes."
Example:

docker run -d -p 9200:9200 -p 9300:9300 elasticsearch:2
elasticsearch
-Des.discovery.zen.ping.unicast.hosts=192.168.99.100,192.168.99.101
-Des.discovery.zen.minimum_master_nodes=2
-Des.network.publish_host=192.168.99.100
docker run -d -p 9200:9200 -p 9300:9300 elasticsearch:2
elasticsearch
-Des.discovery.zen.ping.unicast.hosts=192.168.99.100,192.168.99.101
-Des.discovery.zen.minimum_master_nodes=2
-Des.network.publish_host=192.168.99.101

We need to run elasticsearch on each node. So when I start a cluster with 3 nodes, it looks ok, I can provide needed zen parameters. But if the cluster scale up, how will old nodes know about a new one? New ip-addresses should be added to the Des.discovery.zen.ping.unicast.hosts of currently running dockers with elasticsearch.

Could you please clarify to me how the configuration should be set up? All docker containers are under Marathon control.

Thanks,
Olga


(Olga) #2


Here was a similar problem and was workarounded by running elasticsearch in docker host mode.

Does anyone faced with running elasticsearch in bridge mode? Will appreciate any help


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.