How to make boxes appear where I want them?

30 views Asked by At

I want the Openshift and letsencrypt to appear below the Stage and Prod segment. Now its aligned with the Prod and Stage segment. Is rank the way to solve it?

Also, is there a way to obtain results like fe03-osl2-stage and fe04-osl3-stage within a "Stage" label without a subgraph?

<graphviz format="svg">
digraph G { 
label = "Setup"
labelloc = top;

node [shape=record];
edge [dir=both];

subgraph cluster_0 {
    label = "Internet";

    tcp80 [label="*:80/tcp"];
    tcp443 [label="*:443/tcp"];
    tcp8443 [label="*:8443/tcp"];
}   

subgraph cluster_1 {
    label = "Stage";

    subgraph cluster_1a {
        label= "fe03-osl2-stage";

        "fe03-osl2-stage-haproxy" [label= "HaProxy"]
        "fe03-osl2-stage-varnish" [label= "Varnish"]
    }
    subgraph cluster_1b {
        label= "fe04-osl3-stage";

        "fe04-osl3-stage-haproxy" [label= "HaProxy"]
        "fe04-osl3-stage-varnish" [label= "Varnish"]
    }
} 

subgraph cluster_2 {
    label = "Prod";

    subgraph cluster_2a {
        label= "fe03-osl2-prod";

        "fe03-osl2-prod-haproxy" [label= "HaProxy"]
        "fe03-osl2-prod-varnish" [label= "Varnish"]
    }
    subgraph cluster_2b {
        label= "fe04-osl3-prod";

        "fe04-osl3-prod-haproxy" [label= "HaProxy"]
        "fe04-osl3-prod-varnish" [label= "Varnish"]
    }
}  

subgraph cluster_3 {
    label = "Openshift";

    master0 [label= "master0"]
    master1 [label= "master1"]
    master3 [label= "master3"]
}  

letsencrypt [label= "letsencrypt"]

tcp80 -> "fe03-osl2-stage-haproxy";
tcp443 -> "fe03-osl2-stage-haproxy";
tcp80 -> "fe04-osl3-stage-haproxy";
tcp443 -> "fe04-osl3-stage-haproxy";
tcp8443 -> "fe03-osl2-stage-haproxy";
tcp8443 -> "fe04-osl3-stage-haproxy";

tcp80 -> "fe03-osl2-prod-haproxy";
tcp443 -> "fe03-osl2-prod-haproxy";
tcp80 -> "fe04-osl3-prod-haproxy";
tcp443 -> "fe04-osl3-prod-haproxy";

"fe03-osl2-stage-haproxy" -> "fe03-osl2-stage-varnish";
"fe04-osl3-stage-haproxy" -> "fe04-osl3-stage-varnish";

"fe03-osl2-prod-haproxy" -> "fe03-osl2-prod-varnish";
"fe04-osl3-prod-haproxy" -> "fe04-osl3-prod-varnish";

"fe03-osl2-stage-haproxy" -> letsencrypt;
"fe04-osl3-stage-haproxy" -> letsencrypt;

"fe03-osl2-prod-haproxy" -> letsencrypt;
"fe04-osl3-prod-haproxy" -> letsencrypt;

"fe03-osl2-stage-haproxy" -> master0;
"fe03-osl2-stage-haproxy" -> master1;
"fe03-osl2-stage-haproxy" -> master3;
"fe04-osl3-stage-haproxy" -> master0;
"fe04-osl3-stage-haproxy" -> master1;
"fe04-osl3-stage-haproxy" -> master3;

"fe03-osl2-prod-haproxy" -> master0;
"fe03-osl2-prod-haproxy" -> master1;
"fe03-osl2-prod-haproxy" -> master3;
"fe04-osl3-prod-haproxy" -> master0;
"fe04-osl3-prod-haproxy" -> master1;
"fe04-osl3-prod-haproxy" -> master3;

"fe03-osl2-stage-varnish" -> master0;
"fe03-osl2-stage-varnish" -> master1;
"fe03-osl2-stage-varnish" -> master3;
"fe04-osl3-stage-varnish" -> master0;
"fe04-osl3-stage-varnish" -> master1;
"fe04-osl3-stage-varnish" -> master3;

"fe03-osl2-prod-varnish" -> master0;
"fe03-osl2-prod-varnish" -> master1;
"fe03-osl2-prod-varnish" -> master3;
"fe04-osl3-prod-varnish" -> master0;
"fe04-osl3-prod-varnish" -> master1;
"fe04-osl3-prod-varnish" -> master3;

}
</graphviz>

This is how it looks today: enter image description here

1

There are 1 answers

0
sroush On

Seemingly, you are wanting "letsencrypt" on the next (lower) rank. This use of minlen will accomplish what you want:

  "fe03-osl2-stage-haproxy" -> letsencrypt [minlen=2];

I'm unsure about your second request. Are you wanting to eliminate the rectangle around a cluster (peripheries=0) or are you asking something different?

enter image description here