autogenerate map from network info
This commit is contained in:
parent
4b9dae9b3a
commit
12644b80da
29
Makefile
29
Makefile
@ -5,13 +5,29 @@ help: ## Print the help message
|
|||||||
sort | \
|
sort | \
|
||||||
column -s ':' -t
|
column -s ':' -t
|
||||||
|
|
||||||
map.txt: map.ge ## Making map.txt
|
########## Network Map ##########
|
||||||
grep -v '# unimportant' $< | graph-easy --boxart > $@
|
|
||||||
cat $@
|
|
||||||
|
|
||||||
full_map.txt: map.ge ## Generating full_map.txt with graph-easy
|
graph_cmd = graph-easy --boxart
|
||||||
graph-easy --boxart < $< > $@
|
|
||||||
cat $@
|
queries = queries authqueries
|
||||||
|
|
||||||
|
query_formats = $(patsubst %, .dbs/%.txt, $(queries))
|
||||||
|
|
||||||
|
.dbs/:
|
||||||
|
mkdir $@
|
||||||
|
|
||||||
|
$(query_formats): .dbs/%.txt: | .dbs/
|
||||||
|
echo "[ {{name}} ] -- $(basename $(@F)) --> [ {{$(basename $(@F))}} ]" > $@
|
||||||
|
|
||||||
|
.PHONY: map
|
||||||
|
map: .dbs/network.txt ## Show a network map
|
||||||
|
$(graph_cmd) < $<
|
||||||
|
|
||||||
|
.dbs/network.txt: network.rec $(query_formats)
|
||||||
|
$(RM) .dbs/network.txt
|
||||||
|
$(foreach relation, $(queries), \
|
||||||
|
recsel $< -t lxc -e "$(relation) != ''" -p name,$(relation) | recfmt -f .dbs/$(relation).txt >> $@ ;\
|
||||||
|
)
|
||||||
|
|
||||||
########## Man Pages ##########
|
########## Man Pages ##########
|
||||||
|
|
||||||
@ -56,3 +72,4 @@ pages: $(kralmans) $(krovmans) $(setupmans) $(splintmans)
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(kralmans) $(krovmans)
|
$(RM) $(kralmans) $(krovmans)
|
||||||
|
$(RM) -r .dbs
|
||||||
|
39
map.ge
39
map.ge
@ -1,39 +0,0 @@
|
|||||||
# Network map of Decentrala. Use with:
|
|
||||||
# graph-easy --boxart < netmap.txt
|
|
||||||
|
|
||||||
(Mox
|
|
||||||
[ m_router ]{label: router ;}
|
|
||||||
[ wireguard ] --> [ m_nginx ]{label: nginx-11 ;}
|
|
||||||
[ wiki ] --> [ m_nginx ]
|
|
||||||
[ gitea ] --> [ m_nginx ]
|
|
||||||
[ tor11 ] --> [ m_nginx ] --> [ m_router ]
|
|
||||||
[ smtp ]
|
|
||||||
)
|
|
||||||
|
|
||||||
(Serverko
|
|
||||||
[ s_nginx ]{label: nginx-12 ;}
|
|
||||||
[ s_router ]{label: router ;}
|
|
||||||
[ s_nginx ] --> [ nextcloud ]
|
|
||||||
[ s_nginx ] --> [ tor12 ]
|
|
||||||
[ s_nginx ] --> [ s_router ]
|
|
||||||
)
|
|
||||||
|
|
||||||
(splint.rs # unimportant
|
|
||||||
[ soft-serve ] # unimportant
|
|
||||||
[ mail-cache ]# unimportant
|
|
||||||
) # unimportant
|
|
||||||
|
|
||||||
[ tor12 ] <..> [ onions ] <..> [ tor11 ]
|
|
||||||
[ m_router ] <..> [ BGP ] <..> [ madness ] <..> [ s_router ]
|
|
||||||
[ smtp ] <..> [ madness ]
|
|
||||||
[ madness ] <..> [ mail-cache ]# unimportant
|
|
||||||
[ A ]{label: "" ;}
|
|
||||||
[ B ]{label: "" ;}
|
|
||||||
[ C ]{label: "" ;}
|
|
||||||
[ D ]{label: "" ;}
|
|
||||||
[ onions ] <..> [ A ]
|
|
||||||
[ onions ] <..> [ B ]
|
|
||||||
[ A ] <..> [ C ]
|
|
||||||
[ B ] <..> [ D ]
|
|
||||||
|
|
||||||
(Sharks! [ D ])
|
|
Loading…
x
Reference in New Issue
Block a user