-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (42 loc) · 826 Bytes
/
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
TOPO=topo.yml
PREFIX=lab_
LEAF-1=$(PREFIX)Leaf-1
LEAF-2=$(PREFIX)Leaf-2
LEAF-3=$(PREFIX)Leaf-3
SPINE-1=$(PREFIX)Spine-1
SPINE-2=$(PREFIX)Spine-2
HOST-1=$(PREFIX)Host-1
HOST-2=$(PREFIX)Host-2
HOST-3=$(PREFIX)Host-3
LEAF=$(LEAF-1) $(LEAF-2) $(LEAF-3)
SPINE=$(SPINE-1) $(SPINE-2)
HOST=$(HOST-1) $(HOST-2) $(HOST-3)
NET=$(PREFIX)net-0
EXEC=docker exec -it
SHELL=/bin/sh
create:
docker-topo --create $(TOPO)
destroy:
docker-topo --destroy $(TOPO)
ps:
docker ps | grep $(PREFIX)
stats:
docker stats --no-stream $(LEAF) $(SPINE) $(HOST)
net:
docker network inspect $(NET)
l1:
$(EXEC) $(LEAF-1) Cli
l2:
$(EXEC) $(LEAF-2) Cli
l3:
$(EXEC) $(LEAF-3) Cli
s1:
$(EXEC) $(SPINE-1) Cli
s2:
$(EXEC) $(SPINE-2) Cli
h1:
$(EXEC) $(HOST-1) $(SHELL)
h2:
$(EXEC) $(HOST-2) $(SHELL)
h3:
$(EXEC) $(HOST-3) $(SHELL)