-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add podman
support and fix containers.run
kwargs.
#3
base: main
Are you sure you want to change the base?
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 :)
ash/services.py
Outdated
@@ -22,10 +23,13 @@ def get_running_services(cls) -> list[str]: | |||
if cls.client is None: | |||
return result | |||
|
|||
logging.debug("Checking for Running services.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove log statements, which are executed in every iteration as they flood the logs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
particularly lines 26, 32, 95, 113
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. |
Ok, I'll drop the |
b47ac1b
to
0739d4e
Compare
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.
containers
module A module to handle the containers connection, based on the desired runtime.podman
support This commit will allow the person to setAYON_USE_PODMAN
in order to usepodman
instead ofdocker
. This approach relies in apodman
daemon being run which we then pass toash
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.ServiceLogger
Improve output of services logs. A better formatting, so they slightly match ASH's logs.Example of the logs:
Testing Notes
systemctl start --user podman
systemctl start --user podman.socket
AYON_USE_PODMAN
to anything.ash
, it should now be able to spin rootless containers.