by doriftoshoes · 11y ago · 0 comments
This is really the next step in runbook automation. It gives users a way to express procedures and operational patterns in code (the workflow definitions are in yaml). With any sort of automated remediation there is always the concern of "painting over the mold" but at the same time you don't want to get stuck doing a large number of manual steps when you could be focusing your energy on tracking down the root cause of the issue and resolving that. The more important aspect to me personally is the easy of version controlling these ops patterns. Store the workflow definitions in source control and it is easy to diff the changes in your procedure.
This is, I guess, less annoying than executable XML.
This "invent your own worse programming language" fad is disappointing.
Then you get turing completeness, and turing completeness harms readability and makes your language a magnet for technical debt.
This is why most of us these days use an intentionally dumb language to template HTML (another non-turing complete language). The alternative was a god-awful fucking mess (remember PHP without a framework/templating language?).
This is what Tim Berners Lee alluded to with this: https://en.wikipedia.org/wiki/Rule_of_least_power
Here's my example (yes, I'm one of those people):
I don't think you could write a cleaner, more readable parameterized test case in python.
>This "invent your own worse programming language" fad is disappointing.
There's a lot of disasters out there for sure (in the testing world as well =), but I'm pretty happy to see custom YAML-based declarative languages catching on.
I think Ansible states are, likewise, way easier to deal with than the equivalent in python would end up being.
For executable declarationish things, I like Tcl (usually embedded in perl so I can use Moo(se) for OO rather than the inferior crap in other languages).
Hashicorp's HCL is an interesting middle ground.
Fad? This has been a common anti-pattern basically since the dawn of computing. :)
Which is why ingy and I invented http://p3rl.org/JSONY for config files.
Just to clarify, YAML is one way to write the workflow spec. Just like how YAML is way to write docker compose file. We picked YAML over JSON because it is less verbose and allows one to add comments which is pretty useful if someone is looking at a remediation workflow early in the AM. We do use YAQL expressions for some variable manipulation but that is not a YAML spec. A workflow is a collection of actions and actions can be written in almost any language (as a script) or python (first class actions). So you can think YAML workflow as a declarative spec rather than a programming language. Maybe that helps?