dia_nc_test_migration.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. from diagrams import Cluster, Diagram, Edge
  2. from diagrams.azure.database import DatabaseForMariadbServers
  3. from diagrams.azure.database import SQLDatabases
  4. from diagrams.onprem.inmemory import Redis
  5. from diagrams.onprem.network import Internet
  6. from diagrams.onprem.groupware import Nextcloud
  7. from diagrams.onprem.monitoring import Grafana, Prometheus
  8. from diagrams.onprem.network import Haproxy
  9. from diagrams.onprem.database import Mariadb
  10. from diagrams.onprem.storage import Glusterfs
  11. import diagrams.generic.storage as storage_1
  12. from diagrams.azure.identity import Groups
  13. from diagrams.onprem.storage import Ceph, CephOsd
  14. from diagrams.custom import Custom
  15. mypath="/home/pbarriat/Documents/Boulot/UCL/Brevet/report/assets/"
  16. with Diagram(filename="../assets/dia_nc_test_migration", show=True, direction="TB"):
  17. out = Internet("Intranet")
  18. ldap = Groups("LDAP")
  19. nfs = storage_1.Storage("NFS")
  20. with Cluster("Load Balancing"):
  21. openstack_lb = Custom("", mypath+"openstack.png")
  22. lb = [Haproxy("SSL proxy")]
  23. with Cluster("Web server"):
  24. openstack_web = Custom("", mypath+"openstack.png")
  25. nc_frontend = [ Nextcloud(), Custom("PHP Caching", mypath+"keydb.png")]
  26. with Cluster("Database"):
  27. openstack_db = Custom("", mypath+"openstack.png")
  28. nc_db = DatabaseForMariadbServers("Backup writer")
  29. with Cluster("Ceph Storage Cluster"):
  30. ceph_cluster = Ceph()
  31. ceph_object = CephOsd("Object Gateway")
  32. openstack_lb >> openstack_web << openstack_db
  33. ldap >> openstack_web << nfs
  34. ceph_cluster << Edge(label="Migration", color="firebrick") << openstack_web
  35. out >> lb