mingrammer / diagrams

:art: Diagram as Code for prototyping cloud system architectures
https://diagrams.mingrammer.com
MIT License
39.36k stars 2.53k forks source link

Eatch time i create a diagram the renderng sequence changes #552

Open RajendraVenkata opened 3 years ago

RajendraVenkata commented 3 years ago

Hi All,

Each time I execute the below code the rendering sequence change. How do I fix the sequence?

from diagrams import Diagram, Cluster from diagrams.azure.compute import VMLinux, Disks from diagrams.azure.storage import NetappFiles from diagrams.azure.network import LoadBalancers, NetworkInterfaces

with Diagram("ECC", show=True, direction="BT") as diag:

with Cluster('zone1'):
    with Cluster('it-usw2-npe-playpen-ppg-EC-ppg_z1'):      

        with Cluster('it-usw2-npe-playpen_db-arg'):
            with Cluster('it-usw2-npe-playpen-asg-EC-db'):
                db_vm1 = VMLinux('musw21sydgc01') 
                db_nic1 = NetworkInterfaces('192.168.1.10')
                os_disk = Disks('disk_os')
                e_disk = Disks('disk-E01')
                f_disk = Disks('disk-F01')
                l_disk = Disks('disk-L01')
                s_disk = Disks('disk-S01')
                t_disk = Disks('disk-T01')
                print('1')

        with Cluster('it-usw2-npe-playpen_int-arg'):
            with Cluster('it-usw2-npe-playpen-asg-EC-ci'):
                ci_vm1 = VMLinux('musw21sycgc01') 
                ci_nic1 = NetworkInterfaces('192.168.2.13')
                ci_os_disk = Disks('disk_os')
                ci_e_disk = Disks('disk-E01')
                print('2')

            with Cluster('it-usw2-npe-playpen-asg-EC-app'):
                app_vm1 = VMLinux('musw21syagc01') 
                app_nic1 = NetworkInterfaces('192.168.2.11')
                app_os_disk = Disks('disk_os')
                app_e_disk = Disks('disk-E01')
                print('3')

app_vm1 << app_nic1
app_vm1 << app_e_disk
app_vm1 << app_os_disk
#
ci_vm1 << ci_nic1
ci_vm1 << ci_e_disk 
ci_vm1 << ci_os_disk
clayms commented 3 years ago

Is this possibly related to the issue below?

https://github.com/mingrammer/diagrams/issues/440

RajendraVenkata commented 3 years ago

Hi clayms, As suggested in #440 issue seems to be related to windows OS. I am getting consistent image for all runs. Many thanks Rajendra P Venkata