forked from elastic/apm-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
116 lines (111 loc) · 4.87 KB
/
docker-compose.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
version: '3.9'
services:
# This is a proxy used to block beats until all services are healthy.
# See: https://github.com/docker/compose/issues/4369
proxy_dep:
image: busybox
depends_on:
elasticsearch: { condition: service_healthy }
kibana: { condition: service_healthy }
fleet-server: { condition: service_healthy }
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.3.0-a2430aec-SNAPSHOT
ports:
- 9200:9200
healthcheck:
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=500ms"]
retries: 300
interval: 1s
environment:
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- "network.host=0.0.0.0"
- "transport.host=127.0.0.1"
- "http.host=0.0.0.0"
- "cluster.routing.allocation.disk.threshold_enabled=false"
- "discovery.type=single-node"
- "xpack.security.authc.anonymous.roles=remote_monitoring_collector"
- "xpack.security.authc.realms.file.file1.order=0"
- "xpack.security.authc.realms.native.native1.order=1"
- "xpack.security.enabled=true"
- "xpack.license.self_generated.type=trial"
- "xpack.security.authc.token.enabled=true"
- "xpack.security.authc.api_key.enabled=true"
- "logger.org.elasticsearch=${ES_LOG_LEVEL:-error}"
- "action.destructive_requires_name=false"
volumes:
- "./testing/docker/elasticsearch/roles.yml:/usr/share/elasticsearch/config/roles.yml"
- "./testing/docker/elasticsearch/users:/usr/share/elasticsearch/config/users"
- "./testing/docker/elasticsearch/users_roles:/usr/share/elasticsearch/config/users_roles"
- "./testing/docker/elasticsearch/ingest-geoip:/usr/share/elasticsearch/config/ingest-geoip"
kibana:
image: docker.elastic.co/kibana/kibana:8.3.0-a2430aec-SNAPSHOT
ports:
- 5601:5601
healthcheck:
test: ["CMD-SHELL", "curl -s http://localhost:5601/api/status | grep -q 'All services are available'"]
retries: 300
interval: 1s
environment:
ELASTICSEARCH_HOSTS: '["http://elasticsearch:9200"]'
ELASTICSEARCH_USERNAME: "${KIBANA_ES_USER:-kibana_system_user}"
ELASTICSEARCH_PASSWORD: "${KIBANA_ES_PASS:-changeme}"
XPACK_FLEET_AGENTS_FLEET_SERVER_HOSTS: '["https://fleet-server:8220"]'
XPACK_FLEET_AGENTS_ELASTICSEARCH_HOSTS: '["http://elasticsearch:9200"]'
XPACK_FLEET_REGISTRYURL: "http://package-registry:8080"
depends_on:
elasticsearch: { condition: service_healthy }
package-registry: { condition: service_healthy }
volumes:
- "./testing/docker/kibana/kibana.yml:/usr/share/kibana/config/kibana.yml"
fleet-server:
image: docker.elastic.co/beats/elastic-agent:8.3.0-a2430aec-SNAPSHOT
ports:
- 8220:8220
healthcheck:
test: ["CMD-SHELL", "curl -s -k https://localhost:8220/api/status | grep -q 'HEALTHY'"]
retries: 300
interval: 1s
environment:
FLEET_SERVER_ENABLE: "1"
FLEET_SERVER_POLICY_ID: "fleet-server-apm"
FLEET_SERVER_ELASTICSEARCH_HOST: http://elasticsearch:9200
FLEET_SERVER_ELASTICSEARCH_USERNAME: "${ES_SUPERUSER_USER:-admin}"
FLEET_SERVER_ELASTICSEARCH_PASSWORD: "${ES_SUPERUSER_PASS:-changeme}"
FLEET_SERVER_CERT: /etc/pki/tls/certs/fleet-server.pem
FLEET_SERVER_CERT_KEY: /etc/pki/tls/private/fleet-server-key.pem
FLEET_URL: https://fleet-server:8220
KIBANA_FLEET_SETUP: "true"
KIBANA_FLEET_HOST: "http://kibana:5601"
KIBANA_FLEET_USERNAME: "${ES_SUPERUSER_USER:-admin}"
KIBANA_FLEET_PASSWORD: "${ES_SUPERUSER_PASS:-changeme}"
depends_on:
elasticsearch: { condition: service_healthy }
kibana: { condition: service_healthy }
volumes:
- "./testing/docker/fleet-server/certificate.pem:/etc/pki/tls/certs/fleet-server.pem"
- "./testing/docker/fleet-server/key.pem:/etc/pki/tls/private/fleet-server-key.pem"
package-registry:
image: docker.elastic.co/package-registry/distribution:snapshot
ports:
- 8080
healthcheck:
test: ["CMD-SHELL", "curl --fail localhost:8080/health"]
retries: 100
interval: 5s
volumes:
- "./testing/docker/package-registry/config.yml:/package-registry/config.yml"
- "./build/integrations/apm:/packages/local/apm"
metricbeat:
image: docker.elastic.co/beats/metricbeat:8.3.0-a2430aec-SNAPSHOT
environment:
ELASTICSEARCH_HOSTS: '["http://elasticsearch:9200"]'
ELASTICSEARCH_USERNAME: "${KIBANA_ES_USER:-admin}"
ELASTICSEARCH_PASSWORD: "${KIBANA_ES_PASS:-changeme}"
depends_on:
elasticsearch: { condition: service_healthy }
fleet-server: { condition: service_healthy }
volumes:
- "./testing/docker/metricbeat/elasticsearch-xpack.yml://usr/share/metricbeat/modules.d/elasticsearch-xpack.yml"
- "./testing/docker/metricbeat/apm-server.yml://usr/share/metricbeat/modules.d/apm-server.yml"
profiles:
- monitoring