structurizr / cli

A command line utility for Structurizr.
https://docs.structurizr.com/cli
Apache License 2.0
491 stars 75 forks source link

structrurizr export is creating multiple, partial plant uml files #46

Closed jamesla closed 3 years ago

jamesla commented 3 years ago

When trying to export the following example using structurizr-cli export -workspace test.dsl -format plantuml -output .build-cache It creates 5 files:

structurizr-AmazonWebServicesDeployment-1.puml structurizr-AmazonWebServicesDeployment-2.puml structurizr-AmazonWebServicesDeployment-3.puml structurizr-AmazonWebServicesDeployment-4.puml structurizr-AmazonWebServicesDeployment.puml

The numbered versions just seem to be versions of the non numbered file with bits missing.

How can I export just the complete plantuml?

workspace "Amazon Web Services Example" "An example AWS deployment architecture." {
    model {
        springPetClinic = softwaresystem "Spring PetClinic" "Allows employees to view and manage information regarding the veterinarians, the clients, and their pets." "Spring Boot Application" {
            webApplication = container "Web Application" "Allows employees to view and manage information regarding the veterinarians, the clients, and their pets." "Java and Spring Boot"
            database = container "Database" "Stores information regarding the veterinarians, the clients, and their pets." "Relational database schema" "Database"
        }

        webApplication -> database "Reads from and writes to" "JDBC/SSL"

        deploymentEnvironment "Live" {
            deploymentNode "Amazon Web Services" "" "" "Amazon Web Services - Cloud" {
                deploymentNode "US-East-1" "" "" "Amazon Web Services - Region" {
                    route53 = infrastructureNode "Route 53" "" "" "Amazon Web Services - Route 53"
                    elb = infrastructureNode "Elastic Load Balancer" "" "" "Amazon Web Services - Elastic Load Balancing"

                    deploymentNode "Autoscaling group" "" "" "Amazon Web Services - Auto Scaling" {
                        deploymentNode "Amazon EC2" "" "" "Amazon Web Services - EC2" {
                            webApplicationInstance = containerInstance webApplication
                        }
                    }

                    deploymentNode "Amazon RDS" "" "" "Amazon Web Services - RDS" {
                        deploymentNode "MySQL" "" "" "Amazon Web Services - RDS MySQL instance" {
                            databaseInstance = containerInstance database
                        }
                    }

                }
            }

            route53 -> elb "Forwards requests to" "HTTPS"
            elb -> webApplicationInstance "Forwards requests to" "HTTPS"
        }
    }

    views {
        deployment springPetClinic "Live" "AmazonWebServicesDeployment" {
            include *
            autolayout lr

            animation {
                route53
                elb
                webApplicationInstance
                databaseInstance
            }
        }

        styles {
            element "Element" {
                shape roundedbox
                background #ffffff
            }
            element "Database" {
                shape cylinder
            }
            element "Infrastructure Node" {
                shape roundedbox
            }
        }

        themes https://static.structurizr.com/themes/amazon-web-services-2020.04.30/theme.json
    }
}
simonbrowndotje commented 3 years ago

The animation command line parameter (which defaults to false) is being ignored, so you're getting all frames of the animation. A fix will be in the next release. In the meantime, you can remove/comment out the animation block.

jamesla commented 3 years ago

Ah yes animation, disabled and working. Thanks for your help @simonbrowndotje