I mean I dunno what your trying todo but I assume its executing commands on lots of containers, I built this the other weekend and may even more appropriate to either give some input on or a base for your research (it uses PHP and the exec API (but not xterm.js - its not needed) which i prefer to node everday)
master ← action-series
opened 01:25AM - 17 May 20 UTC
**This isn't yet practical (but it does work, you have to create the structure t… hrough manual SQL statements right now let me know if you want an example) & when it is dont think of this as a tool to setup hosts - its more of an update and re-configure tool for hosts you don't control with `cloud-init` or `images`**
Action series - Tree's are magical!
(Instances = the agnostic term for containers & vms not the host themselves)
Ever wanted to run a bunch of commands (bash or what ever? - this doesn't care as long as your instance will process it) on lots off different LXD instances in a structured manor ? Ever wanted to control exactly what happens after each command and take a different path (on every instance) ? Well this is that (plus it records the history against the instance - so if you dont re-name the instance gives audit history as-well)
What you do is create "Action Series" which is a chain off commands, you can branch depending on the return result of the command
(Red represents the path it will take if an error occurs - this is the overview of the "series")

Capture the result of each command at each step on each instance on every host, means you can see how every host processed the chain I.E
(A solid black line indicates a path that wasn't taken because the step didn't reach the required status)

Because this is tree's it will support inf deep chains (what if you error handling fails ? Clearly you call another error handling function! And if that fails ? You N+1 that bad boi) depending on the return code you can do what ever you want!
I dont think at this point I will support multi parent nodes as this creates horrible graphs - I may create some kind of labelled error handler system to reduce duplication of commands
This also records this stdout and stderr log locations but doesn't yet give access to them, but it will - so you can inspect every host every step of the way!
Right now this is blocking in the browser - It waits on each step on each instance to complete & offer's 0 visual feedback as to where the process is (so not very practical), we need to be able to run background jobs which push to the node server which updates the web interface for the user (you could theoretically - right now - run long jobs (`apt install big-package`) open another tab and keep refreshing the run to see its current progress)
And we should include a "patches" export so if you need help someone debug something but dont want them to wait for to run a bunch of commands you can send them a "patch" (an action series) they can import and run
Id be happy to give more specific guidance than look at my code but I dont know what your trying todo you’ll need to get more specific