Skip to content

Instantly share code, notes, and snippets.

@hansode
Created February 18, 2012 08:04
Show Gist options
  • Select an option

  • Save hansode/1858143 to your computer and use it in GitHub Desktop.

Select an option

Save hansode/1858143 to your computer and use it in GitHub Desktop.
wakame-vdc dialog
{
default_fontsize = 10;
orientation = portrait
group left {
color = "#ffffff";
client0 [label = "client", shape = beginpoint];
endpoint0 [shape = endpoint];
api0 [label = "api"];
I [ label = "instance"]; B [ label = "batch" ]; V [ label = "volume" ];
client0 -> api0;
api0 -> I -> B -> V;
group hot { color = "red"; shape = line; style = dashed; I, B, V; };
V -> endpoint0;
}
group right {
color = "#ffffff";
client [label = "client", shape = beginpoint];
endpoint [shape = endpoint];
api [label = "api"];
I1 [ label = "instance"]; B1 [ label = "batch" ]; V1 [ label = "volume" ];
I2 [ label = "instance"]; B2 [ label = "batch" ]; V2 [ label = "volume" ];
I3 [ label = "instance"]; B3 [ label = "batch" ]; V3 [ label = "volume" ];
client -> api;
I2 [ shape = "dots" ];
B2 [ shape = "dots" ];
V2 [ shape = "dots" ];
api -> I1 -> B1 -> V1 -> endpoint;
api -> I2 -> B2 -> V2 -> endpoint;
api -> I3 -> B3 -> V3 -> endpoint;
group cool { color = "#00bb00"; shape = line; style = dashed; I1; I2; I3; B1; B2; B3; V1; V2; V3; };
// group cool { color = "#00bb00"; I1; I2; I3; B1; B2; B3; V1; V2; V3; }
}
}
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
//
orientation = portrait;
//
client -> proxy -> auth -> mysqlgui, api;
browser -> gui -> mysqlgui;
gui -> api -> mysqldcmgr <- metadatasv, collectorDB;
api -> amqp <- collectorMQ, nsa, hva, sta;
hva -> hypervisor;
nsa -> dnsmasq -> dhcp <- instance;
dnsmasq -> dns;
metadatasv <- instance;
sta -> "iSCSI(tgt)";
hva -> "iSCSI(ini)" -> blockdev <- hypervisor;
"iSCSI(tgt)" <- "iSCSI(ini)";
hypervisor -> instance, metadatadr;
instance -> metadatadr;
collectorDB, collectorMQ -- collector;
// label
collectorDB[label ="collector(mysql)"];
collectorMQ[label ="collector(amqp)"];
dhcp[label = "dnsmasq(dhcp)"];
dns[label = "dnsmasq(dns)"];
metadatasv[label = "metadata-server"];
metadatadr[label = "metadata-drive"];
mysqlgui[label = "mysql(gui)"];
mysqldcmgr[label = "mysql(dcmgr)"];
}
OBJS = blockdiag nwdiag seqdiag
all: generate
clean:
rm -f *.png
generate:
for obj in $(OBJS); do \
echo "> $$obj <"; \
for i in $$obj*.txt; do \
echo ... $$i; \
$$obj -T svg $$i; \
$$obj -T png $$i; \
done;\
done
nwdiag {
inet [shape = cloud];
inet -- router;
network eucalyptus {
router;
address = "192.0.2.0/25"
dcmgr [address = "192.0.2.3/25"];
hva01 [address = "192.0.2.4/25"];
}
network wakame-vdc {
address = "10.x.x.x/25";
dcmgr [address = "10.x.x.3/25"];
hva01 [address = "10.x.x.4/25"];
batch01 [address = "10.x.x.x/25"];
}
}
nwdiag {
inet [shape = cloud];
inet -- router;
network "work line" {
address = "192.168.1.x/24";
router;
host [address = "192.168.1.x"];
}
network "Host-only Adapter" {
address = "192.168.56.x/24";
host [address = ".1"];
dhcp [address = ".2"];
dcmgr [address = ".xx (eth0)"];
hva01 [address = ".xx (eth0)"];
i-inst01 [address = "192.168.56.x"];
i-inst02 [address = "192.168.56.x"];
}
group wakame-vdc {
color = "#99ccff";
dcmgr; hva01;
i-inst01; i-inst02;
}
}
seqdiag {
// Set edge metrix.
edge_length = 140; // default value is 192
span_height = 5; // default value is 40
// Set fontsize.
default_fontsize = 10; // default value is 11
// blocks.
api[label = "Web API"];
init-batch[label = "starting-job.sh"];
task[label = "job-single.sh"];
volume;
rfc[label = "RFC text"];
init-batch -> api[label = "create volume"];
init-batch <--api;
init-batch -> api[label = "attach volume"];
init-batch <--api;
init-batch -> volume[label = "mkfs /dev/sdX"];
init-batch <--volume;
init-batch -> volume[label = "mount /dev/sdX"];
init-batch <--volume;
init-batch -> task[label = "do task",diagonal];
task -> rfc[label = "read text"];
task <--rfc;
task -> task[label = "calculate..."];
task -> volume[label = "write result"];
task <--volume;
init-batch<--task[diagonal];
init-batch -> api[label = "terminate instance"];
init-batch <--api;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment