- 
                Notifications
    You must be signed in to change notification settings 
- Fork 83
Revise internal system VPN documentation - mermaid diagram #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Updated the diagram and text for clarity on VPN setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the rendered output in https://canonical-ubuntu-documentation-library--383.com.readthedocs.build/server/how-to/wireguard-vpn/on-an-internal-system/, I cannot see an actual mermaid diagram.
I see the mermaid sources instead:
flowchart LR
  %% ASCII -> Mermaid conversion of: laptop over wlan0 to public untrusted network,
  %% WireGuard wg0 tunnel (10.90.90.1/24 <-> 10.90.90.2/24) to VPN gw and VPN network.
  laptop["Laptop"]
  internet(("public untrusted<br/>network/internet"))
  vpngw["VPN gw"]
  vpn(("VPN network"))
  %% Physical/normal networking
  laptop --|wlan0|--> internet
  internet --|eth0|--> vpngw
  %% WireGuard VPN endpoints
  laptop -. "wg0 10.90.90.1/24" .-> vpn
  vpngw  -. "wg0 10.90.90.2/24" .-> vpn
I'm unclear if this is expected, but would assume that we should be seeing rendered diagrams in the staging environment. Please correct me if that's wrong @s-makin
When pasting that source to something like https://mermaid.live it renders correctly, so seems to be an issue with our docs/environment specifically.
Besides that, the new diagram seems to be loosing information, such as the structure of the home network or the network's IP range, which was 10.10.10.0/24 before, but the tunnel is now using 10.90.90.0/24. In the explanation around the diagram we're referencing those specific IPs from the old diagram, which are now not visible anymore.
|  | ||
|  | ||
|  | ||
| ```mermaid | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ```mermaid | |
| ```{mermaid} | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should fix the rendering issue :)
| 
 Thanks @slyon - Sphinx is sometimes a bit fiddly about recognizing mermaid environments. When declaring a mermaid diagram, you have to wrap mermaid in squiggly brackets (like  | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @MariaBego56 and thanks for all your work on these diagrams!
I think I identified the reason why the diagrams aren't showing properly, and based on my local testing if you accept the suggestions I left below, and then commit them, it should fix the issue :)
Updated the diagram and text for clarity on VPN setup.
create a mermaid diagram
Description
Please provide a clear and concise description of your changes. Explain what this pull request accomplishes and *
why* it is needed.
Related Issue
If this pull request addresses an existing issue, please link to it below. Use the
Fixes #<issue-number>syntax toclose the issue automatically when the pull re### Description
Please provide a clear and concise description of your changes. Explain what this pull request accomplishes and *
why* it is needed.
Related Issue
If this pull request addresses an existing issue, please link to it below. Use the
Fixes #<issue-number>syntax to[close the issue](https://docs.githuquest is merged.
Example:
Contributor License Agreement (CLA)
By contributing to this project, you agree to the terms of
the Canonical Contributor License Agreement (CLA).
If you have not already signed the CLA, please do so here.
Commit Message for Squash Merge
We typically squash commits when merging. You can specify the commit message that should be used in this case if you wish.
Provide the desired commit message below:
[(optional) category] Brief description of changes made, and why
Checklist
Additional Notes (Optional)
Add any extra information or context that reviewers may need to know. This could include testing instructions,
screenshots, or links to related discussions.
Thank you for contributing to the Ubuntu Server documentation!