Add podman support and fix containers.run kwargs.#3
Open
Minkiu wants to merge 9 commits into
Open
Conversation
5aa9db0 to
4575f9e
Compare
474f2e1 to
25905af
Compare
A module to handle the containers connection, based on the desired runtime.
This commit will allow the person to set `AYON_USE_PODMAN` in order to use `podman` instead of `docker`. This approach relies in a `podman` daemon being run which we then pass to `ash` by mapping it such as: `/run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock` to get a user service running it can be created and enabled with: `systemctl --user enable --now io.podman.socket` so the above socket is available.
A better formatting, so they slightly match ASH's logs.
25905af to
ff7aeee
Compare
martastain
requested changes
Oct 31, 2023
martastain
left a comment
Member
There was a problem hiding this comment.
I've pushed small changes (one typo and typing related things to keep mypy happy), but please keep the main loop silent when it doesn't do anything :)
| if cls.client is None: | ||
| return result | ||
|
|
||
| logging.debug("Checking for Running services.") |
Member
There was a problem hiding this comment.
Please remove log statements, which are executed in every iteration as they flood the logs
Member
There was a problem hiding this comment.
particularly lines 26, 32, 95, 113
Member
|
Otherwise everything works with Docker. I am not sure about parsing nxtools specific logs, but apparantly it doesn't hurt when a different format is used. |
Member
Author
|
Ok, I'll drop the |
b47ac1b to
0739d4e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR adds support to allow the person to run AYON services as either Docker or Podman. This does not affect what the actual ASH is run as tho.
containersmodule A module to handle the containers connection, based on the desired runtime.podmansupport This commit will allow the person to setAYON_USE_PODMANin order to usepodmaninstead ofdocker. This approach relies in apodmandaemon being run which we then pass toashby mapping it such as:/run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sockto get a user service running it can be created and enabled with:systemctl --user enable --now io.podman.socketso the above socket is available.ServiceLoggerImprove output of services logs. A better formatting, so they slightly match ASH's logs.Example of the logs:

Testing Notes
systemctl start --user podmansystemctl start --user podman.socketAYON_USE_PODMANto anything.ash, it should now be able to spin rootless containers.