-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(install): Adds support for podman(compose) #3673
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
base: master
Are you sure you want to change the base?
Conversation
…mpatibility with docker
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.
Quite surprised (positively!) that the changes needed are so few! Added a few comments and on top of those, we definitely should have a test using podman
now to make sure this actually works and does not break in the future (can help with this if you need me).
Thanks so much for taking the effort!
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.
Oops, sorry meant the require changes 😅
FYI tests failed with the following error:
|
I agree that having a test would be great. In the best case, we can run the whole suite for both docker and podman. I'm just unsure about the environment this is run on and would welcome your input and ideas very much! |
…pose build; Substitutes occurences of
Have converted back to draft, as there are some tweaks to make, still. |
@DuncanConroy Let us know if you need help in terms of anything, we'd be happy to help you. Having this PR really made us happy :) |
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.
Tests are run on GitHub Actions. I'm happy to add a new job that installs and runs with podman
once the PR is stable in terms of API
@@ -29,6 +29,8 @@ Options: | |||
--no-report-self-hosted-issues | |||
Do not report error and performance data about your | |||
self-hosted instance upstream to Sentry. | |||
--container-engine-podman |
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.
Same as above: how about this just being --container-engine
with a default value of docker
?
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.
Not sure I understand your intent. This was thought as a switch to activate podman over docker. We can surely remove the autodetection and completely rely on this switch. I'd still keep it --container-engine-podman
, because just using --container-engine
would possibly be misleading?
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.
@DuncanConroy sorry for not being clearer. What I had in mind was making --container-engine
a flag to pass in a custom value as in --container-engine <engine>
where we default to docker
(so when the flag is not passed, we will assume docker
).
Although we would only support podman
and docker
at start, this should keep the API unchanged if we ever add new engines like runc
or similar.
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.
Not sure how to do this with bash, tbh. :D
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'll see what I can do about this 😅
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.
It is quite simple... unless you want to validate argument :)
Something like
case "$1" in
<...>
--container-engine) CONTAINER_ENGINE="$2"; shift ;;
Modifies docker-compose.yml with pull_policy: never, which also works for podman-compose.
…ait_ready function
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.
Thank you for this!
sentry-admin.sh file needs to be fixed as well, I guess adding source install/detect-container-engine.sh
suffices.
Okay, now we need to make the tests aware of Podman |
If podman-comose compatible enough |
@BYK do you still remember what you mean by this? |
@aldy505 the tests written in Python assume everything with Docker and Docker Compose. They now need to be aware of what technology we're using. See the fail here: https://github.com/getsentry/self-hosted/actions/runs/14893466765/job/41831036774?pr=3673#step:4:2280 |
@DuncanConroy FYI, I'll revisit this after 25.6.0 release, since it has too much big changes already 😆 |
UPD. Nevermind it's incomplete yet Hi! Since podman works without root privileges
Additional notes for future me:
|
@doc-sheet do you wanna work on the tests? We can merge this PR first, then when it's on |
Why is this broken..
|
because podman is rootless,
well I'm trying to make tests pass, but don't have much time this days to research. I don't think it is ready to be merged because of new changes like chown. |
Interesting, it didn't try to pull vroom at all
|
what is "nofile restriction"?
okay 👍 |
ah you mean nofile limits on linux.. |
Ah I see the problem now. |
Another bug in podman-compose containers/podman-compose#1118 I stepped on. |
ughh I wanna skip the test |
Adds support for podman(compose), while maintaining compatibility with docker
Introduces a new script to detect podman vs. docker. Distinguishes between docker and podman minimum versions and substitutes uses of docker with a variable instead.
Closes #369
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.