-
Notifications
You must be signed in to change notification settings - Fork 30
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
Enable varlink socket #1
Comments
Thanks for the feedback. I'll admit that I'm unfamiliar with the varlink interface, so I did some reading. It's unclear to me whether the varlink socket supports rootless containers. If so, does it require each user to run a separate instance/socket? The documentation I can find is unclear. I can do some testing to verify the behavior if I'm unable to get more clarity. Managing podman objects from varlink seems to conflict with the premise of management from Puppet, although a valid use case might be to simply use Puppet to setup podman packages and the varlink service for other management tools. Is that what you had in mind, or are there something else I'm missing? Also FYI, I found a thread that indicates the varlink interface will be replaced in the future. |
I think it supports rootless containers. I'm not 100% sure, as I don't understand the magic behind systemd's socket ... management? I would assume so. The main goal here is that i'm using this module to configure podman for Nomad, which will then do the spawning of containers. I'm using both. Puppet managed containers using your module, and then nomad doing it's own thing. I don't see it being a conflict. With puppet modules I assume that anything the program is reasonably expected to do can be managed via puppet. I need to make another issue for management of docker config file (~/.docker/config.json) so I can manage repository configuration |
FWIW, I got nomad+podman v1 working with varlink, however I don't think it supports rootless containers in podman v1. The additional config in my own group {
'podman':
ensure => present,
system => true,
members => $users;
}
package {
'libvarlink-util':
ensure => installed;
}
systemd::tmpfile {
'podman.conf':
content => 'd /run/podman 0750 root podman',
require => [
Package['libvarlink-util'],
Group['podman'],
];
}
systemd::dropin_file {
'nomad.conf':
ensure => present,
unit => 'io.podman.socket',
content => epp('site_podman/podman-socket-nomad.conf.epp'),
require => Group['podman'],
before => Service['io.podman.socket'];
}
service {
'io.podman.socket':
ensure => running,
enable => true,
require => Class['systemd::tmpfiles'];
} Where the template file [Socket]
ListenStream=/run/podman/io.podman
SocketMode=0660
SocketGroup=podman However this interface is deprecated in podman v2 and replaced with a rest api via the
|
On some systems the container-selinux package might not already be installed. The podman packages pull this in, but the selboolean won't exist until that's done. This change ensures that the selboolean resource is applied _after_ the package is installed.
Podman exposes a varlink socket that can be enabled as a service.
https://podman.io/blogs/2019/01/16/podman-varlink.html
I'm thinking it could be it's own class, invoked like this:
Also- thanks for this module
The text was updated successfully, but these errors were encountered: