dia_nc_pelican.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. from diagrams import Cluster, Diagram
  2. from diagrams.azure.database import DatabaseForMariadbServers
  3. from diagrams.onprem.inmemory import Redis
  4. from diagrams.onprem.container import Docker
  5. from diagrams.onprem.network import Nginx, Internet
  6. from diagrams.onprem.groupware import Nextcloud
  7. import diagrams.generic.storage as storage_1
  8. import diagrams.outscale.storage as storage_2
  9. from diagrams.azure.identity import Groups
  10. with Diagram(filename="./assets/dia_nc_pelican", show=False):
  11. out = Internet("Internet")
  12. ldap = Groups("LDAP")
  13. nfs = storage_1.Storage("NFS")
  14. with Cluster("Interactive workstation"):
  15. local_storage = storage_2.Storage("local storage")
  16. with Cluster("Containers"):
  17. docker = Docker("Docker")
  18. with Cluster("SSL Proxy"):
  19. proxy = Nginx("Nginx")
  20. with Cluster("Web server"):
  21. nc_frontend = Nextcloud()
  22. ldap >> nc_frontend << nfs
  23. with Cluster("Database"):
  24. nc_db = DatabaseForMariadbServers("MariaDB")
  25. nc_frontend << nc_db
  26. with Cluster("Caching"):
  27. nc_redis = Redis("Redis")
  28. nc_frontend << nc_redis
  29. nc_frontend << local_storage
  30. out >> proxy >> nc_frontend
  31. out << proxy << nc_frontend