Update docs diagram with sequence

Change-Id: I68b86a0faab3b17df432bb4c80994055a616e8fc
This commit is contained in:
Joshua Hesketh 2014-01-11 14:13:40 +08:00 committed by Gerrit Code Review
parent 5a11bb3244
commit e7ee50e0c0
3 changed files with 30 additions and 82 deletions

View File

@ -25,7 +25,7 @@ import sys, os
# Add any Sphinx extension module names here, as strings. They can be extensions # Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.graphviz'] extensions = ['sphinxcontrib.seqdiag']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@ -54,94 +54,41 @@ The simplified workflow for Turbo-Hipster:
Typical workflow diagram Typical workflow diagram
------------------------ ------------------------
**clearly this needs a lot of work, however I believe the structure .. seqdiag::
is mostly there... If you know graphviz please help!**
.. graphviz:: seqdiag admin {
# define order of elements
# seqdiag sorts elements by order they appear
humanoid; gerrit; zuul; gearman; turbo-hipster1; turbo-hipster2;
digraph overview { humanoid -> gerrit [leftnote = "Patchset uploaded"];
subgraph cluster_1 {
label = "Gerrit"
style = filled;
color = lightgrey;
node [style=filled,color=white];
g000 [shape=Mdiamond label="start"]; zuul -> gearman [label = "register-server"];
g001 [shape=box, label="receive event"]; zuul <-- gearman;
g002 [shape=box, label="notify listeners"];
g000 -> g001; turbo-hipster1 -> gearman [label = "add server"];
g001 -> g002; turbo-hipster1 <-- gearman;
g002 -> g001; turbo-hipster1 -> gearman [label = "register functions"];
} turbo-hipster1 <-- gearman;
subgraph cluster_2 { turbo-hipster2 -> gearman [label = "add server"];
label = "Zuul pipeline"; turbo-hipster2 <-- gearman;
color = blue turbo-hipster2 -> gearman [label = "register functions"];
node [style=filled]; turbo-hipster2 <-- gearman;
z000 [shape=Mdiamond label="start"];
z001 [shape=box, label="register gearman server"];
z002 [shape=box, label="register launchers"];
z003 [shape=box, label="listen for events"];
z004 [shape=box, label="receive event"];
z005 [shape=box, label="request jobs"];
z006 [shape=box, label="receive response"];
z007 [shape=box, label="send report"];
z000 -> z001 -> z002; gerrit -> zuul [label = "patchset-uploaded"];
z003 -> z004 -> z005; zuul -> gearman [label = "request worker"];
z005 -> z006 [dir=none, style=dotted]; zuul -> gearman [label = "request worker"];
z006 -> z007; gearman -> turbo-hipster1 [label = "run function"];
gearman -> turbo-hipster2 [label = "run function"];
gearman <- turbo-hipster1 [label = "return result"];
gearman <- turbo-hipster2 [label = "return result"];
zuul <- gearman [label = "return result"];
zuul <- gearman [label = "return result"];
gerrit <- zuul [label = "voting results"];
} humanoid <-- gerrit;
subgraph cluster_3 {
label = "Gearman";
style = filled;
color = lightgrey;
node [style=filled,color=white];
gm001 [shape=box, label="receive job method"];
gm002 [shape=box, label="request worker do method"];
gm003 [shape=box, label="receive results"];
gm004 [shape=box, label="return results"];
gms000 [label="register client"];
gms001 [label="register worker"];
gms002 [label="register method"];
gm001 -> gm002;
gm002 -> gm003 [dir=none, style=dotted];
gm003 -> gm004;
}
subgraph cluster_4 {
label = "Turbo Hipster";
color = blue
node [style=filled];
th000 [shape=Mdiamond label="start"];
th001 [shape=box, label="register as worker"];
th002 [shape=box, label="find available tasks"];
th003 [shape=box, label="register available job methods"];
ths001 [shape=box, label="receive method request"];
ths002 [shape=box, label="run task"];
ths003 [shape=box, label="send results"];
th000 -> th001 -> th002 -> th003;
ths001 -> ths002 -> ths003;
}
z001 -> gms000;
z005 -> gm001;
gm004 -> z006;
z003 -> g002 [dir=both, style=dotted];
th001 -> gms001;
th003 -> gms002;
gm002 -> ths001;
ths003 -> gm003;
} }
@ -401,4 +348,4 @@ rcbau@rcbops.com and let us know.
If you receive an error that you think is a false positive, leave a comment If you receive an error that you think is a false positive, leave a comment
on the review with the sole contents of "recheck migrations". on the review with the sole contents of "recheck migrations".
If you have any questions/problems please contact us at rcbau@rcbops.com. If you have any questions/problems please contact us at rcbau@rcbops.com.

View File

@ -8,5 +8,6 @@ python-daemon
extras extras
GitPython>=0.3.2.RC1 GitPython>=0.3.2.RC1
sphinxcontrib-programoutput sphinxcontrib-programoutput
sphinxcontrib-seqdiag
mysql-python mysql-python