-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
91 lines (88 loc) · 2.9 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
---
version: '3.1'
services:
zookeeper1:
image: confluentinc/cp-zookeeper:5.4.1
hostname: zookeeper1
container_name: zookeeper1
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
broker1:
image: confluentinc/cp-enterprise-kafka:5.4.1
hostname: broker1
container_name: broker1
depends_on:
- zookeeper1
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper1:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker1:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
jolokia:
build: ./jolokia
tty: true
volumes:
- opt-jolokia:/opt/jolokia
sample-application:
build: ./sample-application
hostname: sample-application
container_name: sample-application
depends_on:
- zookeeper1
- broker1
- jolokia
environment:
JAVA_OPTS: -javaagent:/opt/jolokia/jolokia-jvm-1.6.2-agent.jar=host=0.0.0.0,port=8778 -Xmx256M -Xms256M
APPLICATION_MODE: "ALL"
APPLICATION_CREATE_TOPICS: "true"
KAFKA_BOOTSTRAP_SERVERS: "broker1:29092"
KAFKA_METRICS_RECORDING_LEVEL: "DEBUG"
volumes:
- opt-jolokia:/opt/jolokia
ports:
- "8778:8778"
splunk:
image: splunk/splunk
hostname: splunk
container_name: splunk
environment:
SPLUNK_START_ARGS: --accept-license
SPLUNK_PASSWORD: changeme
SPLUNK_ENABLE_LISTEN: 9997
SPLUNK_ADD: "tcp 1514, index telegraf_metrics -datatype metric"
SPLUNK_HEC_TOKEN: splunk_telegraf_hec_token
SPLUNK_ANSIBLE_POST_TASKS: "file:///opt/ansible/update_splunk_hec_token.yml"
volumes:
- "./splunk/update_splunk_hec_token.yml:/opt/ansible/update_splunk_hec_token.yml"
- "./splunk/telegraf-kafka-kafka-stream.xml:/opt/splunk/etc/apps/search/local/data/ui/views/telegraf-kafka-kafka-stream.xml"
- "./splunk/telegraf-kafka-producer.xml:/opt/splunk/etc/apps/search/local/data/ui/views/telegraf-kafka-producer.xml"
- "./splunk/telegraf-kafka-consumer.xml:/opt/splunk/etc/apps/search/local/data/ui/views/telegraf-kafka-consumer.xml"
- "./splunk/telegraf-kafka-consumer-topic-details.xml:/opt/splunk/etc/apps/search/local/data/ui/views/telegraf-kafka-consumer-topic-details.xml"
- opt-splunk-etc:/opt/splunk/etc
- opt-splunk-var:/opt/splunk/var
ports:
- "8000:8000"
- "9997:9997"
- "8088:8088"
- "1514:1514"
telegraf:
image: telegraf
hostname: telegraf
container_name: telegraf
depends_on:
- sample-application
- splunk
restart: always
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf
volumes:
opt-jolokia: {}
opt-splunk-etc: {}
opt-splunk-var: {}