-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·67 lines (60 loc) · 1.38 KB
/
run.sh
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
#!/bin/bash
# docker containers
# kafka related
zk=zookeeper1
kfk=kafka1
kuis=kafka-ui-service
# logging related
jaegr=jaeger-container
zpkn=zipkin-container
otlcl=otel-collector-container
# fltc=fluentd-container
# application related
prods=product-service-container
prodsdb=products-db-container
ord=order-service-container
orddb=orders-db-container
cns=consumer-service-node-container
# ccs=consumer-service-cpp-container
kf=("zookeeper1" "kafka1" "kafka-ui-service")
lg=("jaeger-container","zipkin-container","otel-collector-container")
start_kafka(){
docker-compose -f deploy/kafka-compose.yaml up --build
}
start_logs(){
docker-compose -f deploy/logs-compose.yaml up --build
}
start_app(){
docker-compose -f deploy/docker-compose.yaml up --build
}
start_kafka &
kafka_active=false
while [ $kafka_active = false ];
do
kafka_active=true
for i in "${kf[@]}"
do
if [ $kafka_active = true ];
then
kafka_active=$(docker container inspect -f '{{.State.Running}}' $i)
fi
done
done
echo "done with kafkas..."
start_logs &
logs_active=false
while [ $logs_active = false ];
do
logs_active=true
for i in "${lg[@]}"
do
if [ $logs_active == true ];
then
logs_active=$(docker container inspect -f '{{.State.Running}}' $i)
fi
done
echo $logs_active
done
echo "done with logs..."
start_app &
wait