-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
63 lines (52 loc) · 1.57 KB
/
Makefile
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
all: build run tables info
build:
#docker compose build --no-cache
docker compose build
run:
docker compose up -d
@echo "Waiting for Pinot Controller to be ready..."
@while true; do \
STATUS_CODE=$$(curl -s -o /dev/null -w '%{http_code}' \
'http://localhost:9000/health'); \
if [ "$$STATUS_CODE" -eq 200 ]; then \
break; \
fi; \
sleep 2; \
echo "Waiting for Pinot Controller..."; \
done
@echo "🍷 Pinot Controller is ready."
@echo "Waiting for Pinot Broker to be ready..."
@while true; do \
STATUS_CODE=$$(curl -s -o /dev/null -w '%{http_code}' \
'http://localhost:8099/health'); \
if [ "$$STATUS_CODE" -eq 200 ]; then \
break; \
fi; \
sleep 1; \
echo "Waiting for Pinot Broker..."; \
done
@echo "🍷 Pinot Broker is ready to receive queries."
@echo "🪲 Waiting for Kafka to be ready..."
@while ! nc -z localhost 9092; do \
sleep 1; \
echo "Waiting for Kafka..."; \
done
@echo "🪲 Kafka is ready."
tables:
docker exec pinot-controller ./bin/pinot-admin.sh \
AddTable \
-tableConfigFile /config/orders/table.json \
-schemaFile /config/orders/schema.json \
-exec
sleep 5
docker exec pinot-controller ./bin/pinot-admin.sh \
AddTable \
-tableConfigFile /config/order_items_enriched/table.json \
-schemaFile /config/order_items_enriched/schema.json \
-exec
info:
@printf "🍷 Pinot Query UI - \033[4mhttp://localhost:9000\033[0m\n"
@printf "🦝 Redpanda Console - \033[4mhttp://localhost:9080\033[0m\n"
@printf "👑 Streamlit Dashboard - \033[4mhttp://localhost:8502\033[0m\n"
stop:
docker compose down -v