This repository has been archived by the owner on Dec 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
swarm-stack.yml
133 lines (126 loc) · 2.99 KB
/
swarm-stack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
version: '3'
services:
elasticsearch:
image: khezen/elasticsearch:5
deploy:
mode: replicated
replicas: 3
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
environment:
HEAP_SIZE: 1g
HOSTS: '["elasticsearch"]'
MINIMUM_MASTER_NODES: 2
ELASTIC_PWD: changeme
KIBANA_PWD: changeme
LOGSTASH_PWD: changeme
BEATS_PWD: changeme
CA_PWD: changeme
KS_PWD: changeme
TS_PWD: changeme
SERVICE_PORTS: 9200, 9300
TCP_PORTS: 9200, 9300
volumes:
- /etc/elasticsearch:/usr/share/elasticsearch/config
- /data/elasticsearch:/usr/share/elasticsearch/data
hostname: elasticsearch
networks:
- elk
kibana:
image: khezen/kibana:5
deploy:
mode: replicated
replicas: 2
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
environment:
KIBANA_PWD: changeme
ELASTICSEARCH_HOST: elasticsearch
ELASTICSEARCH_PORT: 9200
SERVICE_PORTS: 5601
TCP_PORTS: 5601
volumes:
- /etc/kibana:/etc/kibana
- /etc/elasticsearch/searchguard/ssl:/etc/elasticsearch/searchguard/ssl
hostname: kibana
networks:
- elk
logstash:
image: khezen/logstash:5
deploy:
mode: replicated
replicas: 2
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
environment:
HEAP_SIZE: 1g
LOGSTASH_PWD: changeme
ELASTICSEARCH_HOST: elasticsearch
ELASTICSEARCH_PORT: 9200
TS_PWD: changeme
SERVICE_PORTS: 5000
TCP_PORTS: 5000
volumes:
- /etc/logstash:/etc/logstash/conf.d
- /etc/elasticsearch/searchguard/ssl:/etc/elasticsearch/searchguard/ssl
hostname: logstash
networks:
- elk
elastalert:
image: khezen/elastalert:support_es5
deploy:
mode: replicated
replicas: 1
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
environment:
ELASTALERT_USER: elastalert
ELASTALERT_PWD: changeme
ELASTICSEARCH_HOST: elasticsearch
ELASTICSEARCH_PORT: 9200
volumes:
- /etc/elastalert:/etc/elastalert
- /usr/share/elastalert/rules:/usr/share/elastalert/rules
networks:
- elk
load_balancer:
image: dockercloud/haproxy:1.6.2
depends_on:
- kibana
- elasticsearch
- logstash
deploy:
mode: global
restart_policy:
condition: any
placement:
constraints:
- node.role == manager
environment:
STATS_PORT: 9000
STATS_AUTH: stats:changeme
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- elk
ports:
- "8081:9000"
- "5601:5601"
- "9200:9200"
- "9300:9300"
- "5000:5000"
networks:
elk:
driver: overlay