Live data from Hacker News

Quadlets might make me finally stop using docker-compose

major.io

151–160 of 212 posts

Re: Quadlets might make me finally stop using docker-compose

#152

Why the name quadlets? Classical definition: > A word consisting of four bytes Quad implies 4 something or rather. What does it refer to here? 4 sections of configuration?

A quad is commonly used in the 3D graphics world to mean a rectangle (https://www.selfcad.com/blog/quads-in-3d-a-complete-guide), so the idea is that we go "kubelet" -reinterpret-> "cubelet" -flatten it-> "quadlet".

Re: Quadlets might make me finally stop using docker-compose

#153

Earlier quoted context omitted.

For anything other than a hello world type project a compose file will fall over kinda quick. I would much prefer to (ahem) compose smaller things together and systemd is great for that.

For my home server, I have a flat 2507 line docker-compose file that automatically configures and boots all of my 85 containers. I still have some complexity: .env files in /opt/ /, a systemd process that automatically runs docker-compose -f / /docker-compose.yaml -d on boot, and it's only a little irritating to have use absolute paths for everything instead of relative. But, after having to update all of my services…

> 2507 line docker-compose file

mother_of_god.gif

Re: Quadlets might make me finally stop using docker-compose

#154

I don't see how this is anything like compose. With quadlets you have to create a file for each container and deal with creating volumes and so on. Whereas with Docker it's one file, one command and you're done, you don't have to deal with anything else.

They're both declarative manifests describing how to run one or more images on your system.

You use .container for a single container, .kube for all-in-one pods, .network for networks, and .volume for volumes. It has all the stuff it's just broken down in a more (imho) sysadmin friendly way where all the pieces are independent and can be independently deployed.

Re: Quadlets might make me finally stop using docker-compose

#155

I started using quadlets for new system designs a month ago and I feel like I'm neck deep in it now. My conclusion is that there is absolutely no reason to stop using docker-compose if your developers are comfortable running one command, on one file, in one git root. Quadlets are basically docker compose, in systemd. They've finally done it, systemd has it all and now it even has docker compose. ;) That's really all…

I've got a home server that runs docker compose as a service in systemd at startup.

I'm naive, whats the difference between doing that and using these "quadlets"?

Re: Quadlets might make me finally stop using docker-compose

#156
post #134

Earlier quoted context omitted.

That's not the case (anymore). I run a NixOS based router with nftables (no iptables installed at all), and podman works just fine. It simply adds its NAT rules to nftables (unless you tell it not to). As far as I know, this was introduced with the new networking stack (netavark).

Do you have a link to your NixOS router config? Been thinking of doing this for a while but never got round to it.

Here's a redacted version: https://gist.github.com/dbrgn/137da9e9ad342d536d1e452fba3e9d... Maybe it's useful as reference. It includes multiple network interfaces, a firewall, VLANs, DNS and ad blocking (plus two network services). (This version of the config does not yet make use of podman, I'm still in the process of setting everything up.)

I'm also using nix flakes, to keep the setup reproducible.

If you want to get started, I can recommend the following:

1. Install nixos. That will only take a few minutes, and you end up with a system in which you have a "/etc/nixos/configuration.nix" file. Now you can edit the config file, run "nix-rebuild switch", and the changes have been applied. Every change results in a new entry in the bootloader menu, so you can always rollback.

2. Check out this great blog series: https://www.jjpdev.com/posts/home-router-nixos/ It helped me a lot.

3. Use https://search.nixos.org/options to search config options (the stuff in your config file).

Note: The blogpost still uses the classic way of managing network devices. I use Systemd, which I think is nicer and more flexible.

Re: Quadlets might make me finally stop using docker-compose

#157

Quadlets are very much a welcomed integration but last time I tried to create an users Quadlet in .config/containers/systemd/ with a linuxserver.io image I ended up with all sort of files owned by strange UID & GID. So I had to add --userns keep-id to my container unit what caused all sort of problem because of podman apparently. So you always end up with the kind of investigation & fiddling that shouldn't be necessa…

I believe this is due to the linuxserver.io images actually being customized specifically for usage with docker.

For images intended for rootless deployments e.g. podman, take a look at the onedr0p container images, https://github.com/onedr0p/containers

Re: Quadlets might make me finally stop using docker-compose

#158
post #115

I never understood the appeal of docker-compose (you can accomplish roughly the same thing by having a Shell script that calls docker client, but skipping the Python clown fiesta with dependencies, environments etc.) Quadlets seems not exactly a replacement for the function docker-compose was supposed to perform though, or am I wrong? It seems like its target audience is administrators who are supposed to run contain…

> I never understood the appeal of docker-compose Using a recent HN submission to spin up a local vector stack for analyzing notes, https://github.com/memgraph/odin/blob/main/docker-compose.ym... How would you suggest a bash script handle configuring all the different images, their ports, and ensuring services are spun up in the correct dependency graph (parallel where possible), and are exposed to each other as a re…

docker-compose is slow and not quite parallel (because it's written in Python and uses requests internally). So your yearning for speed optimization is kind of misplaced. If you are using docker-compose, you probably don't care about speed anyways. And, the way I understand it's typically used is to create some slice of the system a developer is working on, so unless we are talking about many minutes difference, the speed gains are inconsequential. Also, because you are using it to deploy just the relevant part of the system, the setup won't be complicated -- it's counterproductive to do that in a completely local system and especially because you want to work with as few components as possible during such deployments.

So, how would I go about that in Shell? I don't see a problem. Can you point to a specific problem? All these settings in your example easily translate into docker commands.

Re: Quadlets might make me finally stop using docker-compose

#159
post #68

I started using quadlets for new system designs a month ago and I feel like I'm neck deep in it now. My conclusion is that there is absolutely no reason to stop using docker-compose if your developers are comfortable running one command, on one file, in one git root. Quadlets are basically docker compose, in systemd. They've finally done it, systemd has it all and now it even has docker compose. ;) That's really all…

The next step: systemkubed.

see bluechi aka hirte

https://www.redhat.com/en/blog/introducing-hirte-determinist...

https://github.com/containers/bluechi

Re: Quadlets might make me finally stop using docker-compose

#160

I don't see how this is anything like compose. With quadlets you have to create a file for each container and deal with creating volumes and so on. Whereas with Docker it's one file, one command and you're done, you don't have to deal with anything else.

For anything other than a hello world type project a compose file will fall over kinda quick. I would much prefer to (ahem) compose smaller things together and systemd is great for that.

> "hello world"

This is at best hyperbole and at worst nonsense. Come on, at least put some effort into drawing the line of complexity a little clearer.

Post reply on HN