TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Make systemd better for Podman with Quadlet

182 pointsby vyskocilmover 2 years ago

12 comments

asabilabout 2 years ago
This is really neat. I have been using `podman generate systemd` for a large number of deployments. This just makes it so much simpler.<p>For anyone wondering, the main difference between this and docker&#x2F;docker-compose is that podman can run in a daemonless mode such as containers are running directly under systemd which makes them integrate into the existing systemd infrastructure and appear as any other normal service.
评论 #34883895 未加载
cpitmanabout 2 years ago
This looks quite nice. I run a server which is already RHEL+podman+generated systemd units, but this both simpler and more declarative&#x2F;idempotent than my current setup. Anything that helps convince people that containers running on a single server can be simple, and doesn&#x27;t require an entire k8s stack.
评论 #34878180 未加载
评论 #34877350 未加载
PenguinCoderover 2 years ago
I heard you like abstract tools to do stuff, so I added an abstract tool to your tool to manage abstract tooling.
评论 #34876210 未加载
评论 #34874982 未加载
评论 #34875178 未加载
评论 #34876219 未加载
messeover 2 years ago
Huh, this exactly what I’ve been looking for recently for some local&#x2F;home-network&#x2F;homelab setups, even down to the use of systemd-like ini&#x2F;toml syntax.
INTPenisabout 2 years ago
Can this finally replace docker-compose? Because to me that&#x27;s been the biggest void in the whole podman ecosystem so far. (And no, if you&#x27;ve tried podman-compose you wouldn&#x27;t recommend it)
评论 #34878369 未加载
评论 #34878245 未加载
评论 #34878073 未加载
评论 #34878345 未加载
config_ymlover 2 years ago
I was just cursing a lot setting up a single node with my default stack.<p>I’m going to try this tomorrow, because containers are so useful, but I just don’t want to deal with K8s on anything that I run myself.
评论 #34876519 未加载
评论 #34876286 未加载
mike_hearnabout 2 years ago
Interesting!<p>For my own servers I use an internal tool that integrates apps with systemd. You point it at the output of your build system and a config file, and it produces a deb that contains systemd unit files and which registers&#x2F;starts the server on install&#x2F;reboot&#x2F;upgrade, as a regular debian package would. Then it uploads it to the server via sftp and installs it using apt, so dependencies are resolved. As part of the build process it can download and bundle language runtimes (I use it with a JVM), it scans native binaries to find packages that the app should depend on, and you can define your config including package metadata like dependencies and systemd units using the HOCON language [1].<p>Upshot is you can go from native binaries&#x2F;Gradle&#x2F;Maven to a running server with a few lines of config. Oh and it can build debs from any OS, so you can push from macOS and Windows too. If your server needs to depend on e.g. Postgres, you just add that dependency in your config and it&#x27;ll be up and running after the push.<p>It also has features to turn on DynamicUser and other sandboxing features. I think I&#x27;ll experiment with socket activation next, and then bundled BorgBackup.<p>Net&#x2F;net it&#x27;s pretty nice. I haven&#x27;t tried with containers because many language ecosystems don&#x27;t seem to really need them for many use cases. If your build tool knows how to download your language runtime and bundle it <i>sans</i> container by just setting up paths correctly, then going without means you can rely on your Linux distribution to keep things up to date with security patches in the background, it means networking works as you&#x27;d expect (no accidentally opened firewall ports!) and so on. SystemD knows how to configure resource isolation&#x2F;cgroups and kernel sandboxing, so if you need those you can just write that into your build config and it&#x27;s done. Or not, as you wish.<p>With a deployment tool to automate builds&#x2F;pushes, systemd to supervise processes and a big beefy dedicated machine to let you scale up, I wonder how much value the container part is really still providing if you don&#x27;t need the full functionality of Kubernetes.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;lightbend&#x2F;config&#x2F;blob&#x2F;main&#x2F;HOCON.md">https:&#x2F;&#x2F;github.com&#x2F;lightbend&#x2F;config&#x2F;blob&#x2F;main&#x2F;HOCON.md</a>
zephyrosabout 2 years ago
I&#x27;m using the podman ansible module[1] to manage the podman container atm, it&#x27;s ... Okish. I wrote a spaghetti mess with ansible conditionals and loops to manage multitude of systemd files made from podman-generate-systemd. If I had some time maybe I&#x27;ll try this out, a more declarative approach would certainly be nicer.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;containers&#x2F;ansible-podman-collections">https:&#x2F;&#x2F;github.com&#x2F;containers&#x2F;ansible-podman-collections</a>
评论 #34878465 未加载
Klasiasterabout 2 years ago
The mentioned auto-update and rollback stuff looks also nice: <a href="https:&#x2F;&#x2F;www.redhat.com&#x2F;sysadmin&#x2F;podman-auto-updates-rollbacks" rel="nofollow">https:&#x2F;&#x2F;www.redhat.com&#x2F;sysadmin&#x2F;podman-auto-updates-rollback...</a>
candiddevmikeover 2 years ago
Odd choice using systemd syntax willingly when all other industry tools use YAML, IMO
评论 #34875382 未加载
评论 #34874962 未加载
评论 #34874968 未加载
评论 #34874288 未加载
评论 #34877540 未加载
评论 #34875045 未加载
评论 #34875021 未加载
trialectabout 2 years ago
The unfortunate thing is, that podman creators do not give a damn about how their binary should be run on different linux distros.<p>RH being RH only RH (and derivatives) supports latest podman. For example on ubuntu lts you cannot run podman 4.4 and you will never have the possibility to run it. Maybe in 5 years Ubuntu&#x2F;Debian repos will be updated to contain podman 4.4, but until then you are stuck with whatever version your distro has.
评论 #34881195 未加载
评论 #34880528 未加载
评论 #34881700 未加载
评论 #34880550 未加载
评论 #34880438 未加载
评论 #34881101 未加载
jacooperabout 2 years ago
I still don&#x27;t see how this more convenient than just using compose, or what do you gain for leaving it.
评论 #34880114 未加载