-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiagram.py
29 lines (25 loc) · 1.04 KB
/
diagram.py
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
from diagrams import Cluster, Diagram, Edge
from diagrams.onprem.compute import Server
from diagrams.onprem.network import Nginx, Opnsense, Internet
from diagrams.onprem.container import Docker
from diagrams.onprem.storage import CephOsd # type: ignore
from diagrams.k8s.infra import Master, Node
with Diagram("Home Network Overview", show=True):
dmz_ingress = Nginx("DMZ Ingress: 192.168.11.5")
opnsense = Opnsense("OpnSense")
multi_gig_switch = Internet("1G Switch Lan 1")
with Cluster("UnRaid"):
unraid = [
Docker("Containers"),
CephOsd("Storage"),
Server("VMs")]
one_gb_switch = Internet("2.5G Switch Lan k8")
with Cluster("k8s"):
k8s = [
Master("Control 1"),
Master("Control 2"),
Master("Control 3"),
]
dmz_ingress >> opnsense >> Edge(label="192.168.1.x") >> multi_gig_switch >> unraid
dmz_ingress >> opnsense >> Edge(label="192.168.2.x") >> one_gb_switch >> k8s
dmz_ingress << Edge(label="DMZ: 192.168.11.x") << unraid[0]