-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjustfile
More file actions
55 lines (44 loc) · 1.13 KB
/
justfile
File metadata and controls
55 lines (44 loc) · 1.13 KB
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
# vim: set filetype=just :
# show help
help:
just --list --unsorted
[ no-cd ]
[ private]
check-config:
@test -f lab.clab.yml || (echo "lab.clab.yml not found" ; exit 1)
# build docker image
[no-cd]
build imagename="":
docker build -t {{imagename}} -f config/{{imagename}}.dockerfile .
# deploy containerlab lab
[no-cd]
deploy options="": check-config
sudo containerlab deploy {{options}}
# info containerlab lab
[no-cd]
info: check-config
@test -f lab.clab.yml || (echo "lab.clab.yml not found" ; exit 1)
sudo containerlab inspect
# destroy containerlab lab
[no-cd]
destroy: check-config
@test -f lab.clab.yml || (echo "lab.clab.yml not found" ; exit 1)
sudo containerlab destroy || true
# launch unit test lab
[no-cd]
test:
@bats test.bats
# generate d2 diagram
[no-cd]
diagram:
@test -f diagram.d2 || (echo "diagram.d2 not found" ; exit 1)
@d2 --theme 200 diagram.d2
# start edgeshark
edgeshark-start:
DOCKER_DEFAULT_PLATFORM= docker compose -f tools/edgeshark.yaml up -d
# stop edgeshark
edgeshark-stop:
docker compose -f tools/edgeshark.yaml down
# open edgeshark web interface
edgeshark-open:
xdg-open localhost:5001