-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-fbos-cluster.yml
100 lines (93 loc) · 3.06 KB
/
docker-compose-fbos-cluster.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
# Кластерная версия инфраструктуры на базе
# OpenSearch (2 узла)
# OpenSearch Dashboards
# Fluent Bit
version: '3'
services:
app:
image: nginx:latest
ports:
- "8080:80"
depends_on:
- fluent-bit
volumes:
- ./volumes/nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./volumes/nginx/nginx.conf:/etc/nginx/nginx.conf
logging:
# используемый драйвер логгирования
driver: "fluentd"
options:
# куда посылать лог-сообщения, необходимо чтобы адрес
# совпадал с настройками плагина forward
fluentd-address: localhost:24224
# теги используются для маршрутизации лог-сообщений, тема
# маршрутизации будет рассмотрена ниже
tag: app.logs
fluent-bit:
container_name: fluent-bit
image: fluent/fluent-bit
ports:
# необходимо открыть порты, которые используются плагином forward
- "24224:24224"
- "24224:24224/udp"
- "2020:2020"
environment:
- opensearch_host=opensearch
- opensearch_user=admin
- opensearch_pass=admin
volumes:
- ./volumes/fluent-bit-etc/fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf
- ./volumes/fluent-bit-etc/parsers.conf:/fluent-bit/etc/parsers.conf
opensearch:
image: opensearchproject/opensearch:latest
environment:
- cluster.name=opensearch-cluster # Name the cluster
- node.name=opensearch # Name the node that will run in this container
- discovery.seed_hosts=opensearch,opensearch2 # Nodes to look for when discovering the cluster
- cluster.initial_cluster_manager_nodes=opensearch,opensearch2 # Nodes eligible to serve as cluster manager
- bootstrap.memory_lock=true
- ES_JAVA_OPTS=-Xms512m -Xmx512m
ports:
- '9200:9200'
- '9600:9600'
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- opensearch-data1:/usr/share/opensearch/data
opensearch2:
image: opensearchproject/opensearch:latest
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch2
- discovery.seed_hosts=opensearch,opensearch2
- cluster.initial_cluster_manager_nodes=opensearch,opensearch2
- bootstrap.memory_lock=true
- ES_JAVA_OPTS=-Xms512m -Xmx512m
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- opensearch-data2:/usr/share/opensearch/data
dashboards:
image: opensearchproject/opensearch-dashboards:latest
container_name: opensearch-dashboards
ports:
- 5601:5601
expose:
- "5601"
environment:
OPENSEARCH_HOSTS: '["https://opensearch:9200","https://opensearch2:9200"]'
depends_on:
- opensearch
volumes:
opensearch-data1:
opensearch-data2: