-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
149 lines (147 loc) · 4.76 KB
/
docker-compose.yml
File metadata and controls
149 lines (147 loc) · 4.76 KB
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
---
services:
opensearch-node1:
image: opensearchproject/opensearch:latest
container_name: opensearch-node1
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-node1
- discovery.seed_hosts=opensearch-node1,opensearch-node2
- cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
- OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD} # Sets the demo admin user password when using demo configuration, required for OpenSearch 2.12 and higher
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems
hard: 65536
volumes:
- opensearch-data1:/usr/share/opensearch/data
ports:
- 9200:9200
- 9600:9600 # required for Performance Analyzer
networks:
- opensearch-net
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -k -u admin:${OPENSEARCH_INITIAL_ADMIN_PASSWORD} https://localhost:9200/_cluster/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
opensearch-node2:
image: opensearchproject/opensearch:latest
container_name: opensearch-node2
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-node2
- discovery.seed_hosts=opensearch-node1,opensearch-node2
- cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2
- bootstrap.memory_lock=true
- OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD}
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- opensearch-data2:/usr/share/opensearch/data
networks:
- opensearch-net
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -k -u admin:${OPENSEARCH_INITIAL_ADMIN_PASSWORD} https://localhost:9200/_cluster/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:latest
container_name: opensearch-dashboards
ports:
- 5601:5601
expose:
- '5601'
environment:
OPENSEARCH_HOSTS: '["https://opensearch-node1:9200","https://opensearch-node2:9200"]'
networks:
- opensearch-net
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:5601 || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 120s
depends_on:
opensearch-node1:
condition: service_healthy
opensearch-node2:
condition: service_healthy
logstash:
image: opensearchproject/logstash-oss-with-opensearch-output-plugin:latest
container_name: logstash
ports:
- 514:514/tcp # Syslog TCP
- 514:514/udp # Syslog UDP
- 5001:5001 # JSON TCP input
- 5044:5044 # Beats input
environment:
- LS_JAVA_OPTS=-Xmx512m -Xms512m
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD}
volumes:
- ./logstash/config:/usr/share/logstash/config
- ./logstash/pipeline:/usr/share/logstash/pipeline:ro
networks:
- opensearch-net
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9600/_node/stats"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
depends_on:
opensearch-node1:
condition: service_started
opensearch-node2:
condition: service_started
mcp-server:
build:
context: ./mcp-server
dockerfile: Dockerfile
container_name: opensearch-mcp-server
ports:
- 8000:8000 # MCP HTTP server
environment:
- OS_URL=${OS_URL:-https://opensearch-node1:9200}
- OS_USERNAME=${OS_USERNAME:-admin}
- OS_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD}
- MCP_HOST=${MCP_HOST:-0.0.0.0}
- MCP_PORT=${MCP_PORT:-8000}
- MCP_PATH=${MCP_PATH:-/mcp}
networks:
- opensearch-net
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 120s
depends_on:
opensearch-node1:
condition: service_healthy
opensearch-node2:
condition: service_healthy
volumes:
opensearch-data1:
opensearch-data2:
networks:
opensearch-net: