From f89926a20e344c06b7066a1c1c0ff8d2d24997ca Mon Sep 17 00:00:00 2001 From: KIRCHSTH Date: Mon, 14 Oct 2019 17:04:11 +0200 Subject: [PATCH] #27: Add Deployment and dynamic diagram support (1 - add *.puml) --- C4_Deployment.puml | 67 ++++++++++++++++++++++++++++++++++++++++++++++ C4_Dynamic.puml | 12 +++++++++ 2 files changed, 79 insertions(+) create mode 100644 C4_Deployment.puml create mode 100644 C4_Dynamic.puml diff --git a/C4_Deployment.puml b/C4_Deployment.puml new file mode 100644 index 0000000..e7a54b6 --- /dev/null +++ b/C4_Deployment.puml @@ -0,0 +1,67 @@ +!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Component.puml +' uncomment the following line and comment the first to use locally +' !include C4_Component.puml + +' Scope: A single software system. +' Primary elements: Deployment nodes and containers within the software system in scope. +' Intended audience: Technical people inside and outside of the software development team; including software architects, developers and operations/support staff. + +' Colors +' ################################## + +!define INSTANCE_BG_COLOR #438DD5 +!define NODE_FONT_COLOR #888888 +!define NODE_BG_COLOR #FFFFFF + +' Styling +' ################################## + +skinparam rectangle<> { + roundCorner 10 + Shadowing true + FontColor ELEMENT_FONT_COLOR + BackgroundColor INSTANCE_BG_COLOR + BorderColor #3C7FC0 +} + +skinparam database<> { + roundCorner 10 + Shadowing true + FontColor ELEMENT_FONT_COLOR + BackgroundColor INSTANCE_BG_COLOR + BorderColor #3C7FC0 +} + +skinparam rectangle<> { + roundCorner 10 + Shadowing true + FontColor NODE_FONT_COLOR + BackgroundColor NODE_BG_COLOR + BorderColor #444444 +} + +' Layout +' ################################## + +!definelong LAYOUT_WITH_LEGEND +hide stereotype +legend right +|= |= Type | +| | deployment node | +| | deployment instance | +endlegend +!enddefinelong + +' Instances +' ################################## +!define ContainerInstance(e_alias, e_label, e_techn) rectangle "==e_label\nInstance: [e_techn]" <> as e_alias +!define ContainerInstance(e_alias, e_label, e_techn, e_descr) rectangle "==e_label\nInstance: [e_techn]\n\n e_descr" <> as e_alias + +!define ContainerInstanceDb(e_alias, e_label, e_techn) database "==e_label\nInstance: [e_techn]" <> as e_alias +!define ContainerInstanceDb(e_alias, e_label, e_techn, e_descr) database "==e_label\nInstance: [e_techn]\n\n e_descr" <> as e_alias + +' Nodes +' ################################## +' PlantUML does not support automatic line breaks of container, if e_techn is very long insert line breaks with +' "\n" +!define Deployment_Node(e_alias, e_label, e_techn) rectangle "==e_label\n[e_techn]" <> as e_alias diff --git a/C4_Dynamic.puml b/C4_Dynamic.puml new file mode 100644 index 0000000..f44deae --- /dev/null +++ b/C4_Dynamic.puml @@ -0,0 +1,12 @@ +!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Component.puml +' uncomment the following line and comment the first to use locally +' !include C4_Component.puml + +' Scope: An enterprise, software system or container. +' Primary and supporting elements: Depends on the diagram scope - +' enterprise - people and software systems related to the enterprise in scope +' software system - see system context or container diagrams, +' container - see component diagram. +' Intended audience: Technical and non-technical people, inside and outside of the software development team. + +' Dynamic diagram introduces no new elements, the container and component elements are enough