From 9f846210ada72dc9ec9850bbd949d4b26c4c02ef Mon Sep 17 00:00:00 2001 From: O'Connor Date: Wed, 27 Jan 2021 09:01:09 -0500 Subject: [PATCH] updated new example --- examples/jenkins-server-on-azure.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/examples/jenkins-server-on-azure.py b/examples/jenkins-server-on-azure.py index 1701cab..683c15c 100644 --- a/examples/jenkins-server-on-azure.py +++ b/examples/jenkins-server-on-azure.py @@ -2,7 +2,7 @@ from architectures.themes import Default, LightMode from architectures.providers.azure.general import Computer -from architectures.providers.azure.compute import VirtualMachine +from architectures.providers.azure.compute import VirtualMachineWindows from architectures.providers.azure.storage import ManagedDiskStandardHdd, StorageAccountBlob from architectures.providers.azure.security import KeyVault from architectures.providers.azure.networking import NetworkSecurityGroupClassic, VirtualNetwork, VirtualSubnet @@ -11,25 +11,28 @@ from architectures.providers.azure.identity import AzureActiveDirectory with Graph("Jenkins Server on Azure", theme=LightMode()): - computer = Computer() - active_directory = AzureActiveDirectory() - source_control = AzureRepo() with Cluster("Virtual Network") as virtual_network_cluster: with Cluster("Subnet") as subnet_cluster: + NetworkSecurityGroupClassic("NSG", width=".7") with Cluster("Scaled Agents") as scaled_agents_cluster: - vm1 = VirtualMachine("Build VM") - vm2 = VirtualMachine("Build VM") - vm3 = VirtualMachine("Build VM") + vm1 = VirtualMachineWindows("Build VM") + vm2 = VirtualMachineWindows("Build VM") + vm3 = VirtualMachineWindows("Build VM") agent_pool = [vm1, vm2, vm3] with Group(): - jenkins_server = VirtualMachine("Jenkins Server") - managed_discs = ManagedDiskStandardHdd() + jenkins_server = VirtualMachineWindows("Jenkins Server") + computer = Computer() + active_directory = AzureActiveDirectory() + source_control = AzureRepo() + managed_discs = ManagedDiskStandardHdd() monitor = AzureMonitor() key_vault = KeyVault() blob_storage = StorageAccountBlob() + Flow([computer, jenkins_server, [active_directory, managed_discs, scaled_agents_cluster, monitor]]) - Edge(scaled_agents_cluster, [key_vault, blob_storage]) + Edge(vm3, [key_vault, blob_storage], ltail=scaled_agents_cluster.name) Edge(source_control, jenkins_server) + Flow([vm1, vm2, vm3], style="invis")