-
Notifications
You must be signed in to change notification settings - Fork 26
/
docker-compose.yml
163 lines (154 loc) · 4.97 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
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
version: '2'
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
networks:
- kfk
kafka1:
image: wurstmeister/kafka
ports:
- "19092:9092"
- "1099"
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka1
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LOG_DIRS: /kafka/logs
KAFKA_BROKER_ID: 500
KAFKA_CREATE_TOPICS: "topicA:1:1,topicB:1:1,topicC:1:1,topicB:1:1"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_NUM_PARTITIONS: 3
KAFKA_JMX_OPTS: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka1 -Dcom.sun.management.jmxremote.rmi.port=1099"
JMX_PORT: 1099
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- kfk
kafka2:
image: wurstmeister/kafka
ports:
- "9092"
- "1099"
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka2
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LOG_DIRS: /kafka/logs
KAFKA_BROKER_ID: 501
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_NUM_PARTITIONS: 3
KAFKA_JMX_OPTS: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka2 -Dcom.sun.management.jmxremote.rmi.port=1099"
JMX_PORT: 1099
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- kfk
kafka3:
image: wurstmeister/kafka
ports:
- "9092"
- "1099"
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka3
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LOG_DIRS: /kafka/logs
KAFKA_BROKER_ID: 502
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_NUM_PARTITIONS: 3
KAFKA_JMX_OPTS: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka3 -Dcom.sun.management.jmxremote.rmi.port=1099"
JMX_PORT: 1099
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- kfk
start_3party_dependencies:
image: dadarek/wait-for-dependencies
environment:
- SLEEP_LENGTH=5
- TIMEOUT_LENGTH=120
networks:
- kfk
depends_on:
- kafka1
command: kafka1:9092
kafka_dummy_consumer:
container_name: kafka_dummy_consumer
hostname: kafka_dummy_consumer
build:
context: consumer-producer
entrypoint: [
"java",
"-Dcom.sun.management.jmxremote",
"-Djava.rmi.server.hostname=kafka_dummy_consumer",
"-Dcom.sun.management.jmxremote.port=1087",
"-Dcom.sun.management.jmxremote.rmi.port=1087",
"-Dcom.sun.management.jmxremote.local.only=false",
"-Dcom.sun.management.jmxremote.authenticate=false",
"-Dcom.sun.management.jmxremote.ssl=false",
"-jar",
"./target/kafka_dummy-1.0-jar-with-dependencies.jar"
]
command: ["consumer","kafka1:9092","topicA","groupA"]
networks:
- kfk
depends_on:
- start_3party_dependencies
kafka_dummy_consumer2:
container_name: kafka_dummy_consumer2
hostname: kafka_dummy_consumer2
build:
context: consumer-producer
entrypoint: [
"java",
"-Dcom.sun.management.jmxremote",
"-Djava.rmi.server.hostname=kafka_dummy_consumer2",
"-Dcom.sun.management.jmxremote.port=1088",
"-Dcom.sun.management.jmxremote.rmi.port=1088",
"-Dcom.sun.management.jmxremote.local.only=false",
"-Dcom.sun.management.jmxremote.authenticate=false",
"-Dcom.sun.management.jmxremote.ssl=false",
"-jar",
"./target/kafka_dummy-1.0-jar-with-dependencies.jar"
]
command: ["consumer","kafka1:9092","topicA","groupA"]
networks:
- kfk
depends_on:
- start_3party_dependencies
kafka_dummy_producer:
container_name: kafka_dummy_producer
hostname: kafka_dummy_producer
build:
context: consumer-producer
entrypoint: [
"java",
"-Dcom.sun.management.jmxremote",
"-Djava.rmi.server.hostname=kafka_dummy_producer",
"-Dcom.sun.management.jmxremote.port=1089",
"-Dcom.sun.management.jmxremote.rmi.port=1089",
"-Dcom.sun.management.jmxremote.local.only=false",
"-Dcom.sun.management.jmxremote.authenticate=false",
"-Dcom.sun.management.jmxremote.ssl=false",
"-jar",
"./target/kafka_dummy-1.0-jar-with-dependencies.jar"
]
command: ["producer","kafka1:9092","topicA"]
networks:
- kfk
depends_on:
- start_3party_dependencies
nri-kafka:
container_name: integration_nri_kafka_1
build:
context: ../../
dockerfile: tests/integration/Dockerfile
args:
- NRJMX_VERSION=${NRJMX_VERSION}
networks:
- kfk
networks:
kfk:
driver: bridge