Skip to content
Snippets Groups Projects
Commit f91845ac authored by Jan Frenzel's avatar Jan Frenzel
Browse files

Added mermaid code snippet + installation of mermaid.

parent 3aa23054
No related branches found
No related tags found
2 merge requests!530Automated merge from preview to main,!502Added mermaid code snippet + installation of mermaid.
...@@ -3,3 +3,4 @@ ...@@ -3,3 +3,4 @@
*node_modules *node_modules
**venv/ **venv/
doc.zih.tu-dresden.de/public/ doc.zih.tu-dresden.de/public/
*mermaid.min.js
...@@ -6,7 +6,7 @@ SHELL ["/bin/bash", "-c"] ...@@ -6,7 +6,7 @@ SHELL ["/bin/bash", "-c"]
# Base # # Base #
######## ########
RUN pip install mkdocs>=1.1.2 mkdocs-material>=7.1.0 RUN pip install mkdocs>=1.1.2 mkdocs-material>=7.1.0 mkdocs-mermaid2-plugin>=0.5.2
########## ##########
# Linter # # Linter #
......
...@@ -31,13 +31,15 @@ Add the original repository as a so-called remote: ...@@ -31,13 +31,15 @@ Add the original repository as a so-called remote:
1. `git pull origin preview` 1. `git pull origin preview`
1. `git pull upstream-zih preview` (only required when you forked the project) 1. `git pull upstream-zih preview` (only required when you forked the project)
1. Create a new feature branch for you to work in. Ideally, name it like the file you want to 1. Create a new feature branch for you to work in. Ideally, name it like the file you want to
modify or the issue you want to work on, e.g.: `git checkout -b issue-174`. (If you are uncertain modify or the issue you want to work on, e.g.:
about the name of a file, please look into `mkdocs.yaml`.) `git checkout -b 174-check-contribution-documentation` for issue 174 with title "Check contribution
documentation". (If you are uncertain about the name of a file, please look into `mkdocs.yaml`.)
1. Improve the documentation with your preferred editor, i.e. add new files and correct mistakes. 1. Improve the documentation with your preferred editor, i.e. add new files and correct mistakes.
1. Use `git add <FILE>` to select your improvements for the next commit. 1. Use `git add <FILE>` to select your improvements for the next commit.
1. Commit the changes with `git commit -m "<DESCRIPTION>"`. The description should be a meaningful 1. Commit the changes with `git commit -m "<DESCRIPTION>"`. The description should be a meaningful
description of your changes. If you work on an issue, please also add "Closes 174" (for issue 174). description of your changes. If you work on an issue, please also add "Closes 174" (for issue 174).
1. Push the local changes to the GitLab server, e.g. with `git push origin issue-174`. 1. Push the local changes to the GitLab server, e.g. with
`git push origin 174-check-contribution-documentation`.
1. As an output you get a link to create a merge request against the preview branch. 1. As an output you get a link to create a merge request against the preview branch.
1. When the merge request is created, a continuous integration (CI) pipeline automatically checks 1. When the merge request is created, a continuous integration (CI) pipeline automatically checks
your contributions. your contributions.
...@@ -57,6 +59,7 @@ Building a container could be done with the following steps: ...@@ -57,6 +59,7 @@ Building a container could be done with the following steps:
```bash ```bash
cd hpc-wiki cd hpc-wiki
doc.zih.tu-dresden.de/util/download-newest-mermaid.js.sh
docker build -t hpc-compendium . docker build -t hpc-compendium .
``` ```
......
...@@ -6,6 +6,28 @@ setup experiments, and ...@@ -6,6 +6,28 @@ setup experiments, and
edit and prepare jobs. The login nodes are not suited for computational work! From the login nodes, edit and prepare jobs. The login nodes are not suited for computational work! From the login nodes,
you can interact with the batch system, e.g., submit and monitor your jobs. you can interact with the batch system, e.g., submit and monitor your jobs.
A typical workflow would look like this:
```mermaid
sequenceDiagram
user ->>+ login node: run programm
login node ->> login node: kill after 5 min
login node ->>- user: Killed!
user ->> login node: salloc [...]
login node ->> Slurm: Request resources
Slurm ->> user: resources
user ->>+ allocated resources: srun [options] [command]
allocated resources ->> allocated resources: run command (on allocated nodes)
allocated resources ->>- user: program finished
user ->>+ allocated resources: srun [options] [further_command]
allocated resources ->> allocated resources: run further command
allocated resources ->>- user: program finished
user ->>+ allocated resources: srun [options] [further_command]
allocated resources ->> allocated resources: run further command
Slurm ->> allocated resources: Job limit reached/exceeded
allocated resources ->>- user: Job limit reached
```
??? note "Batch System" ??? note "Batch System"
The batch system is the central organ of every HPC system users interact with its compute The batch system is the central organ of every HPC system users interact with its compute
......
...@@ -180,11 +180,16 @@ extra_css: ...@@ -180,11 +180,16 @@ extra_css:
extra_javascript: extra_javascript:
- javascripts/extra.js - javascripts/extra.js
- javascripts/mermaid.min.js
markdown_extensions: markdown_extensions:
- admonition - admonition
- pymdownx.details - pymdownx.details
- pymdownx.superfences - pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:mermaid2.fence_mermaid
- pymdownx.highlight - pymdownx.highlight
- toc: - toc:
permalink: True permalink: True
...@@ -193,7 +198,9 @@ markdown_extensions: ...@@ -193,7 +198,9 @@ markdown_extensions:
- pymdownx.tabbed: - pymdownx.tabbed:
alternate_style: True alternate_style: True
#plugins: plugins:
- search
- mermaid2
# - mkdocs-video # - mkdocs-video
extra: extra:
......
#!/bin/bash
set -euo pipefail
scriptpath=${BASH_SOURCE[0]}
basedir=`dirname "$scriptpath"`
basedir=`dirname "$basedir"`
cd $basedir/tud_theme/javascripts
wget https://unpkg.com/mermaid/dist/mermaid.min.js
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment