Skip to content

Commit

Permalink
updated new example
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoconno committed Jan 27, 2021
1 parent 49f9c3b commit 9f84621
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions examples/jenkins-server-on-azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")


0 comments on commit 9f84621

Please sign in to comment.