phalethwb blue, I'll deploy theanswerisc blog onto podman today, just to test the stability
bluethx phaleth
bluealright, so it's podman inside nspawn or vice versa or what?
bluejust remember, I don't plan on using podman at all in the long run. per customer will be kvm, inside customer will be nspawn
phalethoh, ok, sounds like I should do more reading of archwiki
bluebasically the ideal is, we'll be having barebones, then we put kvm on it
blueevery customer (=namespace) gets put in one kvm (or several, but it's only ever one customer per kvm)
bluea barebones can have unlimited number of kvm spaces or whatever the term is
bluekvm ensures proper separation
bluewithin a kvm space, we use nspawn to separate all the machines
blueso take dreamreal: if his user is dreamreal, he gets a kvm space. within that, he could have many repos, with many apps. all of them run within his space (or several spaces, depending on the size/number of apps)
blueso he can never access the nspawn machines within another kvm space
phalethok, but it could happen that if he deploys many apps to one kvm then one of them could get compromised and all the other apps could get hacked
phalethwhy? cause nspawn containers run as root, that's why I'm messing around with rootless podman these days
phalethI mean the isolation will prolly not be perfect, but any extra isolation is good
phalethalso we will be able to use podman-compose, which is very very nice
blueisn't there rootless nspawn?
blueI think the limitation was creating networks, for that you need root privileges
blueanyway podman is probably not great isolation either. if you really want perfect isolation we need kvm
bluehow about one kvm per repo, will that be enough?
blueI guess no, since if your test app is compromised someone could compromise your prod app
phalethI'll just update the theanswerisc deployment today and so you can read it, for sure I'll try rootless nspawn too, but nspawn is such an underdocumented tech so I don't know, but I'll try
nevetKata Containers - Open Source Container Runtime Software
bluedefinitely big red flag there that it's written in rust
phalethyeah, noticed that several months ago, but didn't try that
blueyou did try firecracker, right
phalethnope, firecracker has memory issues, I'm willing to go with qemu/kvm
bluefor that we'd need a dedi though
blueI mean, it's likely our own vps runs in kvm
phalethit does, contabo does not hide the fact they use qemu/kvm
phalethfirecracker is also written in rust
blueI think kvm should be enough, but obviously an overkill per app
blueso the question becomes at what boundary level do you use it
blueper customer, you said is too broad
phalethI think nspawn and podman is a good solution, just need to avoid the use of root user like I do in all these mariadb containers
bluebut why both?
bluethey're competing products
phalethcustomer -> project(s) -> machine(s) for builds/deployments... builds/deployments are linked together via one table as stack layers
phalethcontainers within containers are done to gain more isolation, nothing is as perfect as a VM, but for containers there's non need for dedis
phalethalso I think crun and pasta are really great, maybe later on we could consider podman within podman
phalethboth rootless
blueoki, I'll let you be the master of that
blueas long as we fget proper security I don't really care how it's done
phalethyeah, I'm not so inclined towards nspawn anymore cause of security, but I'll try if it can run rootless containers
phalethalways assume the tech will be changing anyway, maybe katacontainers will win the game in few years
blueya
phalethrootless and also distroless are the buzzwords nowadays, also nspawn is heavily dependent on systemd which means the bottom layer of each container is huge and that will add up
blueya
bluephaleth: what about one dedi + several kvms (one per customer) + firecrackers inside kvm
blueor is that still the memory issue
phalethyeah, you can try fly again if you want to, the way they deal with OOMs related to firecracker is that they auto restart these microvms, no clue how they deploy postgres, prolly somehow differently
phaleththe good think about nspawn container is that one can run anything on it
bluemaybe we should just have a mixed security model, free customers share dedis, premiums are fully separated, get their own dedi + potentially kvm + nspawn
bluethe ultimate security win is one dedi per customer, but it's also the most expensive
phalethyeah, I think that's a good opportunity for marketing, having these shared vs. dedicated terms in the portfolio
phalethalso not everybody will need dynamic apps with dbs behind them, if it's just a static site we can deploy it to a freebsd server where the only thing needed is a piece of nginx config
phalethI mean there are already lots of services like that, but still
blueua
blueya
phalethanother cool thing about podman is that it runs on freebsd, while nspawn is linux only
blueI mean if you prefer podman, let's do it. I'm not sold on nspawn
blueI just don't want to mix a thousand different technologies because in the end we need an abstraction API over them, we can't do it manually, and every one of them means the abstraction layer gets more complex
bluedoes podman have a nice http-based API like docker?
bluemaybe that solves our need to create an abstraction around calls to nspawn
blueI wouldn't mind that, that would be great, would save me a lot of headache