Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ContainerInstance/SoftwareSystemInstance and auto-generation of deployment diagram #166

Closed
pjjv opened this issue Aug 27, 2021 · 1 comment

Comments

@pjjv
Copy link

pjjv commented Aug 27, 2021

Following workspace automatically generates deployment view:

workspace {
    

    model {
        softwareSystem "Software System" {
            foo = Container "Foo"
            bar = Container "Bar" {
                -> foo
            }
        }

        deploymentEnvironment Prod {
            deploymentNode Server1 {
                deploymentNode application.exe {
                    ContainerInstance bar
                }
                deploymentNode application2.exe {
                    ContainerInstance bar
                }
            }
            
            deploymentNode Server2 {
                ContainerInstance foo
            }
            
        }
    }

    views {
       
       
    }
}

while this not due to change to software systems:

workspace {
    

    model {
        foo = softwareSystem "Foo"
        bar = softwareSystem "Bar" {
            -> foo
        }


        deploymentEnvironment Prod {
            deploymentNode Server1 {
                deploymentNode application.exe {
                    softwareSystemInstance bar
                }
                deploymentNode application2.exe {
                    softwareSystemInstance bar
                }
            }
            
            deploymentNode Server2 {
                softwareSystemInstance foo
            }
            
        }
    }

    views {
       
       
    }
}

Should be mentioned in documentation that it will autogenerate deployment view only if it contains at least one containerInstance in deploymentEnvironment as this works:

workspace {
    

    model {
        foo = softwareSystem "Foo"
        softwareSystem "Bar" {
            bar = container "Bar" {
                -> foo
            }
        }


        deploymentEnvironment Prod {
            deploymentNode Server1 {
                deploymentNode application.exe {
                    containerInstance bar
                }
                deploymentNode application2.exe {
                    containerInstance bar
                }
            }
            
            deploymentNode Server2 {
                softwareSystemInstance foo
            }
            
        }
    }

    views {
       
       
    }
}

Generally not a big issue, only undocumented gotcha.

@simonbrowndotje simonbrowndotje transferred this issue from structurizr/dsl Aug 27, 2021
@simonbrowndotje
Copy link
Contributor

Thanks ... the createDefaultViews method wasn't checking for software system instances.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants