Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clusters on top of/layered across /extended other clusters? #111

Open
kbrady-vibrato opened this issue Apr 21, 2020 · 7 comments
Open

Clusters on top of/layered across /extended other clusters? #111

kbrady-vibrato opened this issue Apr 21, 2020 · 7 comments
Labels
comp/cluster Issue of cluster component kind/feature New feature or request

Comments

@kbrady-vibrato
Copy link

kbrady-vibrato commented Apr 21, 2020

Hi,

First off - thanks for an awesome diagramming tool - its been a really good experience the last couple of days getting stuff down in my head in to code.

That said, I have hit a bit of a quandary trying to represent a scaling set across 2 Azure subnets - this would be 3 clusters ideally:

with Cluster("SubnetA"):
  with Cluster("Scaling Set"):
    nodes = [
      VMLinux("node"),
      VMLinux("node")
  ]

with Cluster("SubnetB"):
  <include Cluster("Scaling Set") somehow>

I would like the Scaling Set cluster to be extended across both SubnetA and SubnetB - is this possible?

Thanks for all your hard work!

@Karreg
Copy link

Karreg commented Apr 21, 2020

Hello,

I juste discovered your tool this morning, and I agree this is a great tool that deserve to be known! I've been looking for something like that for years.

I agree with this request. Another basic use case is cloud organization through multiple AZs.

A DB cluster is a cluster, but each node are in a different AZ, each AZ being clusters too...

@mingrammer mingrammer added comp/cluster Issue of cluster component kind/feature New feature or request labels Apr 23, 2020
@mingrammer
Copy link
Owner

Interesting. I'll have to review if this is possible and get back to here. Thank you.

@acere
Copy link

acere commented Oct 21, 2020

Amazing tool, it could easily become my daily go-to, if this feature can be implemented!

@clayms
Copy link

clayms commented Nov 4, 2020

@kbrady-vibrato @acere @Karreg
Is below along the lines of what you were thinking?

from diagrams import Diagram, Cluster, Edge, Node

graph_attr = {
    "layout":"neato",
    }

scaling_clus_attr = {
    "bgcolor":"transparent",
    "pencolor":"blue",
    "penwidth":"4.0"
    }

with Diagram("\n\nOverlapping Clusters", show=False, graph_attr=graph_attr) as diag:

    with Cluster("SubnetA"):
        A_UpLf = Node("", shape="plaintext", pin="true", pos="0,4")
        A_LwRt = Node("", shape="plaintext", pin="true", pos="4,0")
    with Cluster("SubnetB"):
        B_UpLf = Node("", shape="plaintext", pin="true", pos="6,4")
        B_LwRt = Node("", shape="plaintext", pin="true", pos="10,0")
    with Cluster("Scaling Set", graph_attr=scaling_clus_attr):
        SS_UpLf = Node("", shape="plaintext", pin="true", pos="2,3")
        SS_LwRt = Node("", shape="plaintext", pin="true", pos="8,1")
        n1 = Node("node 1", shape="circle", labelloc="c", pin="true", pos="3,2")
        n1 = Node("node 2", shape="box",    labelloc="c", pin="true", pos="7,2")


diag

image

@kbrady-vibrato
Copy link
Author

hi @clayms - yes this is pretty much what i envisioned

@acere
Copy link

acere commented Nov 5, 2020

Thanks @clayms, this is the correct visual representation!

It would be great to be able to achieve the same without having to manually pin down the cluster and the nodes, but I understand that computing the correct item position becomes quickly hard to manage.

@Karreg
Copy link

Karreg commented Nov 5, 2020

Yes, it's exactly the need. Without position computing it would be great (since any other component can move on it's own).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp/cluster Issue of cluster component kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants