Quadlet: Difference between revisions
From wikinotes
(→Usage) |
|||
Line 53: | Line 53: | ||
systemctl --user daemon-reload | systemctl --user daemon-reload | ||
systemctl --user start quadlet-demo.service | systemctl --user start quadlet-demo.service | ||
</syntaxhighlight> | |||
You can debug the generated files using | |||
<syntaxhighlight lang="bash"> | |||
/usr/libexec/podman/quadlet --dryrun | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- Usage --> | </blockquote><!-- Usage --> |
Revision as of 18:29, 5 May 2024
Quadlet is a tool for generating systemd services from podman containers.
You can also describe a project as a podman-compose project, and generate systemd services for it as well.
The goal for the project is to be concise and change tolerant with sane defaults.
Documentation
official tutorial https://www.redhat.com/sysadmin/multi-container-application-podman-quadlet src https://github.com/containers/podman/tree/main/pkg/systemd/quadlet
Tutorials
https://mo8it.com/blog/quadlet/ intro
Locations
~/.config/containers/systemd/*.container
build systemd services from these /usr/libexec/podman/quadlet
quadlet executable (not on path)
Usage
While quadlet is technically an executable, it's designed to work with systemd commands directly.
After adding your files to
~/.config/containers/systemd/*.{kube,container,volume,network,yml}
,
you can run daemon-reload and your generated systemd services will be made available.Here's the TL;DR from the official tutorial:
mkdir -p $HOME/.config/containers/systemd/ cp envoy-proxy-configmap.yml \ quadlet-demo.kube \ quadlet-demo-mysql.container \ quadlet-demo-mysql.volume \ quadlet-demo.network \ quadlet-demo.yml \ $HOME/.config/containers/systemd/ systemctl --user daemon-reload systemctl --user start quadlet-demo.serviceYou can debug the generated files using
/usr/libexec/podman/quadlet --dryrun