News for hackers. Stuff that matters.
Re:Make systemd better for Podman with Quadlet by candiddevmike on Monday February 20, 2023 @06:18PM (#34874222)
Odd choice using systemd syntax willingly when all other industry tools use YAML, IMO
Re:Make systemd better for Podman with Quadlet by qbasic_forever on Monday February 20, 2023 @06:26PM (#34874288)
You can apparently use kubernetes YAML with a .kube target and podman will orchestrate the containers, service, volumes appropriately (on a single node). The only systemd config is a minimal boilerplate to point at the kubernetes YAML.
Re:Make systemd better for Podman with Quadlet by richm31415 on Monday February 20, 2023 @07:12PM (#34874716)
You are correct. And there is an Ansible role for automated management: https://github.com/linux-system-roles/podman/
Re:Make systemd better for Podman with Quadlet by thayne on Monday February 20, 2023 @07:44PM (#34874962)
For this, systemd syntax is a lot better than yaml IMO.

In fact, I'd prefer if the tools you mentioned used something else besides yaml.

Re:Make systemd better for Podman with Quadlet by pzmarzly on Monday February 20, 2023 @07:54PM (#34875046)
> In fact, I'd prefer if the tools you mentioned used something else besides yaml.

To be fair, most of the popular DevOps tools can work with JSON instead of YAML just fine. And JSON can be easily generated from almost anywhere. I don't think you can work with systemd syntax as easily.

Re:Make systemd better for Podman with Quadlet by gh02t on Monday February 20, 2023 @08:12PM (#34875196)
Out of curiosity, do you know any tools that can't use JSON but can use YAML? JSON is supposed to be valid YAML.
Re:Make systemd better for Podman with Quadlet by erik_seaberg on Tuesday February 21, 2023 @01:30AM (#34877482)
Every YAML parser supports JSON (maybe modulo a couple of weird Unicode chars), but YAML also has features (tags, start/end document) that you can’t express in JSON, so it depends on whether the tool relies on seeing those.
Re:Make systemd better for Podman with Quadlet by messe on Monday February 20, 2023 @07:46PM (#34874978)
> In fact, I'd prefer if the tools you mentioned used something else besides yaml.

Unfortunately, there norway way that's going happen.

Re:Make systemd better for Podman with Quadlet by 0xC0ncord on Monday February 20, 2023 @07:45PM (#34874968)
It seemed to me that the original target audience for this is users already familiar with systemd's unit syntax, so making these "unit files" use it as well was a sensible choice.
Re:Make systemd better for Podman with Quadlet by throwaway892238 on Monday February 20, 2023 @07:51PM (#34875021)
RedHat basically sponsored the development of Systemd (among other things) so their full-throated support isn't surprising

also, fwiw, YAML is a data serialization format, not a configuration format. people who use YAML and pretend it's a config file format are either lazy, incompetent, or both.

Re:Make systemd better for Podman with Quadlet by candiddevmike on Monday February 20, 2023 @08:23PM (#34875270)
The industry disagrees with your hot take. Configurations will almost always be serialized into some kind of struct, YAML/JSON/TOML/etc work well for this. The neat part is you can use other tools to do the templating to YAML more intelligently, instead of having each tool DIY their own config templating setup.
Re:Make systemd better for Podman with Quadlet by xyzzy_plugh on Monday February 20, 2023 @10:45PM (#34876220)
Hot take? It's literally a data serialization language. Configuration != data serialization for, like, all of time.

No one is mincing words about YAML being used for configuration rather rampantly. They're saying it's a shitshow, and I agree.

> Configurations will almost always be serialized into some kind of struct

No, this is in fact a fairly modern phenomenon due to what I can only imagine is fear of compilers. The grand tradition is for configuration to be parsed and interpreted, which is rather distinct from serialization. Take your editor, or version control software of choice, or nearly every file in /etc, for example.

Standardizing things can be good, sure, and for all the warts YAML is at least consistent, usually, but it's a trend in the wrong direction.

Treating configuration as data is a Choice. I can hear them saying now "oh but being able to template or write a program to manipulate or edit configuration is so much better" -- take a look at how git config works. You can edit interactively with the CLI, read/write arbitrary fields, and yet it's not structured beyond INI style "key = value". There's no schema, and yet nothing is lost. There's certainly no Norway problem.

Re:Make systemd better for Podman with Quadlet by db48x on Monday February 20, 2023 @08:23PM (#34875273)
Possibly they are deliberately abusive towards their users.
Re:Make systemd better for Podman with Quadlet by userbinator on Monday February 20, 2023 @07:53PM (#34875045)
Odd to call it "systemd syntax" when it predates the invention of systemd by a few decades: https://en.wikipedia.org/wiki/INI_file
Re:Make systemd better for Podman with Quadlet by candiddevmike on Monday February 20, 2023 @08:04PM (#34875137)
That's what it's called: https://www.freedesktop.org/software/systemd/man/systemd.syn...

Yes, it's inspired by INI files.

Re:Make systemd better for Podman with Quadlet by viraptor on Monday February 20, 2023 @08:36PM (#34875382)
It's a tool that replaces your usual long systemd unit file with a smaller systemd unit file without boilerplate. Seems like a perfectly good choice to me.
Re:Make systemd better for Podman with Quadlet by darthrupert on Tuesday February 21, 2023 @01:39AM (#34877540)
YAML is such a poor default choice for most things, that it's not odd at all to want to improve on that. In the same vein, people used to say that JSON is a bad format to use because everyone just uses XML.