]> arthur.barton.de Git - netdata.git/commitdiff
added diagrams using PlantUML
authorCosta Tsaousis <costa@tsaousis.gr>
Mon, 17 Oct 2016 17:37:10 +0000 (20:37 +0300)
committerCosta Tsaousis <costa@tsaousis.gr>
Mon, 17 Oct 2016 17:37:10 +0000 (20:37 +0300)
.gitignore
Makefile.am
diagrams/build.sh [new file with mode: 0755]
diagrams/registry.puml [new file with mode: 0644]

index c281ea32468481f134d53bf3c6fc4ad93946930a..e914a1a86a74eac734644c58b915557bc47f3080 100644 (file)
@@ -89,3 +89,9 @@ profile/benchmark-dictionary
 profile/benchmark-registry
 
 *.pyc
+
+diagrams/*.png
+diagrams/*.atxt
+diagrams/plantuml.jar
+
+netdata.cppcheck
index 572c5dbbf861780e1a8226226f535ccc32fc89b2..3153ff0646ca546d10c5096a02900050460cac28 100644 (file)
@@ -39,6 +39,7 @@ SUBDIRS = \
        $(NULL)
 
 dist_noinst_DATA= \
+       diagrams/registry.puml \
        configs.signatures \
        Dockerfile \
        netdata.spec \
@@ -47,6 +48,7 @@ dist_noinst_DATA= \
 # until integrated within build
 # should be proper init.d/openrc/systemd usable
 dist_noinst_SCRIPTS= \
+       diagrams/build.sh \
        coverity-scan.sh \
        docker-build.sh \
        netdata-installer.sh \
diff --git a/diagrams/build.sh b/diagrams/build.sh
new file mode 100755 (executable)
index 0000000..2adebfd
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+path=$(dirname "$0")
+cd "${path}" || exit 1
+
+if [ ! -f "plantuml.jar" ]
+then
+       echo >&2 "Please download 'plantuml.jar' from http://plantuml.com/ and put it the same folder with me."
+       exit 1
+fi
+
+for x in *.puml
+do
+       echo >&2 "Working on ${x}..."
+       java -jar plantuml.jar -tpng "${x}"
+       # java -jar plantuml.jar -ttxt "${x}"
+done
diff --git a/diagrams/registry.puml b/diagrams/registry.puml
new file mode 100644 (file)
index 0000000..5c68f69
--- /dev/null
@@ -0,0 +1,84 @@
+@startuml
+
+skinparam handwritten true
+skinparam monochrome true
+skinparam roundcorner 15
+
+skinparam sequence {
+    ArrowThickness 3
+
+    DividerFontColor Black
+    DividerFontName Comic Sans MS
+    DividerFontSize 15
+    DividerFontStyle Italic
+
+    DelayFontColor Black
+    DelayFontName Comic Sans MS
+    DelayFontSize 15
+    DelayFontStyle Italic
+
+    TitleFontColor Black
+    TitleFontName Comic Sans MS
+    TitleFontStyle Italic
+    TitleFontSize 25
+
+       ArrowColor DeepSkyBlue
+    ArrowFontColor Black
+    ArrowFontName Comic Sans MS
+    ArrowFontStyle Regular
+    ArrowFontSize 19
+
+       ActorBorderColor DeepSkyBlue
+
+       LifeLineBorderColor blue
+       LifeLineBackgroundColor #A9DCDF
+
+       ParticipantBorderColor DeepSkyBlue
+       ParticipantBackgroundColor LightBlue
+       ParticipantFontName Comic Sans MS
+       ParticipantFontSize 20
+       ParticipantFontColor Black
+
+       ActorBackgroundColor aqua
+       ActorFontColor Black
+       ActorFontSize 20
+       ActorFontName Comic Sans MS
+}
+
+title netdata registry operation
+actor "web browser" as user
+participant "netdata 1" as n1
+participant "registry 1" as r1
+autonumber "<b>0."
+
+== standard dashboard communication ==
+
+user ->n1 : \
+    hi, give me the dashboard
+
+n1 --> user : \
+    welcome, here it is...
+
+... a few seconds later ...
+
+== registry related communication ==
+
+user -> n1 : \
+    now give me registry information
+
+n1 --> user: \
+    here it is, talk to <b>registry 1</b>
+
+note left of r1 #eee: \
+    only your web browser \n\
+    talks to the registry
+
+user -> r1 : \
+    Hey <b>registry 1</b>, \
+I am accessing <b>netdata 1</b>...
+
+r1 --> user : \
+    nice!, here are other netdata servers \
+you have accessed in the past
+
+@enduml