![]() You’ll be able to login to GitLab with the default username root and password you just entered. Enter one and hit the blue Change your password button: The first page you’ll be shown asks you to enter a new password. We now have an instance of GitLab running over at localhost (it may take some time to startup). We won’t really need to use this page once everything is setup in GitLab. This page provides a nice interface for testing out the diagram syntax directly, and seeing what image it renders. Navigating to localhost:8080 shows up the PlantUML home page: If we then run docker ps we can see both containers are now running: 2.1. With this file in place, we can then just run: docker-compose up -d The NGINX rule you see defined in the environment section of gitlab is a clever way to forward any requests to to the PlantUML Docker container instead. We also specify what ports they should be exposed on. Info: here we’re specifying two Docker containers that should be brought up, for GitLab and PlantUML. Create a file docker-compose.yml file with the following contents: version: "3" The easiest way to get an environment up and running is to use Docker Compose. ![]() The image URL itself looks like this: As you can see it is quite long, and in fact contains an encoded string which represents all the information required by PlantUML to render the diagram. When a user requests the GitLab wiki page, it returns the diagram’s image URL which points to the PlantUML server, as below: It’s free to use, also with a Docker image available. The community edition is free and we can use the GitLab Docker image to get up and running quickly. GitLab – a Git repository manager which also has a wiki feature.We’ll need 2 services to show this working: Since I prefer to provide a working example as well as tell you how to implement this, feel free to follow along with the example in this GitHub repository. You’ll learn about the PlantUML syntax later on.Īlthough we’ll mainly be looking at sequence diagrams in this article, you can also add class diagrams and state diagrams, among others. The above diagrams is represented by code below: ```plantuml It’s easy to collaborate on the diagrams and keep them bang up-to-date. The fact that PlantUML diagrams are defined using a simple and easy to understand text syntax makes them ideal for wikis. Below is a simple sequence diagram example: more often than not, the diagram won’t be updated and will become out of date as the text around it moves onįortunately, some clever folks over at PlantUML spotted this problem and have provided a way to render diagrams from text.even if you were to provide a link or the original file as an attachment, it’s going to be a slow process to edit it. ![]() how can someone edit the diagrams if it needs to be updated?.LucidChart, PowerPoint) and then upload an image file to the wiki. Often when it comes to creating diagrams, people will use an external service (e.g. This is because wikis are primarily based around editing text-based information. Unfortunately wiki services often don’t make it easy to create diagrams. In this article you’ll learn how to use PlantUML within a GitLab wiki, to provide a collaborative way to create diagrams and keep them up to date. It’s a way to cement understanding and explain complex ideas more easily than in text. If you’ve ever spent any time reading through documentation, you’ll understand the value of a well-placed diagram.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |