Proposal: Nats based fleet control #319
Replies: 1 comment
-
|
Closing as seems no one is interested . Will fork and publish |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am raising this idea to see if we could add this , or add it via a 2nd repo if that is preferred. I am also happy to do this on my repo and keep it open source.
—-
Use case:
I need to be able to control a global cluster of both cloud and on premise systems that use process compose.
the cool thing about process compose is that there is no docker , so it’s amazing for Edge Computing .
Nats Jetstream is great for edge computing and so I am planning to add NATS. I have used nats for many systems and feel confident that this would be relatively easy to do.
—-
Layering of code to do this:
https://github.com/F1bonacc1/process-compose/blob/main/src/client/client.go just needs a nats wrapper that acts as a nats agent. It could be its own process also , which might be more robust.
Then a single nats client or nats cli, can see a fleet of machines running process compose , with in real time data.
The nats context that is built in the nats cli will allow you to switch between clusters easily.
gui could be the existing TUI, but it’s not really designed for seeing many machines. So I would need to extend it .
Datastar is a golang web gui with NATS support and would make an excellent gui as it’s also designed for real time and is very light weight.
here is example code of the web GUI , using nats Jetstream: https://github.com/blinkinglight/go-experiment-eventsourcing
We could also get errors through this system, so help with Out of memory errors , disk full, etc, and send notifications .
—-
then we get to the Actuation opportunities.
the best possible way would be with terraform , but that requires a reconciling system that can only change what is different . The process compose code base does not have this from what I can see ?
Authentication and rbac is built into NATS, so this would make it multi tenant , allowing a nats server , to manage many fleets of process compose machines with many different owners of those machines .
—-
Auditing and history .
I can use SQLite to store changes over time , so we have a complete audit log.
—-
Any thought would be appreciated :)
I can built this very quickly as most of the needed layers are simple nd well known , thanks to NATS.
Beta Was this translation helpful? Give feedback.
All reactions