Last active
July 19, 2024 12:05
-
-
Save rodmhgl/9ebd901b6583ab1df598dbf068b0987d to your computer and use it in GitHub Desktop.
Revisions
-
rodmhgl revised this gist
Jul 19, 2024 . 1 changed file with 1 addition and 30 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -47,38 +47,9 @@ prduser >> prd_web_ci >> prd_apim >> prd_api_ci prduser << prd_web_ci << prd_apim << prd_api_ci with Diagram(name="Azure DevOps Lab", filename='apiops_ado', graph_attr=graph_attrs, show=False): with Cluster("Azure DevOps", graph_attr=graph_attrs): Repos("APIOPSDEMO", **node_attrs) extractor = Pipelines("Run-Extractor.yaml", **node_attrs) publisher = Pipelines("Run-Publisher.yaml", **node_attrs) publisherenv = Pipelines("Run-Publisher.yaml-with-env.yaml", **node_attrs) -
rodmhgl created this gist
Jul 19, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,84 @@ from diagrams import Cluster, Diagram, Edge from diagrams.azure.general import Usericon, Resourcegroups from diagrams.azure.compute import ContainerInstances from diagrams.azure.integration import APIManagement from diagrams.azure.devops import Devops, Pipelines, Repos graph_attrs = { 'bgcolor': 'snow2', 'fontsize': '48', 'labelloc': 'top', 'pad': '0.2', # Inches. } cluster_attrs = { 'fontsize': '14', 'labeljust': 'c', 'direction': 'LR' } node_attrs_no_lable = { 'width': '1.2', # Inches (1.4 is default). 'fontsize': '0', # Hide labels. } node_attrs = { 'width': '1.4', # Inches (1.4 is default). 'fontsize': '10', # Hide labels. } with Diagram(name="APIOps Azure Cloud Lab", filename='apiops', graph_attr=graph_attrs, show=False): # Components (order matters!): devuser = Usericon("enduser", **node_attrs_no_lable) prduser = Usericon("enduser", **node_attrs_no_lable) with Cluster("APIOPS-DEV-RG", graph_attr=cluster_attrs): dev_web_ci = ContainerInstances("APIOPS-DEV-CG-WEB", **node_attrs) dev_apim = APIManagement("APIOPSDEVAPIMLAB", **node_attrs) dev_api_ci = ContainerInstances("APIOPS-DEV-CG-API", **node_attrs) with Cluster("APIOPS-PRD-RG", graph_attr=cluster_attrs): prd_web_ci = ContainerInstances("APIOPS-PRD-CG-WEB", **node_attrs) prd_apim = APIManagement("APIOPSPRDAPIMLAB", **node_attrs) prd_api_ci = ContainerInstances("APIOPS-PRD-CG-API", **node_attrs) devuser >> dev_web_ci >> dev_apim >> dev_api_ci devuser << dev_web_ci << dev_apim << dev_api_ci prduser >> prd_web_ci >> prd_apim >> prd_api_ci prduser << prd_web_ci << prd_apim << prd_api_ci # with Cluster("Azure DevOps", graph_attr=graph_attrs): # Repos("APIOPSDEMO") # Pipelines("Run-Extractor.yaml") # Pipelines("Run-Publisher.yaml") # Pipelines("Run-Publisher.yaml-with-env.yaml") with Diagram(name="APIOps Azure Cloud Lab", filename='apiops_azure', graph_attr=graph_attrs, show=False): # Components (order matters!): devuser = Usericon("enduser", **node_attrs_no_lable) prduser = Usericon("enduser", **node_attrs_no_lable) with Cluster("APIOPS-DEV-RG", graph_attr=cluster_attrs): dev_web_ci = ContainerInstances("APIOPS-DEV-CG-WEB", **node_attrs) dev_apim = APIManagement("APIOPSDEVAPIMLAB", **node_attrs) dev_api_ci = ContainerInstances("APIOPS-DEV-CG-API", **node_attrs) with Cluster("APIOPS-PRD-RG", graph_attr=cluster_attrs): prd_web_ci = ContainerInstances("APIOPS-PRD-CG-WEB", **node_attrs) prd_apim = APIManagement("APIOPSPRDAPIMLAB", **node_attrs) prd_api_ci = ContainerInstances("APIOPS-PRD-CG-API", **node_attrs) with Cluster("ADO-SELFHOSTED-AGENT", graph_attr=cluster_attrs): agent = ContainerInstances("AZP-AGENT-98878", **node_attrs) devuser >> dev_web_ci >> dev_apim >> dev_api_ci devuser << dev_web_ci << dev_apim << dev_api_ci prduser >> prd_web_ci >> prd_apim >> prd_api_ci prduser << prd_web_ci << prd_apim << prd_api_ci with Diagram(name="Azure DevOps Lab", filename='apiops_ado', graph_attr=graph_attrs, show=False): with Cluster("Azure DevOps", graph_attr=graph_attrs): Repos("APIOPSDEMO", **node_attrs) extractor = Pipelines("Run-Extractor.yaml", **node_attrs) publisher = Pipelines("Run-Publisher.yaml", **node_attrs) publisherenv = Pipelines("Run-Publisher.yaml-with-env.yaml", **node_attrs)