Skip to content

Elasticsearch configuration for docker bridge #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
butterflyinfly opened this issue May 16, 2017 · 2 comments
Closed

Elasticsearch configuration for docker bridge #163

butterflyinfly opened this issue May 16, 2017 · 2 comments

Comments

@butterflyinfly
Copy link

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

@yosifkit
Copy link
Member

I think as long as the initial nodes are still running you can just point the new nodes to the old ones with the uncast.hosts config (and their own publish_host as needed). But I am not really an elasticsearch expert.

This docker image/git repo has been deprecated (see readme), but elastic.co maintains and supports their own docker images and might better know how to answer your question in their git repo: https://github.com/elastic/elasticsearch-docker.

@tianon
Copy link
Member

tianon commented Oct 4, 2017

This image is officially deprecated in favor of upstream's images (see https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html).

For more information, please see #160, docker-library/docs#842, and docker-library/docs#945.

This image has been deprecated in favor of the official elasticsearch image provided and maintained by elastic.co. The upstream images are available to pull via docker.elastic.co/elasticsearch/elasticsearch:[version] like 5.4.2. The images found here will receive no further updates once the 5.6.0 release is available upstream. Please adjust your usage accordingly.

Elastic provides open-source support for Elasticsearch via the elastic/elasticsearch GitHub repository and the Docker image via the elastic/elasticsearch-docker GitHub repository, as well as community support via its forums.

Thanks!

@tianon tianon closed this as completed Oct 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants