Develop option to Daemonize Containerlab #928
Unanswered
crankynetman
asked this question in
Ideas
Replies: 1 comment 1 reply
-
this is definitely makes a lot of sense. Containerlab API is a great feature request. But I don't (yet) have cycles to quickly hack this in. so far, the APi-ish layer that we did for containerlab was based on remote ssh exec. Which is a poor man's API, but... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think it would be pretty sweet to daemonize containerlab, as you could use it as a lab deployment engine for in-house tools that need to spin labs up on demand. If I were to imagine how this would work, I'd think that clab would have the ability to be run as a full-blown daemon on the OS (started up w/ systemd, have a pidfile, etc) and then the CLI could be migrated to something that would communicate directly with that deamon process (the mechanism for this is a bit beyond my head). This would allow us to create other ways to communicate with the clab daemon, such as an API endpoint.
You could definitely get a "poor-man's daemon" by just writing a little FastAPI app to control clab via normal methods, so maybe that would be a fun way to start.
The ultimate goal in my mind for doing something like this would be so that you could have an API to POST/PUT/PATCH at and deploy labs from a remote system (currently I accomplish this w/ ansible, but an API would be far more elegant). But you could also use this to start things like the graph function and keep that running and other fun stuff.
What do folks think? Any interest in this, or am I a madman (or both?)
Beta Was this translation helpful? Give feedback.
All reactions