-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add a new example for deployment diagram
- Loading branch information
Showing
19 changed files
with
84 additions
and
18 deletions.
There are no files selected for viewing
Binary file modified
BIN
-455 Bytes
(91%)
distribution/c4model/Boundary/DeploymentNodeBoundary.Local.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
' definition of the Item c4model/Boundary/DeploymentNodeBoundary | ||
|
||
!procedure DeploymentNodeBoundary($id, $name, $tech="") | ||
C4Boundary('Deployment Node', 'Node', $id, $name, $tech) | ||
C4Boundary('Deployment Node', 'Boundary', $id, $name, $tech) | ||
!endprocedure |
Binary file modified
BIN
-465 Bytes
(91%)
distribution/c4model/Boundary/InfrastructureNodeBoundary.Local.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
' definition of the Item c4model/Boundary/InfrastructureNodeBoundary | ||
|
||
!procedure InfrastructureNodeBoundary($id, $name, $tech="") | ||
C4Boundary('Infrastructure Node', 'Node', $id, $name, $tech) | ||
C4Boundary('Infrastructure Node', 'Boundary', $id, $name, $tech) | ||
!endprocedure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@startuml | ||
' configures the library | ||
!global $INCLUSION_MODE="local" | ||
!global $LIB_BASE_LOCATION=".." | ||
|
||
' loads the library's bootstrap | ||
!include $LIB_BASE_LOCATION/bootstrap.puml | ||
|
||
' loads the package bootstrap | ||
include('c4model/bootstrap') | ||
|
||
include('c4model/Boundary/DeploymentNodeBoundary') | ||
include('c4model/Element/InfrastructureNode') | ||
include('c4model/Element/Container') | ||
include('c4model/Element/Database') | ||
|
||
Title("Spring PetClinic", "Deployment Diagram") | ||
left to right direction | ||
|
||
DeploymentNodeBoundary("aws", "Amazon Web Services") { | ||
DeploymentNodeBoundary("region", "US-East-1") { | ||
InfrastructureNode("rout53", "Route 53", "Highly available and scalable cloud DNS service.") | ||
InfrastructureNode("ld", "Elastic Load Balancer", "Automatically distributes incoming application traffic.") | ||
DeploymentNodeBoundary("webapp_ec2_auto", "Autoscaling group") { | ||
DeploymentNodeBoundary("webapp_ec2", "Amazon EC2") { | ||
Container("app", "Web Application", "Allows employee to view and manage information regarding the veterinarians, the clients and their pets.", "Java and Spring Boot") | ||
} | ||
} | ||
DeploymentNodeBoundary("rds", "Amazon RDS") { | ||
DeploymentNodeBoundary("mysql", "MySQL") { | ||
Database("database", "Database", "Stores information regarding the veterinarians, the clients and their pets.", "Relational database schema") | ||
} | ||
} | ||
} | ||
} | ||
|
||
rout53 ..> ld : Relationship("Forwards\nrequest to", "HTTPS") | ||
ld ..> app : Relationship("Forwards\nrequest to", "HTTPS") | ||
app ..> database : Relationship("Reads from and \nwrites to", "MySQL Protocol/SSL") | ||
|
||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 25 additions & 6 deletions
31
source/templates/c4model/examples/deployment_diagram_aws.tera
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,32 @@ | ||
{% extends "package_example.tera" %} | ||
|
||
{% block content %} | ||
|
||
C4Legend() | ||
Title("[Deployment] Spring PetClinic") | ||
|
||
include('c4model/Boundary/DeploymentNodeBoundary') | ||
include('c4model/Element/InfrastructureNode') | ||
include('c4model/Element/DeploymentNode') | ||
include('c4model/Element/Container') | ||
include('c4model/Element/Database') | ||
|
||
Title("Spring PetClinic", "Deployment Diagram") | ||
left to right direction | ||
|
||
InfrastructureNode("rout53", "Route 53", "Highly available and scalable cloud DNS service.") | ||
DeploymentNodeBoundary("aws", "Amazon Web Services") { | ||
DeploymentNodeBoundary("region", "US-East-1") { | ||
InfrastructureNode("rout53", "Route 53", "Highly available and scalable cloud DNS service.") | ||
InfrastructureNode("ld", "Elastic Load Balancer", "Automatically distributes incoming application traffic.") | ||
DeploymentNodeBoundary("webapp_ec2_auto", "Autoscaling group") { | ||
DeploymentNodeBoundary("webapp_ec2", "Amazon EC2") { | ||
Container("app", "Web Application", "Allows employee to view and manage information regarding the veterinarians, the clients and their pets.", "Java and Spring Boot") | ||
} | ||
} | ||
DeploymentNodeBoundary("rds", "Amazon RDS") { | ||
DeploymentNodeBoundary("mysql", "MySQL") { | ||
Database("database", "Database", "Stores information regarding the veterinarians, the clients and their pets.", "Relational database schema") | ||
} | ||
} | ||
} | ||
} | ||
|
||
rout53 ..> ld : Relationship("Forwards\nrequest to", "HTTPS") | ||
ld ..> app : Relationship("Forwards\nrequest to", "HTTPS") | ||
app ..> database : Relationship("Reads from and \nwrites to", "MySQL Protocol/SSL") | ||
{% endblock content -%} |