Basic diagram of current infrastructure
This commit is contained in:
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
wiki-resources/images/* filter=lfs diff=lfs merge=lfs -text
|
||||||
7
wiki-resources/.gitignore
vendored
Normal file
7
wiki-resources/.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Created by venv; see https://docs.python.org/3/library/venv.html
|
||||||
|
bin/
|
||||||
|
lib/
|
||||||
|
lib64
|
||||||
|
include/
|
||||||
|
pyvenv.cfg
|
||||||
|
diagrams/__pycache__/
|
||||||
0
wiki-resources/diagrams/__init__.py
Normal file
0
wiki-resources/diagrams/__init__.py
Normal file
27
wiki-resources/diagrams/__main__.py
Normal file
27
wiki-resources/diagrams/__main__.py
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
'''
|
||||||
|
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')
|
||||||
8
wiki-resources/diagrams/personal.py
Normal file
8
wiki-resources/diagrams/personal.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
from diagrams.custom import Custom
|
||||||
|
|
||||||
|
def Gitea(name: str) -> Custom:
|
||||||
|
return Custom(name, './images/gitea.png')
|
||||||
|
|
||||||
|
def StaticSite(name: str) -> Custom:
|
||||||
|
return Custom(name, './images/website.png')
|
||||||
|
|
||||||
14
wiki-resources/requirements.txt
Normal file
14
wiki-resources/requirements.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
cfgv==3.5.0
|
||||||
|
diagrams==0.25.1
|
||||||
|
distlib==0.4.0
|
||||||
|
filelock==3.28.0
|
||||||
|
graphviz==0.20.3
|
||||||
|
identify==2.6.18
|
||||||
|
Jinja2==3.1.6
|
||||||
|
MarkupSafe==3.0.3
|
||||||
|
nodeenv==1.10.0
|
||||||
|
platformdirs==4.9.6
|
||||||
|
pre_commit==4.5.1
|
||||||
|
python-discovery==1.2.2
|
||||||
|
PyYAML==6.0.3
|
||||||
|
virtualenv==21.2.4
|
||||||
Reference in New Issue
Block a user