Skip to content

Deployment Views (DSL)

Deployment views show the runtime infrastructure and where your software containers are deployed.

Before creating a deployment view, define the deployment topology in your model:

model {
system = softwareSystem "My System" {
api = container "API" "REST API" "Node.js"
db = container "Database" "Data storage" "PostgreSQL"
}
deploymentEnvironment "Production" {
deploymentNode "AWS" "Amazon Web Services" {
deploymentNode "ECS" "Elastic Container Service" {
containerInstance api
}
deploymentNode "RDS" "Relational Database Service" {
containerInstance db
}
}
}
deploymentEnvironment "Development" {
deploymentNode "Local Machine" {
deploymentNode "Docker" {
containerInstance api
containerInstance db
}
}
}
}
views {
deployment system "Production" "ProdView" {
include *
autoLayout
}
deployment * "Development" "DevView" {
include *
autoLayout
}
}
Parameter Description
Software system Which system’s containers to show. Use * for all systems.
Environment Which deployment environment to render (must match a deploymentEnvironment name).
DSL keyword Purpose
deploymentEnvironment Defines a named environment (e.g., Production, Staging, Development)
deploymentNode Infrastructure: server, VM, container host, cloud service
infrastructureNode Network infrastructure: load balancer, firewall, CDN
softwareSystemInstance An instance of a software system deployed to a node
containerInstance An instance of a container deployed to a node

Deployment nodes can be nested to represent infrastructure hierarchies:

deploymentNode "AWS" {
deploymentNode "us-east-1" {
deploymentNode "VPC" {
deploymentNode "ECS Cluster" {
containerInstance api
}
infrastructureNode "ALB" "Application Load Balancer"
}
}
}

Deployment nodes support descriptions, technology labels, and properties:

deploymentNode "Web Server" "Serves the frontend" "Nginx" {
properties {
"Instance Type" "t3.medium"
"Count" "3"
}
containerInstance webapp
}

Define separate environments to show how the same system is deployed differently:

deploymentEnvironment "Production" {
deploymentNode "AWS" { ... }
}
deploymentEnvironment "Staging" {
deploymentNode "AWS" { ... }
}
deploymentEnvironment "Development" {
deploymentNode "Docker Compose" { ... }
}

Each environment gets its own deployment view.