Diagrama de despliegue
Un diagrama de despliegue es un tipo de diagrama que visualiza la arquitectura de los sistemas, mostrando cómo los componentes de software se despliegan en el hardware. Proporciona una imagen clara de la distribución de componentes en varios nodos, como servidores, estaciones de trabajo y dispositivos. Con PlantUML, crear diagramas de despliegue se convierte en un juego de niños. La plataforma ofrece una forma sencilla e intuitiva de diseñar estos diagramas utilizando texto sin formato, lo que garantiza iteraciones rápidas y un fácil control de versiones. Además, el foro PlantUML proporciona una comunidad vibrante donde los usuarios pueden buscar ayuda, compartir ideas y colaborar en los retos de diagramación. Una de las principales ventajas de PlantUML es su capacidad para integrarse a la perfección con diversas herramientas y plataformas, lo que lo convierte en la opción preferida tanto de profesionales como de aficionados.
Declaring element
|
🎉 Copied!
|
|
You can optionaly put text using bracket
[] for a long description.
|
🎉 Copied!
|
|
Declaring element (using short form)
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
|
🎉 Copied!
|
|
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
|
🎉 Copied!
|
|
Interface
|
🎉 Copied!
|
|
Usecase
|
🎉 Copied!
|
|
Linking or arrow
You can create simple links between elements with or without labels:
|
🎉 Copied!
|
|
It is possible to use several types of links:
|
🎉 Copied!
|
|
You can also have the following types:
|
🎉 Copied!
|
|
or another example:
|
🎉 Copied!
|
|
Bracketed arrow style
Similar as Bracketed class relations (linking or arrow) style
Line style
It's also possible to have explicitlybold, dashed, dotted, hidden or plain arrows:- without label
|
🎉 Copied!
|
|
- with label
|
🎉 Copied!
|
|
[Adapted from QA-4181]
Line color
|
🎉 Copied!
|
|
Line thickness
|
🎉 Copied!
|
|
[Adapted from QA-4949]
Mix
|
🎉 Copied!
|
|
Change arrow color and style (inline style)
You can change the color or style of individual arrows using the inline following notation:
#color;line.[bold|dashed|dotted];text:color
|
🎉 Copied!
|
|
[Ref. QA-3770 and QA-3816] [See similar feature on class diagram]
Change element color and style (inline style)
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
|
🎉 Copied!
|
|
|
🎉 Copied!
|
|
[Ref. QA-6852]
Nestable elements
Here are the nestable elements:
|
🎉 Copied!
|
|
Packages and nested elements
Example with one level
|
🎉 Copied!
|
|
Other example
|
🎉 Copied!
|
|
|
🎉 Copied!
|
|
Full nesting
Here is all the nested elements:- by alphabetical order:
|
🎉 Copied!
|
|
- or reverse alphabetical order
|
🎉 Copied!
|
|
Alias
Simple alias with as
|
🎉 Copied!
|
|
Examples of long alias
|
🎉 Copied!
|
|
|
🎉 Copied!
|
|
[Ref. QA-12082]
Round corner
|
🎉 Copied!
|
|
Specific SkinParameter
roundCorner
|
🎉 Copied!
|
|
[Ref. QA-5299, QA-6915, QA-11943]
Appendix: All type of arrow line
|
🎉 Copied!
|
|
Appendix: All type of arrow head or '0' arrow
Type of arrow head
|
🎉 Copied!
|
|
Type of '0' arrow or circle arrow
|
🎉 Copied!
|
|
Appendix: Test of inline style on all element
Simple element
|
🎉 Copied!
|
|
Nested element
Without sub-element
|
🎉 Copied!
|
|
With sub-element
|
🎉 Copied!
|
|
Appendix: Test of style on all element
Simple element
Global style (on componentDiagram)
|
🎉 Copied!
|
|
Style for each element
|
🎉 Copied!
|
|
[Ref. QA-13261]
Nested element (without level)
Global style (on componentDiagram)
|
🎉 Copied!
|
|
Style for each nested element
|
🎉 Copied!
|
|
Nested element (with one level)
Global style (on componentDiagram)
|
🎉 Copied!
|
|
Style for each nested element
|
🎉 Copied!
|
|
Appendix: Test of stereotype with style on all element
Simple element
|
🎉 Copied!
|
|
Display JSON Data on Deployment diagram
Simple example
|
🎉 Copied!
|
|
[Ref. QA-15481] For another example, see on JSON page.
Mixing Deployment (Usecase, Component, Deployment) element within a Class or Object diagram
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
|
🎉 Copied!
|
|
[Ref. QA-2335 and QA-5329]
Port [port, portIn, portOut]
You can added port with port, portinand portout keywords.
Port
|
🎉 Copied!
|
|
PortIn
|
🎉 Copied!
|
|
PortOut
|
🎉 Copied!
|
|
Mixing PortIn & PortOut
|
🎉 Copied!
|
|
Change diagram orientation
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.
|
🎉 Copied!
|
|
With Smetana (internal layout engine)
The main rule is the opposite: Simple element first, then nested element.
|
🎉 Copied!
|
|
Left to right
With Graphviz (layout engine by default)
|
🎉 Copied!
|
|
With Smetana (internal layout engine)
|
🎉 Copied!
|
|