The Gluster Blog

Gluster blog stories provide high-level spotlights on our users all over the world

Some GraphViz Templates for my OpenStack Savanna talk

Gluster
2014-02-07

Okay…  So I keep finding myself googling for these GraphViz templates.  Here’s the ones im using for my OpenStack Savanna preso this tuesday.

This should be interesting to anyone who is either (1) interested in giving an openstack savanna talk or (2) stealing my slides and modifying them or (3) needs to spice up their graphviz chops.

UML style diagrams

node_group_template_master -> cluster_template [arrowhead = diamond];
node_group_template_slave -> cluster_template [arrowhead = diamond];
cluster_template -> cluster

Subgraphs

Here’s how to make subgraphs in.  I’ve used this to show the three stages of oozie. In this case, a super distilled subgraph : Russian dolls of the oozie layers.

digraph G {
subgraph cluster_a {
Bundle;
subgraph cluster_0 {
coordinator;
subgraph cluster_1 {
workflow;}}}}


Node Shapes
 

Node shapes are important when you want to show multiple attribtues of a node (i.e. describe internal data structure).

digraph e {

   node [shape=record];
   CUSTOMER_PAGE [label=”CUSTOMER_PAGE|json”];
DIRTY_CSV [label=”DIRTY_CSV|fname   lname -prod , price ,prod,..”];
CSV [label=”CSV|fname,lname,prod,price,date,xcoord,ycoord,…”];
PROD_REC [label=”PROD_REC  | jay vyas, dogfood, .6″];
MAHOUT_VIEW [label=”CSV for MAHOUT | x,y,prob”];
Generate -> DIRTY_CSV ;
DIRTY_CSV -> pig [label=”apply hash for coords, clean”];
pig -> CSV [Shape=”record”];
CSV -> hive ;
hive -> MAHOUT_VIEW [label=”select coordinates”];
MAHOUT_VIEW -> mahout -> PROD_REC ;
PROD_REC  -> crunch
CSV -> crunch ;
crunch -> CUSTOMER_PAGE [label=”s|b”];

}

So, in the above graph, we have NODE definitions (i.e. CUSTOMER_PAGE) which use a | separator to create two parts of a box.  Then we reference those node defs later on.  You can also use the “node” field for a general default node type (see node [shape=record] above, which makes all shapes into records).

ER type cardinality diagrams

And finally, you can use different “arrowhead” implementations “crow”,  “diamond”, and “empty”.

 digraph cont  {
cluster_group -> node_group [arrowhead = crow];
}

 

 

 

BLOG

  • 06 Dec 2020
    Looking back at 2020 – with g...

    2020 has not been a year we would have been able to predict. With a worldwide pandemic and lives thrown out of gear, as we head into 2021, we are thankful that our community and project continued to receive new developers, users and make small gains. For that and a...

    Read more
  • 27 Apr 2020
    Update from the team

    It has been a while since we provided an update to the Gluster community. Across the world various nations, states and localities have put together sets of guidelines around shelter-in-place and quarantine. We request our community members to stay safe, to care for their loved ones, to continue to be...

    Read more
  • 03 Feb 2020
    Building a longer term focus for Gl...

    The initial rounds of conversation around the planning of content for release 8 has helped the project identify one key thing – the need to stagger out features and enhancements over multiple releases. Thus, while release 8 is unlikely to be feature heavy as previous releases, it will be the...

    Read more