Closed eoli3n closed 4 years ago
solved all my issues. Thx for your repo which helped a lot !
HI @eoli3n , How you solved this issue , can you please explain
I don't remember well, but here's my docker-stack file:
version: '3.7'
services:
es-master1:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.0
configs:
- source: elasticsearch_config
target: /usr/share/elasticsearch/config/elasticsearch.yml
environment:
node.name: elk_elasticsearch.1
network.publish_host: _eth0_
discovery.seed_hosts: tasks.es-master2,tasks.es-master3
cluster.initial_master_nodes: elk_elasticsearch.1,elk_elasticsearch.2,elk_elasticsearch.3
ELASTIC_PASSWORD: changeme
ES_JAVA_OPTS: "-Xmx2G -Xms2G"
ports:
- '9200:9200'
networks:
- elk
deploy:
placement:
constraints: [ node.hostname == tspeda-swarm-manager1 ]
mode: replicated
replicas: 1
resources:
limits:
memory: 2G
volumes:
- type: bind
source: /data/elasticsearch
target: /usr/share/elasticsearch/data
es-master2:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.0
configs:
- source: elasticsearch_config
target: /usr/share/elasticsearch/config/elasticsearch.yml
environment:
node.name: elk_elasticsearch.2
network.publish_host: _eth0_
discovery.seed_hosts: tasks.es-master1,tasks.es-master3
cluster.initial_master_nodes: elk_elasticsearch.1,elk_elasticsearch.2,elk_elasticsearch.3
ES_JAVA_OPTS: "-Xmx2G -Xms2G"
networks:
- elk
deploy:
placement:
constraints: [ node.hostname == tspeda-swarm-manager2 ]
mode: replicated
replicas: 1
resources:
limits:
memory: 2G
volumes:
- type: bind
source: /data/elasticsearch
target: /usr/share/elasticsearch/data
es-master3:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.0
configs:
- source: elasticsearch_config
target: /usr/share/elasticsearch/config/elasticsearch.yml
environment:
node.name: elk_elasticsearch.3
network.publish_host: _eth0_
discovery.seed_hosts: tasks.es-master1,tasks.es-master2
cluster.initial_master_nodes: elk_elasticsearch.1,elk_elasticsearch.2,elk_elasticsearch.3
ES_JAVA_OPTS: "-Xmx2G -Xms2G"
networks:
- elk
deploy:
placement:
constraints: [ node.hostname == tspeda-swarm-manager3 ]
mode: replicated
replicas: 1
resources:
limits:
memory: 2G
volumes:
- type: bind
source: /data/elasticsearch
target: /usr/share/elasticsearch/data
logstash:
image: docker.elastic.co/logstash/logstash:7.5.0
ports:
- "5000:5000"
- "9600:9600"
configs:
- source: logstash_config
target: /usr/share/logstash/config/logstash.yml
environment:
LS_JAVA_OPTS: "-Xmx1G -Xms1G"
networks:
- elk
deploy:
mode: replicated
replicas: 1
volumes:
- type: bind
source: /mnt/pipeline/
target: /usr/share/logstash/pipeline/
kibana:
image: docker.elastic.co/kibana/kibana:7.5.0
ports:
- "5601:5601"
configs:
- source: kibana_config
target: /usr/share/kibana/config/kibana.yml
networks:
- elk
- traefik-public
deploy:
mode: replicated
replicas: 1
redis:
image: redis:5.0.7-alpine
command: redis-server /usr/local/etc/redis/redis.conf
ports:
- "6379:6379"
configs:
- source: redis_config
target: /usr/local/etc/redis/redis.conf
networks:
- elk
deploy:
mode: replicated
replicas: 1
configs:
elasticsearch_config:
file: ./elasticsearch/config/elasticsearch.yml
logstash_config:
file: ./logstash/config/logstash.yml
kibana_config:
file: ./kibana/config/kibana.yml
redis_config:
file: ./redis/config/redis.conf
networks:
elk:
driver: overlay
# DEBUG
# docker run --network=elk_elk busybox busybox hostname
#attachable: true
traefik-public:
external: true
Hi, I'm trying to setup ES 7.4.1 cluster on swarm.
1° I have a question concerning the way you do. As you use
endpoint_mode
, and published port inmode: host
, you disabled mesh routing. But you did not constraint coordination containers placement on a node. As you don't know on which node coordination containers runs, and mesh routing is disabled, how to configure elasticsearch clients ?2° Is there any way to configure es cluster using mesh routing ?
3° I have some DNS issues Here's my
docker-stack.yml
elasticsearch.yml
elasticsearch_coordination.yml
When i run the stack, on
es-coordination
logs i getAny idea ?