How to install PlantUML software and Clone UML files in Azure DevOps

Introduction:

Plant UML software is an open source tool that allows users to create UML diagrams , Sequence diagrams by writing lines of code.

PlantUML is a component that allows to quickly write :

The following non-UML diagrams are also supported:

 

How to install

It is simple, and I prefer this over Visio because you dont have to manually drag and drop the relationship lines. The diagram is created automatically, neat and clean. Below are the steps on how you can install and use Plant UML:

  1.  Download the VS Code
  2. install the PlantUML 2.11.1 extension
  3.  install Graphviz extension by following point #4
  4. Now download the zip file for Graphviz 2.38 package on your C drive. Link is https://graphviz.gitlab.io/download/
  5. Download the zip file for the Stable 2.38 Windows install packages if you have Win 10
  6. Make sure the folder name is GraphViz
  7. Unzip the file on C:\Program Files so that there is a Graphviz folder with the path C:\Program Files\GraphViz
  8. Make sure you unzip the files in the C->Program Files ->Graphviz  – folder here.
  9. Copy paste the files from the release folder to the root folder
  10. Because if this folder doesn’t have the bin, etc,fonts… folders it will not show the display image in the VS Code
  11. Your folder structure must look like this
  12. 002
  13. You would need to install the below extension as well:
    1. Graphviz (dot) language support for Visual Studio Code
    2. JSON Escaper
    3. npm 3.3.0
    4. Paste Image
    5. XML Tools 2.5.0
  14. Now create your PlantUML lines of code by following this manual http://plantuml.com/en/guide
  15. After your create your PlantUML, you should be able to get Graphic UI for the UML

Option #1: Local:

You can use PlantUML on your machine locally or clone it in DevOps.

1 – Write your PlantUML lines of code and right click to preview and generate diagrams

 

001

Option #2: How to clone PlantUML from Azure DevOps

  1. Now that you have your VS Code installed and PlantUML working on it, you can clone the UML files from DevOps to your VS Code on machine
  2. Create a folder on your machine where you will store all the diagrams, for example C:\Diagram
  3. Login to Azure DevOps from the browser
  4. Navigate to a Project -> Repos -> Files. Then open your UML diagram folder where all the data modelling is done.
  5. Now, Click “Clone” on the top right side of the browser
  6. A window will open like below, click “Clone in VS Code”
  7. VS Code will open the DevOps repository with your files, pointing to the C:/Diagram folder

Image

8. You can either create a fresh branch or update the existing branch with your code

9. Once you update the code, you can COMMIT and SYNC back your changes to that branch

10. The sync sign will be at the bottom left of the VS Code screen

Capture

11.  You can go to the SOURCE CONTROL section, and write a message and then click the “right” (CHECK)  button in order to commit your code. Writing a message is important, as this helps the developer to know the change

Capture002

12. After you COMMIT and SYNC, you can see the changes in the DevOps in the respective branch

13. The end

Option #3:

You can link your ERD and UML diagrams in JIRA as well. This will make your life pretty easy, as we all know the struggle and pain when we use some tool and have to manually create blocks and straight lines in a document.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.