Currently, PodmanProvisioner and SystemdPodmanProvisioner run podman and crun directly.
However there are valid use cases for wanting to run these on a remote system - Podman has some HTTP REST (?) remote API, but that wouldn't work for pipe semantics of crun.
The simplest way is to just install podman (and its ecosystem) on the remote end via external scripting, and give the user a way to abstract away command execution, e.g.
def run_podman_command(*args, **subprocess_kwargs):
subprocess.run(*args, **subprocess_kwargs)
This lets the user subclass it as MyRemotePodmanExecutor, overriding subprocess.run with ie. ManagedSSHConnection-based .run() commands, effectively executing all podman commands via an arbitrary Connection's .cmd().
Currently,
PodmanProvisionerandSystemdPodmanProvisionerrunpodmanandcrundirectly.However there are valid use cases for wanting to run these on a remote system - Podman has some HTTP REST (?) remote API, but that wouldn't work for pipe semantics of
crun.The simplest way is to just install
podman(and its ecosystem) on the remote end via external scripting, and give the user a way to abstract away command execution, e.g.This lets the user subclass it as MyRemotePodmanExecutor, overriding
subprocess.runwith ie. ManagedSSHConnection-based.run()commands, effectively executing all podman commands via an arbitrary Connection's.cmd().