28 lines
928 B
Python
28 lines
928 B
Python
'''
|
|
This module is here to provide a consistent way of generating diagrams of the
|
|
current infrastrcuture
|
|
'''
|
|
|
|
from diagrams import Cluster
|
|
from diagrams import Diagram
|
|
from diagrams.k8s.compute import Pod
|
|
from diagrams.k8s.network import Service
|
|
from diagrams.custom import Custom
|
|
from diagrams.generic.compute import Rack
|
|
|
|
from personal import Gitea
|
|
from personal import StaticSite
|
|
|
|
|
|
if __name__ == '__main__':
|
|
with Diagram('Public Infrastructure', show=False):
|
|
with Cluster('Randy Random Host'):
|
|
nginx = Rack('Nginx LB')
|
|
git = Gitea('Gitea') >> nginx
|
|
tmp = StaticSite('Temper Blog') >> nginx
|
|
dev = StaticSite('Dev Blog') >> nginx
|
|
with Cluster('Namespace - playground'):
|
|
s = Pod('Sanity') >> Service('sanity.shockrah.xyz')
|
|
u = Pod('Uptime') >> Service('uptime.shockrah.xyz')
|
|
p = Pod('Wiki') >> Service('wiki.shockrah.xyz')
|