SHARE
TWEET

Untitled

a guest Jun 19th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. version: "3.7"
  2.  
  3. services:
  4. ################################################################################
  5. ################################## CONFIGURATION ###############################
  6. ################################################################################
  7.   visualizer:
  8.     image: dockersamples/visualizer:stable
  9.     networks:
  10.       - net
  11.     volumes:
  12.       - /var/run/docker.sock:/var/run/docker.sock
  13.     deploy:
  14.       labels:
  15.         - "traefik.port=8080"
  16.         - "traefik.backend=visualizer"
  17.         - "traefik.frontend.rule=Host:visualizer-elk.xxx.fr"
  18.         - "traefik.frontend.auth.basic=admin:$$2y$$05$$vHovNtz4FPZx49eK0JeGoenXLA4D/5h0i5QoS50L90GN3OlfFkjW."
  19.       mode: replicated
  20.       replicas: 1
  21.       placement:
  22.         constraints:
  23.           - node.role == manager
  24.       resources:
  25.         limits:
  26.           memory: 256M
  27.         reservations:
  28.           memory: 128M
  29.  
  30.   traefik:
  31.     image: traefik:1.7
  32.     ports:
  33.       - "80:80"
  34.       - "443:443"
  35.     networks:
  36.       - net
  37.     volumes:
  38.       - /var/run/docker.sock:/var/run/docker.sock
  39.     deploy:
  40.       mode: 'global'
  41.       placement:
  42.         constraints:
  43.           - node.role == manager
  44.       resources:
  45.         limits:
  46.           memory: 256M
  47.         reservations:
  48.           memory: 128M
  49. ################################################################################
  50. ################################### ELK STACK ##################################
  51. ################################################################################
  52.   elastic-master:
  53.     image: docker.elastic.co/elasticsearch/elasticsearch:6.7.0
  54.     environment:
  55.       discovery.zen.minimum_master_nodes: 2
  56.       discovery.zen.ping.unicast.hosts: elastic-master
  57.       discovery.zen.ping_timeout: 5s
  58.       discovery.zen.commit_timeout: 5s
  59.       node.master: "true"
  60.       node.data: "false"
  61.       node.ingest: "false"
  62.       cluster.remote.connect: "false"
  63.       cluster.name: docker-swarm-cluster
  64.       network.host: 0.0.0.0
  65.       ES_JAVA_OPTS: -Xms1g -Xmx1g
  66.     networks:
  67.       - net
  68.     deploy:
  69.       endpoint_mode: dnsrr
  70.       mode: 'replicated'
  71.       replicas: 3
  72.       update_config:
  73.         parallelism: 1
  74.         delay: 10s
  75.       placement:
  76.         constraints: [node.labels.elk == master]
  77.       resources:
  78.         limits:
  79.           memory: 4G
  80.         reservations:
  81.           memory: 2G
  82.  
  83.   elastic-data-1:
  84.     image: docker.elastic.co/elasticsearch/elasticsearch:6.7.0
  85.     environment:
  86.       discovery.zen.minimum_master_nodes: 2
  87.       discovery.zen.ping.unicast.hosts: elastic-master
  88.       discovery.zen.ping_timeout: 5s
  89.       discovery.zen.commit_timeout: 5s
  90.       node.master: "false"
  91.       node.data: "true"
  92.       node.ingest: "false"
  93.       cluster.remote.connect: "false"
  94.       cluster.name: docker-swarm-cluster
  95.       network.host: 0.0.0.0
  96.       ES_JAVA_OPTS: -Xms1g -Xmx1g
  97.     networks:
  98.       - net
  99.     volumes:
  100.       - esdata1:/usr/share/elasticsearch/data
  101.     deploy:
  102.       placement:
  103.        constraints: [node.hostname == swarm1]
  104.       mode: 'replicated'
  105.       replicas: 1
  106.       resources:
  107.         limits:
  108.           memory: 4G
  109.         reservations:
  110.           memory: 2G
  111.  
  112.   elastic-data-2:
  113.     image: docker.elastic.co/elasticsearch/elasticsearch:6.7.0
  114.     environment:
  115.       discovery.zen.minimum_master_nodes: 2
  116.       discovery.zen.ping.unicast.hosts: elastic-master
  117.       discovery.zen.ping_timeout: 5s
  118.       discovery.zen.commit_timeout: 5s
  119.       node.master: "false"
  120.       node.data: "true"
  121.       node.ingest: "false"
  122.       cluster.remote.connect: "false"
  123.       cluster.name: docker-swarm-cluster
  124.       network.host: 0.0.0.0
  125.       ES_JAVA_OPTS: -Xms1g -Xmx1g
  126.     networks:
  127.       - net
  128.     volumes:
  129.       - esdata2:/usr/share/elasticsearch/data
  130.     deploy:
  131.       placement:
  132.         constraints: [node.hostname ==swarm2]
  133.       mode: 'replicated'
  134.       replicas: 1
  135.       resources:
  136.         limits:
  137.           memory: 4G
  138.         reservations:
  139.           memory: 2G
  140.  
  141.   elastic-coordination:
  142.     image: docker.elastic.co/elasticsearch/elasticsearch:6.7.0
  143.     environment:
  144.       discovery.zen.minimum_master_nodes: 2
  145.       discovery.zen.ping.unicast.hosts: elastic-master
  146.       discovery.zen.ping_timeout: 5s
  147.       discovery.zen.commit_timeout: 5s
  148.       node.master: "false"
  149.       node.data: "false"
  150.       node.ingest: "true"
  151.       cluster.remote.connect: "false"
  152.       cluster.name: docker-swarm-cluster
  153.       network.host: 0.0.0.0
  154.       ES_JAVA_OPTS: -Xms1g -Xmx1g
  155.     networks:
  156.       - net
  157.     deploy:
  158.       endpoint_mode: dnsrr
  159.       mode: 'global'
  160.       update_config:
  161.         parallelism: 2
  162.         delay: 10s
  163.       resources:
  164.         limits:
  165.           memory: 4G
  166.         reservations:
  167.           memory: 2G
  168.  
  169.   kibana:
  170.     image: docker.elastic.co/kibana/kibana:6.7.0
  171.     environment:
  172.       ELASTICSEARCH_HOSTS: http://elastic-coordination:9200
  173.     networks:
  174.       - net
  175.     deploy:
  176.       labels:
  177.         - "traefik.enable=true"
  178.         - "traefik.port=5601"
  179.         - "traefik.backend=kibana"
  180.         - "traefik.frontend.rule=Host:kibana-elk.xxx.fr"
  181.         - "traefik.frontend.auth.basic=admin:$$2y$$05$$vHovNtz4FPZx49eK0JeGoenXLA4D/5h0i5QoS50L90GN3OlfFkjW."
  182.       mode: replicated
  183.       replicas: 2
  184.       update_config:
  185.         parallelism: 1
  186.         delay: 10s
  187.       resources:
  188.         limits:
  189.           memory: 512M
  190.         reservations:
  191.           memory: 256M
  192.  
  193.   logstash-syslog:
  194.     image: docker.elastic.co/logstash/logstash:6.7.2
  195.     ports:
  196.       - "5000:5000/udp"
  197.     networks:
  198.       - net
  199.     deploy:
  200.       mode: global
  201.       update_config:
  202.         parallelism: 2
  203.         delay: 10s
  204.       resources:
  205.         limits:
  206.           memory: 4G
  207.         reservations:
  208.           memory: 2G
  209.  
  210.  
  211. ################################################################################
  212. ################################# CONFIGURATION ################################
  213. ################################################################################
  214. networks:
  215.   net:
  216.     driver: overlay
  217.  
  218. volumes:
  219.     esdata1:
  220.     esdata2:
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top