Basic diagram of current infrastructure
Some checks failed
Ansible Linting / ansible-lint (push) Failing after 6s
Secops Linting and Safety Checks / checkov-scan-s3 (push) Failing after 18s

This commit is contained in:
2026-04-19 11:20:51 -07:00
parent 31b2471f1c
commit 0cefc4baf9
6 changed files with 57 additions and 0 deletions

7
wiki-resources/.gitignore vendored Normal file
View 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__/

View File

View 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')

View 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')

View 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