-
Notifications
You must be signed in to change notification settings - Fork 61
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
WIP: Action series #209
base: master
Are you sure you want to change the base?
WIP: Action series #209
Conversation
@turtle0x1 Couple ideas (maybe you've done something like these already though):
I'll add more comments as I learn more about what you are doing. However, what tool(s), programming approach are you implementing this with? JSON, REST, ansible, etc? One tool I looked at in the past that I thought "could" be a great fit for this is Rundeck: Rundeck is extensible by other tools like Ansible, Jenkins, PagerDuty: Rundeck also is designed to support different "User Role Based Access Controls" that dictate what updates a particular "user" is permitted to execute/perform. There is also a good collection of already existing Rundeck "plugins": Finally, regarding Rundeck here is a Blog that a Rundeck user wrote to help new Rundeck developers get started:
The Blog does focus on RPM based installation of Rundeck instead of APT-GET but I think most of it is probably generic in nature. Another software tool I have used and liked is "Fabric" which is a Python based tool that was fairly simple to learn/use also One GUI for Ansible (ansible is now owned by Redhat) is Ansible Tower. However, the Upstream Open Source GUI is called "Ansible AWX":
Both Rundeck & Fabric use SSH for fundamental access to nodes. But as I don't program any more today I'm not a good judge :-) Brian |
Thanks for the feeback! Ill be sure to add the lists of instances that failed onto the action series overview!
Each command run on each instance (container / VM) is recorded individually in its own log files (stdout and stderr output) The second picture in my original post shows the result of each instance (not host) for a particular "run"
So your "execution plan" (which is the series of commands to run on each host) might look something like this (read left to right) Right now this just using PHP & "pure LXD" and Id like to try to keep it that way (as soon as you start using SSH / another protocol you move into a different class of products its no longer compatible with just LXD), I do need to look at software to run background jobs but this is probably somewhat of a "replacement" for Rundeck in the sense you program scripts to be called - this could be used to control ansible scripts (or playbooks or whatever) running and perform custom actions based on the results of each action |
905706e
to
d25a35f
Compare
This isn't yet practical (but it does work, you have to create the structure through 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
orimages
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