A Deployment Diagram is a type of diagram that visualizes the architecture of systems, showcasing how software components are deployed onto hardware. It provides a clear picture of the distribution of components across various nodes, such as servers, workstations, and devices.
With PlantUML, creating deployment diagrams becomes a breeze. The platform offers a simple and intuitive way to design these diagrams using plain text, ensuring rapid iterations and easy version control. Moreover, the PlantUML forum provides a vibrant community where users can seek help, share ideas, and collaborate on diagramming challenges. One of the key advantages of PlantUML is its ability to integrate seamlessly with various tools and platforms, making it a preferred choice for professionals and enthusiasts alike.
You can optionaly put text using bracket [] for a long description.
We can declare element using some short forms.
|
Long form Keyword
|
Short form Keyword
|
Long form example
|
Short form example
|
Ref.
|
actor
|
: a :
|
actor actor1
|
:actor2:
|
Actors
|
component
|
[ c ]
|
component component1
|
[component2]
|
Components
|
interface
|
() i
|
interface interface1
|
() "interface2"
|
Interfaces
|
usecase
|
( u )
|
usecase usecase1
|
(usecase2)
|
Usecases
|
Actor
NB: There is an old syntax for actor with guillemet which is now deprecated and will be removed some days. Please do not use in your diagram.
Component
Interface
Usecase
You can create simple links between elements with or without labels:
It is possible to use several types of links:
You can also have the following types:
or another example:
[Ref. QA-547 and QA-1736]
⎘ See all type on Appendix.
Similar as Bracketed class relations (linking or arrow) style
Line style
It's also possible to have explicitly bold, dashed, dotted, hidden or plain arrows:
[Adapted from QA-4181]
Line color
Line thickness
[Adapted from QA-4949]
Mix
You can change the color or style of individual arrows using the inline following notation:
#color;line.[bold|dashed|dotted];text:color
[Ref. QA-3770 and QA-3816]
[See similar feature on class diagram]
You can change the color or style of individual element using the following notation:
#[color|back:color];line:color;line.[bold|dashed|dotted];text:color
[Ref. QA-6852]
Here are the nestable elements:
Example with one level
Other example
Full nesting
Here is all the nested elements:
- or reverse alphabetical order
Simple alias with as
Examples of long alias
[Ref. QA-12082]
roundCorner
[Ref. QA-5299, QA-6915, QA-11943]
Type of arrow head
Type of '0' arrow or circle arrow
Simple element
Nested element
Without sub-element
With sub-element
Simple element
Global style (on componentDiagram)
Style for each element
[Ref. QA-13261]
Nested element (without level)
Global style (on componentDiagram)
Style for each nested element
Nested element (with one level)
Global style (on componentDiagram)
Style for each nested element
Simple element
Simple example
[Ref. QA-15481]
For another example, see on JSON page.
In order to add a Deployment element or a State element within a Class or Object diagram, you can use the allowmixing or allow_mixing directive.
Mixing all elements
[Ref. QA-2335 and QA-5329]
You can added port with port, portinand portout keywords.
Port
PortIn
PortOut
Mixing PortIn & PortOut
You can change (whole) diagram orientation with:
top to bottom direction (by default)
left to right direction
Top to bottom (by default)
With Graphviz (layout engine by default)
The main rule is: Nested element first, then simple element.
With Smetana (internal layout engine)
The main rule is the opposite: Simple element first, then nested element.
Left to right
With Graphviz (layout engine by default)
With Smetana (internal layout engine)