dia_nc_dev_simple.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. from diagrams import Cluster, Diagram
  2. from diagrams.azure.database import SQLDatabases
  3. from diagrams.onprem.inmemory import Redis
  4. from diagrams.onprem.network import Internet
  5. from diagrams.onprem.groupware import Nextcloud
  6. from diagrams.onprem.monitoring import Grafana, Prometheus
  7. from diagrams.onprem.storage import Ceph, CephOsd
  8. from diagrams.onprem.network import Haproxy
  9. from diagrams.digitalocean.network import LoadBalancer
  10. import diagrams.generic.storage as storage_1
  11. from diagrams.azure.identity import Groups
  12. from diagrams.custom import Custom
  13. with Diagram(filename="./assets/dia_nc_dev_simple", show=False, direction="TB"):
  14. out = Internet("Intranet")
  15. with Cluster("SSL proxy"):
  16. openstack_lb = Custom("", "../assets/vagrant.png")
  17. lb = Haproxy()
  18. with Cluster("Web server"):
  19. openstack_web = Custom("", "../assets/vagrant.png")
  20. nc_frontend = Nextcloud()
  21. with Cluster("Caching"):
  22. openstack_cach = Custom("", "../assets/vagrant.png")
  23. redis = Redis()
  24. with Cluster("Control / Monitor"):
  25. openstack_ctrl = Custom("", "../assets/vagrant.png")
  26. ctrl = [Prometheus(), Grafana()]
  27. with Cluster("Database"):
  28. openstack_db = Custom("", "../assets/vagrant.png")
  29. db = SQLDatabases()
  30. openstack_cach << nc_frontend
  31. openstack_web >> openstack_db
  32. openstack_ctrl << openstack_lb >> openstack_web
  33. out >> lb
  34. openstack_web >> openstack_ctrl << openstack_db