使用 Graphviz 的 dot 或 neato 来布局簇
我正在尝试使用 dot 绘制我们企业中的服务和服务器的部署图。对于第一次迭代,我使用 neato 将每个服务绘制为一个盒子,并 使用 graphviz 和 neato 防止记录重叠,再加上允许样条线,使我能够获得一个像样的布局,并将边缘作为依赖项。
现在我需要将物理服务器放置在每个盒子内。首先,我将每个服务制作为一个名称以cluster开头的子图,然后将代表物理服务器的节点放置在每个框中。再次,在 GraphViz - 如何连接子图? 的帮助下,我伪造了边缘连接集群而不是节点。问题是,这只适用于点。当我使用 neato 进行布局时,它不知道边缘位于簇之间,因此它仅移动我用来锚定边缘的簇的节点。结果是簇盒巨大且重叠。
我希望这是有道理的。有没有办法强制neato将集群中的节点分组?
I'm trying to draw a deployment diagram of services and servers in our enterprise using dot. For the first iteration, I used neato to draw each service as a box and Prevent overlapping records using graphviz and neato , plus allowing splines, allowed me to get a decent layout with the edges as dependencies.
Now I need to place physical servers inside each of these boxes. First I made each service a subgraph with a name beginning with cluster and then placed the nodes representing the physical servers inside each box. Again, with the help of GraphViz - How to connect subgraphs? I faked out the edges to connect the clusters rather than the nodes. The problem is, that only works in dot. When I use neato to do the layout, it doesn't understand the edges are between clusters, so it moves only the node of the cluster I used to anchor the edge. The result is the cluster boxes are enormous and overlapping.
I hope that makes sense. Is there any way to force neato to keep the nodes in a cluster grouped?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我重新思考了我正在做的事情,我没有为每个服务使用子图,而是为每个服务器使用子节点,而是使用 记录格式代替。现在每个节点看起来都像这样
,而且布置它们更加容易:)
I rethought what I was doing, and instead of using a subgraph for each service with subnodes for each server, I used a record format instead. Each node now looks like
and it's much easier to lay those out :)