You can create a UML Deployment diagram to show the architecture of a deployment of software artifacts to nodes. First, you open the UML Deployment template and pick one of the four template options. Then the UML Deployment stencil appears, along with shapes that conform to the UML 2.5 standard.
Start a UML Deployment diagram
-
Start Visio. Or if you have a file open already, click File > New.
-
Go to Categories > Software and Database > UML Deployment.
-
Select the blank template or one of the three starter diagrams. When you’ve picked the template you want, click Create.
-
You should see the Shapes window next to the diagram. If you don’t see it, go to View > Task Panes and make sure that Shapes is selected. If you still don’t see it, click the Expand the Shapes window button
on the left. -
On the View tab, make sure the check box next to Connection Points is selected. This will make connection points appear when you start connecting shapes.
-
Now, drag shapes you want to include in your diagram from the Shapes window to the page. To rename text labels, double-click the labels.
Note: Creating and editing UML diagrams on Visio for the web requires a Visio Plan 1 or Visio Plan 2 license, which is purchased separately from Microsoft 365. For more information, contact your Microsoft 365 admin. If your admin has turned on "self-service purchasing," you can buy a license for Visio yourself. For more details, see Self-service purchase FAQ.
Start a UML Deployment diagram
-
Open Visio for the web. Near the upper right, select More templates.
-
In the Gallery, scroll down to the UML Deployment row, about midway down the page.
The first item in the row represents a blank template plus the companion stencil. The other items in the row are sample diagrams that have some shapes already drawn to help you get started quickly.
-
Click any item to see a larger preview.
-
When you find the diagram you want to use, click its Create button.
The new diagram, with the related stencil, opens in your browser.
Node instances and artifacts
When to use
-
Use Node Instance shapes when you want to specify an instance of a run-time computational or physical device.
-
Put Artifact Instance shapes inside node instance shapes to deploy artifacts.
![1 pointing to Node Instance shape "<<cloud vm>> :MachineInstance" ; 2 pointing to Artifact shape: "<<Artifact>> Number Cruncher.py"](https://cxcs.microsoft.net/static/public/central/neutral/df28845f-f13b-439d-9800-0597ac48448b/758586c1468a54e26a4c110b7182daaa63cbdd47.png)
Step 1
Drag a Node Instance shape to the page first, and then make it bigger by dragging the shape handles.
![Node Instance shape resized to be larger](https://cxcs.microsoft.net/static/public/central/neutral/1098c21a-edf1-4644-9e6c-282d750406d5/0f5515b5e2af5e36a5f76517d581f1e6e18fc424.png)
Step 2
Drag an Artifact Instance shape and place it inside the larger node shape. When you see a green highlight, this means the smaller shape will be contained within the larger node shape. From that point forward, when the node shape moves, the artifact inside will move as well.
![Artifact shape dragged on top of Node Instance shape, green highlight](https://cxcs.microsoft.net/static/public/central/neutral/0b974f0f-4030-4c35-a673-a685a3baca86/dd8dff3665ac0f88d1a64c63d5a483a763c08e6a.png)
Other container shapes
There are other container shapes available in the UML Deployment stencil. They behave like the Node Instance shape. That is, when you drop shapes on top of them, the shapes are glued and will move with the container. Here are some of the most popular container shapes for deployment diagrams:
Hierarchical nodes
Nest node shapes inside each other when you want to show them hierarchically.
![UserClient node, containing Browser node which contains the HTML5 artifact](https://cxcs.microsoft.net/static/public/central/neutral/63d86e6b-5557-4837-907c-61d9fa85ecf0/d357aa3fcf7081d6fa45c982c9f092a58c731abf.png)
Package shapes
Use Package shapes when you need to represent containing elements like a folder.
![Package shape containing other node instance and artifact shapes](https://cxcs.microsoft.net/static/public/central/neutral/0a4fd2cf-6fca-4781-b1d0-0c6b626cc160/0179ae21380aca590aca3793c21a9804ee6c419b.png)
Diagram Overview
Use the Diagram Overview shape when you want to surround all of the shapes with a frame.
![Diagram overview shape containing other node instance and artifact shapes](https://cxcs.microsoft.net/static/public/central/neutral/5dcacc9c-2c13-4bd2-997e-ec16269cb06c/a114430814d0b7b4504e7f63b488368bdfcda227.png)
Tips for connectors
Straighten connectors
If a connector is taking too many turns, right-click it, and then click Straight Connector.
Show multiplicity
If needed, right-click the connector and select Show Multiplicity. When you’re done, four text boxes appear where you can add details. If you do not need all the text boxes, delete the ones you don’t need.
Change connector type
You can change a connector type. For example, you can change from an Association to a Directed Association. Right-click the connector, and then click Set Connector Type.
Make dynamic connections instead of point connections
If you anticipate moving shapes a lot, consider making a dynamic connection instead of a point connection.
Move or rotate text on connectors
Most likely you’ll need to rotate or move text on your connector lines. Here’s how to do that:
-
Click an empty area of the page to deselect anything that may be selected.
-
On the Home tab, in the Tools group, click the Text Block tool
-
Click the connector that has text your want to rotate or move.
-
Drag the text block to move it, or rotate it using the Rotation Handle
-
When you’re done, click the Pointer Tool button
After you switch back to the Pointer Tool button
, the text keeps the same position relative to the shape. If you use the Pointer Tool to drag the text, the shape will also move. To move the text independently of the shape, go back to the Text Block Tool .
Component shapes
When to use
Use component shapes for each functional unit in your system or application.
!["Store" component shape](https://cxcs.microsoft.net/static/public/central/neutral/470ed34d-3724-46a8-a6a5-bdaa69a02a98/6dd2b4069bac9eb668e85838fed98da94fcaaebc.png)
Show or hide stereotype
Right-click the shape to show or hide the stereotype label.
![Right-click menu, Show Stereotype command, <<component>> text label](https://cxcs.microsoft.net/static/public/central/neutral/05061409-f885-43ec-8762-1c0f14e4f1a8/d9feb2b22889fdf91989f452e65b63dc0d35f211.png)
Interface shapes
When to use
-
Use the Provided Interface shape when you want to specify the realization of a class/interface.
-
Use the Required Interface when you want to specify a dependency on a class/interface.
![Two interfaces connected, 1: Provided Interface shape ending with circle, 2: Required Interface shape ending with socket](https://cxcs.microsoft.net/static/public/central/neutral/d8a143c9-49f5-4f92-a816-23601f0eff4d/2e1ae601ed1ab2e4c2517748c551812460621737.png)
Step 1
Drag a Provided Interface shape to the page, and line up the port square with a connection point. You know it’s connected when you see the green highlight around the connection point.
![Provided Interface shape glued to Component shape](https://cxcs.microsoft.net/static/public/central/neutral/0393172c-a19b-47f2-b74b-938ffd5e2287/59571ace758c2ab18171ddc2f14a1f46abc7a0f6.png)
Step 2
Drag a Required Interface shape to the page, and line up the port square with a connection point as well. You know it’s connected when you see the green highlight around the connection point.
![Required Interface shape glued to Component shape](https://cxcs.microsoft.net/static/public/central/neutral/051274d0-099d-4551-a119-a470ecc5c5ab/be24a28db90a6c1f7e54145f9fe0319e6ec58a3e.png)
Step 3
To connect both a Provided and Required interface together, first select the Required Interface shape. Then look for the yellow handle.
![Yellow handle on the Required Interface shape](https://cxcs.microsoft.net/static/public/central/neutral/95e3c01b-0584-4fd4-9755-2e3d6ece436d/508373c7e9e6d6926b4862619b7d48a4f6f7e7a9.png)
Step 4
Drag the yellow handle to connect with the Provided Interface.
![Required Interface shape connected to Provided Interface](https://cxcs.microsoft.net/static/public/central/neutral/ed536035-fa7c-428b-974a-32b62ece4d9c/32f0cfea6c360d2972a016fef4a6d08037da1da3.png)
See Also
Create a UML component diagram