> It’s all HTTP APIs. Build a web UX and store the state in a DB.
Please no. Don't make running a stateful service a requirement for tooling people need to use when the world is on fire. Or needs to load 40Mb of JS to rebuild a deployment, and works only on Chrome 46.012.2039465.
Ops/SRE/DevOps/SysAdmin/SysOps/etc are different, and have optimised things to reduce the amount of dependancies.
The explicit, declarative model, using tools that don't need a ton of other things deployed.
Ideally the same tool can be run locally and in CI (with the same invocation commands) so that an Op can run tests locally, and even see the potential diff, before putting it up for review.
The advantage of this approach is you can see a diff, and use standard tooling like git / pr reviews to approve changes in day to day, and when the world is on fire, someone can break the glass and run it locally.
Never underestimate the value of peer review on a change to the infra - there is a reason things like ITIL exist, and we should learn from them.
> The advantage of this approach is you can see a diff, and use standard tooling like git / pr reviews to approve changes in day to day, and when the world is on fire, someone can break the glass and run it locally.
sounds sweet. imagine applying gerrit to infra
> there is a reason things like ITIL exist, and we should learn from them
spot on.
That said, I am unsure if most people here are ITIL aware/certified.
TBH, the primary reason why I am familiar with ITIL is our clients from Accenture days requires certification to win contracts.
Yeah, it is cool - https://opendev.org/ is done that way, as is some of the wikimedia labs infrastructure
I am not certified either - I have just worked in places with ITIL inspired processes, but I can really see a way they can move forward with tools like terraform / pulumi / ansible and git
There is significant value in text blob workflows.
Requiring the definition of everything that makes up your stack to be stored in a format that is not text adds complexity to the disaster recovery process, not to mention mutation, diffing, reviewing, approving, promoting, etc.
For places where a single environment that is updated in place and requires little/no approval to do so, sure. Personally I really like textual definition of infrastructure and configuration, and disagree that it is end days for them.
This would have been perfect for you maybe. I find the Diagrams package to be just fine as it is. A tool or library doesn't have to support _every_ bit of functionality in order to be useful.
When I first read this I thought this did the inverse of what it actually does. Let you interactively draw out diagrams then it would generate the boilerplate code to achieve that diagram.
I have the exact seem disappointment ;(. As we evolve towards a world were low code will become a part of everday tools, diagram generating code is to me a good answer, at least on a scaffolding level...
I was hoping this tool would support directionality/sequencing of nodes.
A tool I've used in the past is SequenceDiagram.org for diagraming a sequence of service calls. While a bit old-school, it's good for its purpose.
I've also used Whimsical[0] to model flows and graph-like relationships. It's got the added benefit of allowing multiple users to view and edit the same document. Whimsical is still my favorite tool right now due to flexibility, but it's a closed-source/paid product, so I'm open to alternatives.
It's text-based (build on Mermaid if I'm not mistaken) and really easy to work with for simple interactions.
Also because it's purely text-based you can pass around the full context in the URL. This makes it a little awkward to collaborate vs. a true hosted solution, but it also lowers the barrier to entry significantly.
Why do we need a tool to draw its architecture and we don't have a tool which auto discover the architecture and auto updates it and draw it form here ?
That will shrink the gap between the current architecture and the current diagram that almost always exists
This looks really neat! Is it possible to have embedded diagrams. For example, Gitlab lets you embed a PlantUML[1] diagram in any Markdown or ADoc file using a proxy server. This makes it really easy to write and serve documentation.
Personally, I'm a fan of PlantUML. Having an svg served in a browser that has labels linking directly to the relevant entity (code, resource etc) is a huge plus for new hire onboarding.
calc_d.Datum("SuperNumber")
class SuperNumber(int):
pass
@calc_d.Service(“Calculator”, “takes numbers and operations and operates”)
class Calculator(object):
@calc_d.Endpoint("Add", calls=["Increment"], main_data={"b": "SuperNumber})
def add(self, a, b: SuperNumber):
out = a
for i in range(b):
calc_d.multi(calls=["Increment"])
out = self.increment(out)
I have been thinking about using this for some diagrams, but whats been on the back of my mind since I heard about it is how to combine it with Terraform, or Troposphere, and have your infrastructure as code also draw the diagrams automatically.
IME diagrams resulting from production code are not helpful - code is full of boilerplate, irrelevant details and is generally made to solve a problem instead of being documentation.
...but if a tool that simplifies configuration or code into a diagramable state exists, i'd like to know :)
I was recently looking for something similar, allowing me to draw network diagrams using text or code. I came across [0] which looks great, but has some rough corners and seems to be abandoned by he author. Does anyone have any other recommendations for more bare-metal oriented topologies?
If you don't know draw.io, it's an free diagram software that not only has an XML format to save them, but can also be used to save it as a PNG that EMBEDS said XML, so you can edit it again, but display it like a regular image.
When I was ~10yrs old, I would play with a program called RPG Maker 2000. It had a really interesting code system where you could click blocks of code and it would bring up a UI for modifying them. It was always simple stuff like if/else, for, switch.. but it merged the simplicity of clicking dropdowns and the like with the complexity of actually seeing the code and learning to read and navigate it. You could also go rogue and write custom code.
I still think that this solution has more life to it and would like to explore that some day.
this is going to send me down a rabbit hole for a long long time .... there was another thread some months ago about an architecture diagraming tool that reads the code and outputs architecture based on methods.
If you are interested in this kind of thing please check out the blockdiag series of tools (seqdiag, rackdiag, netdiag, etc) I haven't looked back since I started using them other than a workplace that uses lucidchart.
76 comments
[ 2.9 ms ] story [ 129 ms ] threadThere are some other kinds of diagrams would we like to draw that’s not system architecture diagrams, eg:
- algorithms
- decision trees
- UML/ER Diagrams
Mermaid (JS) helps draw quality diagrams quickly - more than system architecture diagrams.
It would have been perfect if the development cycles that went here was used to create Mermaid templates instead.
Unless this also lets us draw more than just system architecture diagrams.
IMO the end days for TF and YAML engineering are close, at least for new work
It’s all HTTP APIs. Build a web UX and store the state in a DB.
SRE/ops people ...at work just use the methods everyone else does
Unless the company still has hardware, cloud ops/SRE is just making their lives harder to be different
Please no. Don't make running a stateful service a requirement for tooling people need to use when the world is on fire. Or needs to load 40Mb of JS to rebuild a deployment, and works only on Chrome 46.012.2039465. Ops/SRE/DevOps/SysAdmin/SysOps/etc are different, and have optimised things to reduce the amount of dependancies.
Ideally the same tool can be run locally and in CI (with the same invocation commands) so that an Op can run tests locally, and even see the potential diff, before putting it up for review.
The advantage of this approach is you can see a diff, and use standard tooling like git / pr reviews to approve changes in day to day, and when the world is on fire, someone can break the glass and run it locally.
Never underestimate the value of peer review on a change to the infra - there is a reason things like ITIL exist, and we should learn from them.
sounds sweet. imagine applying gerrit to infra
> there is a reason things like ITIL exist, and we should learn from them
spot on.
That said, I am unsure if most people here are ITIL aware/certified.
TBH, the primary reason why I am familiar with ITIL is our clients from Accenture days requires certification to win contracts.
Yeah, it is cool - https://opendev.org/ is done that way, as is some of the wikimedia labs infrastructure
I am not certified either - I have just worked in places with ITIL inspired processes, but I can really see a way they can move forward with tools like terraform / pulumi / ansible and git
Requiring the definition of everything that makes up your stack to be stored in a format that is not text adds complexity to the disaster recovery process, not to mention mutation, diffing, reviewing, approving, promoting, etc.
For places where a single environment that is updated in place and requires little/no approval to do so, sure. Personally I really like textual definition of infrastructure and configuration, and disagree that it is end days for them.
Would also be great to import things with generic names:
which you could replace at a later point with: And have a provider neutral description that could eventually be compiled into a provider-specific Terraform description just by changing the imports.Yup!
As "Diagram as Config" this tool is a great fit but not for "Diagram as Code". There are better alternatives out there.
Certainly a lot of the building blocks for such a system now exist.
A tool I've used in the past is SequenceDiagram.org for diagraming a sequence of service calls. While a bit old-school, it's good for its purpose.
I've also used Whimsical[0] to model flows and graph-like relationships. It's got the added benefit of allowing multiple users to view and edit the same document. Whimsical is still my favorite tool right now due to flexibility, but it's a closed-source/paid product, so I'm open to alternatives.
[0] https://whimsical.com/
https://swimlanes.io/
It's text-based (build on Mermaid if I'm not mistaken) and really easy to work with for simple interactions.
Also because it's purely text-based you can pass around the full context in the URL. This makes it a little awkward to collaborate vs. a true hosted solution, but it also lowers the barrier to entry significantly.
It's focused on non technical users so the syntax will always be very simple (at the cost of flexibility but that's on purpose).
looks fascinating. is this closed source?
Can I run this over an API or a local container?
That will shrink the gap between the current architecture and the current diagram that almost always exists
Looks really.i.ptessive
Stupid mobile keyboards...
Personally, I'm a fan of PlantUML. Having an svg served in a browser that has labels linking directly to the relevant entity (code, resource etc) is a huge plus for new hire onboarding.
1: https://plantuml.com/
It feels like I'm missing something with this tool if one's already aware of Mermaid (and PlantUML)
‘’’ import diagrams calc_d = diagrams.new_diagram(“calculator_123”)
calc_d.Datum("SuperNumber") class SuperNumber(int): pass
@calc_d.Service(“Calculator”, “takes numbers and operations and operates”) class Calculator(object): @calc_d.Endpoint("Add", calls=["Increment"], main_data={"b": "SuperNumber}) def add(self, a, b: SuperNumber): out = a for i in range(b): calc_d.multi(calls=["Increment"]) out = self.increment(out)
def integration_test(): calc_d.instantiate("Calculator") calc = Calculator() ... ‘’’EDIT: Dear dang and YC Hacker News, I would love to create code blocks using surrounding triple quotes..
On macOS:
[1]: http://devops-pipeline.com/architecture.tb.png [2]: http://devops-pipeline.com/
...but if a tool that simplifies configuration or code into a diagramable state exists, i'd like to know :)
[0] http://go.drawthe.net/
https://marketplace.visualstudio.com/items?itemName=hediet.v...
If you don't know draw.io, it's an free diagram software that not only has an XML format to save them, but can also be used to save it as a PNG that EMBEDS said XML, so you can edit it again, but display it like a regular image.
I still think that this solution has more life to it and would like to explore that some day.
I'm really curious. Maybe for doing something programmatically, but GraphViz may be better.
It isn't. Apples and oranges; Mermaid deals with UML-ish type diagrams whereas 'Diagram as Code' is illustrating cloud system architecture.
> but GraphViz may be better
GraphViz is actually doing the rendering. You might want to take a moment and study the site.
...and then people talk about CV-driven development...
Slightly off-topic, but I wish JavaScript's import syntax was designed to be this way around, for better autocomplete in your editor.
:(
http://blockdiag.com/en/