forked from uditrawat106/Kafka-Solace-Context-Propagation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
174 lines (167 loc) · 4.31 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
164
165
166
167
168
169
170
171
172
173
174
version: '3'
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
networks:
- solace_msg_net
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- 22181:2181
healthcheck:
test: 'nc -z localhost 2181'
interval: 30s
timeout: 10s
retries: 3
# start_period: 10s
kafka:
container_name: kafka-ps
image: confluentinc/cp-kafka:latest
networks:
- solace_msg_net
depends_on:
zookeeper:
condition: service_healthy
ports:
- 9092:9092
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-ps:9092,PLAINTEXT_HOST://kafka-ps:29092
#KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-ps:9092 for docker
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
healthcheck:
test: 'nc -z localhost 9092'
interval: 30s
timeout: 10s
retries: 3
# start_period: 10s
# Jaeger
jaeger-all-in-one:
image: jaegertracing/all-in-one:latest
command: [ "--memory.max-traces=1000" ]
networks:
- solace_msg_net
restart: always
ports:
- "16685:16685"
- "16686:16686"
- "16687:16687"
- "14268:14268"
- "14250:14250"
# Collector
otel-collector:
image: ${OTELCOL_IMG}
restart: always
command: [ "--config=/etc/otel-collector-config.yaml", "${OTELCOL_ARGS}" ]
hostname: otelcollector
networks:
- solace_msg_net
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
# - ./ot-all.json:/etc/otelcol/ot-all.json
ports:
- "1888:1888" # pprof extension
- "8888:8888" # Prometheus metrics exposed by the collector
- "8889:8889" # Prometheus exporter metrics
- "13133:13133" # health_check extension
- "4317:4317" # OTLP gRPC receiver
- "55679:55679" # zpages extension
depends_on:
- jaeger-all-in-one
solace:
container_name: solace-ps
image: ${PUBSUB_IMAGE}
networks:
- solace_msg_net
env_file:
- ./solace_config_keys.env
ports:
- '8008:8008'
- '5671:5671'
- '5672:5672'
- "${PUBSUB_PORT_NUMBER}:55555"
- '8080:8080'
- '5550:5550'
- '1943:1943'
- '55556:55556'
- '55443:55443'
- '55445:55445'
- '2222:2222'
shm_size: 2g
ulimits:
memlock: -1
nofile:
soft: 2448
hard: 42192
healthcheck:
test: 'curl -f http://localhost:8080'
interval: 30s
timeout: 10s
retries: 3
# start_period: 10s
prometheus:
container_name: prometheus
image: prom/prometheus:latest
restart: always
networks:
- solace_msg_net
ports:
- "9090:9090"
volumes:
- ./prometheus.yaml:/etc/prometheus/prometheus.yml
app-cons:
image: kafka-solace-opentelemetry-demo
build:
context: .
dockerfile: Dockerfile
environment:
- OTEL_SERVICE_NAME=app-consumer
- OTEL_METRICS_EXPORTER=otlp
- OTEL_TRACES_EXPORTER=otlp
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
entrypoint:
- sh
- -c
- |
java -cp /app/kafka-solace-context-propagation-1.0-SNAPSHOT.jar ConsumerApp
networks:
- solace_msg_net
depends_on:
kafka:
condition: service_healthy
solace:
condition: service_healthy
app-prod:
image: kafka-solace-opentelemetry-demo
build:
context: .
dockerfile: Dockerfile
environment:
- OTEL_SERVICE_NAME=app-producer
- OTEL_METRICS_EXPORTER=otlp
- OTEL_TRACES_EXPORTER=otlp
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
entrypoint:
- sh
- -c
- |
java -cp /app/kafka-solace-context-propagation-1.0-SNAPSHOT.jar KafkaProducerApp
networks:
- solace_msg_net
depends_on:
kafka:
condition: service_healthy
solace:
condition: service_healthy
# healthcheck:
# test: [ "CMD", "nc", "-z", "kafka", "29092" ]
# interval: 30s
# timeout: 10s
# retries: 3
networks:
solace_msg_net: