-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
91 lines (78 loc) · 2.17 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
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
rows = 5
cols = 2
TPS = 1000
row_bound := $(shell echo $$(($(rows) - 1)))
col_bound := $(shell echo $$(($(cols) - 1)))
row_range := $(shell seq 0 $(row_bound))
col_range := $(shell seq 0 $(col_bound))
build-collector-docker :
docker build -t collector:latest -f Dockerfile.collector_and_mockup .
publish-collector-docker :
docker tag collector:latest pewulfman/tezos-rollup-celebration:collector; \
docker push pewulfman/tezos-rollup-celebration:collector
run-one-collector-docker :
docker run \
--name collector \
--net=host \
collector:latest \
0 0 1200 1000
run-collector-docker :
(trap 'kill 0' SIGINT; \
for row in $(row_range); do \
for col in $(col_range); do \
i=$$((($$row)*$(cols)+($$col))); \
port=$$((1200+$$i)); \
docker run \
--name collector$$i \
--net=host collector:latest \
$$row $$col $$port $(TPS) & \
done; \
done; \
wait \
)
build-random-collector-docker :
docker build -t collector:latest -f Dockerfile.collector_random .
publish-random-collector-docker :
docker tag collector:latest pewulfman/tezos-rollup-celebration:collector; \
docker push pewulfman/tezos-rollup-celebration:collector
run-one-random-collector-docker :
docker run \
--name collector \
--net=host \
collector:latest \
0 0 1200
run-random-collector-docker :
(trap 'kill 0' SIGINT; \
for row in $(row_range); do \
for col in $(col_range); do \
i=$$((($$row)*$(cols)+($$col))); \
port=$$((1200+$$i)); \
docker run \
--name collector$$i \
--net=host collector:latest \
$$row $$col $$port & \
done; \
done; \
wait \
)
build-aggregator-docker :
docker build -t aggregator:latest -f Dockerfile.aggregator .
publish-aggregator-docker :
docker tag aggregator:latest pewulfman/tezos-rollup-celebration:aggregator; \
docker push pewulfman/tezos-rollup-celebration:aggregator
run-aggregator-docker :
docker run \
-v $(PWD):/tmp \
-e CONFIG=/tmp/config.json \
--net=host \
aggregator
kill-and-clean-docker :
for row in $(row_range); do \
for col in $(col_range); do \
i=$$((($$row)*$(cols)+($$col))); \
docker kill collector$$i; \
docker rm collector$$i; \
done; \
done; \
docker kill aggregator; \
docker rm aggregator;