-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 system boot
for installing services
#8779
Comments
This should not be that hard to do. Basically you need a new command podman system boot Which will use libpod looking for stopped containers that should be started at boot time and then start them. Second part would be to create a systemd service file that runs podman system boot at boot time, once. |
@rhatdan mind if I work on it? |
I never mind free labor. |
Can you summarize what the command should do? It's not obvious to me what the problem is and how the solution should look like. |
My request is that it handles installing and enabling |
Thanks for clarifying! We've had discussion around installing systemd unit files before, and I really don't like it. It is something that Looking at the command, the naming would be a bit unfortunate as |
Would love to see another discussion on this. I understand the desire to not have podman manage a bunch of external systems but I feel this interaction with systemd makes sense. This has been the biggest point of frustration in switching from Docker where containers could be easily configured to start on boot. Because there is no |
Did you reach out to the systemd folks? I have no idea if that was already discussed there. @msekletar may know :) |
I haven't. I would like to know see your discussion here first before I go open this request in yet another repo. So far you're the only person who's voiced that this isn't a good idea. To my knowledge there are already people working on it and I would expect after a conversation with other maintainers that either the implementation efforts continue or this is closed with a link to the new request in |
This sounds very different from what I understood the intent of |
Sorry about my lack of clarity. Ultimately I'm trying to address some pain in switching from docker. I'd originally posted this in
|
Why is root required to install the service?
I think this a common work flow when using podman pod create --name $NAME ...
podman generate systemd --new --files $NAME
mv *.service $HOME/.config/systemd/user
systemctl --user daemon-reload
systemctl --user start pod-$NAME.service Is that matching what you have in mind? |
Quick summary from a chat with @mheon and @rhatdan: The original idea was to facilitate restarting containers on boot. That's something Podman does not yet handle. We refined the idea a bit and want to do the following:
@boaz0, are you cool with this approach? |
@vrothberg sure. Looks good to me. I will update my PR. |
That sounds good to me as well. |
Thanks, @boaz0 ! |
A friendly reminder that this issue had no activity for 30 days. |
Still in holding pattern. We would like to really push this forward once podman 3.0 is released. |
A friendly reminder that this issue had no activity for 30 days. |
@boaz0 Do you have time to work on this, or should we take it over? |
Part of it is ready for review. The other part is going to be pushed as PR by the end of the day. |
A friendly reminder that this issue had no activity for 30 days. |
Tonight I am going to push updates... remove stale tag. 🙏 |
/kind feature
Description
Add a
podman system boot
command that installs a systemd service to run a pod on startup as the user who installed the service.This is a followup of containers/podman-compose#254 where I had requested a feature of
podman-compose
to install systemd services for a pod via some built in command. The motivation here is that I've noticed users all installing systemd services for their pods in different ways making it difficult to manage. @rhatdan and @mheon discussed adding apodman system boot
as a solution to the linked issue frompodman-compose
. I'm hoping opening the issue here (as suggested by @rhatdan) is the right thing to do to move this forward.Additional environment details (AWS, VirtualBox, physical, etc.):
AWS/VirtualBox/physical
The text was updated successfully, but these errors were encountered: