25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 

25 satır
966 B

  1. from diagrams import Diagram, Edge
  2. from diagrams.azure.cluster import *
  3. from diagrams.azure.compute import VM
  4. from diagrams.onprem.container import Docker
  5. from diagrams.onprem.cluster import *
  6. from diagrams.azure.network import LoadBalancers
  7. with Diagram(name="", filename="azure", direction="TB", show=True):
  8. with Cluster("Azure"):
  9. with Region("East US2"):
  10. with AvailabilityZone("Zone 2"):
  11. with VirtualNetwork(""):
  12. with SubnetWithNSG("Private"):
  13. # with VMScaleSet(""): # Depends on PR-404
  14. with VMContents("A"):
  15. d1 = Docker("Container")
  16. with ServerContents("A1"):
  17. d2 = Docker("Container")
  18. with Subnet("Public"):
  19. lb = LoadBalancers()
  20. lb >> Edge(forward=True, reverse=True) >> d1
  21. lb >> Edge(forward=True, reverse=True) >> d2