Chat Logs

  1. * nevet joined #primate
  2. * blue!~blue@user/blue changed the topic to: https://primate.run | this channel is mirrored to the Primate discord, channel #irc
  3. * phaleth joined #primate
  4. phalethbye bye blue
  5. * blue joined #primate
  6. phalethwb blue, I'll deploy theanswerisc blog onto podman today, just to test the stability
  7. bluethx phaleth
  8. bluealright, so it's podman inside nspawn or vice versa or what?
  9. 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
  10. phalethoh, ok, sounds like I should do more reading of archwiki
  11. bluebasically the ideal is, we'll be having barebones, then we put kvm on it
  12. blueevery customer (=namespace) gets put in one kvm (or several, but it's only ever one customer per kvm)
  13. bluea barebones can have unlimited number of kvm spaces or whatever the term is
  14. bluekvm ensures proper separation
  15. bluewithin a kvm space, we use nspawn to separate all the machines
  16. 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)
  17. blueso he can never access the nspawn machines within another kvm space
  18. 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
  19. phalethwhy? cause nspawn containers run as root, that's why I'm messing around with rootless podman these days
  20. phalethI mean the isolation will prolly not be perfect, but any extra isolation is good
  21. phalethalso we will be able to use podman-compose, which is very very nice
  22. blueisn't there rootless nspawn?
  23. blueI think the limitation was creating networks, for that you need root privileges
  24. blueanyway podman is probably not great isolation either. if you really want perfect isolation we need kvm
  25. bluehow about one kvm per repo, will that be enough?
  26. blueI guess no, since if your test app is compromised someone could compromise your prod app
  27. 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
  28. bluecoo
  29. bluebtw phaleth, did you look into this? https://katacontainers.io/
  30. nevetKata Containers - Open Source Container Runtime Software
  31. bluedefinitely big red flag there that it's written in rust
  32. phalethyeah, noticed that several months ago, but didn't try that
  33. blueyou did try firecracker, right
  34. phalethnope, firecracker has memory issues, I'm willing to go with qemu/kvm
  35. bluefor that we'd need a dedi though
  36. blueI mean, it's likely our own vps runs in kvm
  37. phalethit does, contabo does not hide the fact they use qemu/kvm
  38. phalethfirecracker is also written in rust
  39. blueI think kvm should be enough, but obviously an overkill per app
  40. blueso the question becomes at what boundary level do you use it
  41. blueper customer, you said is too broad
  42. 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
  43. bluebut why both?
  44. bluethey're competing products
  45. phalethcustomer -> project(s) -> machine(s) for builds/deployments... builds/deployments are linked together via one table as stack layers
  46. 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
  47. phalethalso I think crun and pasta are really great, maybe later on we could consider podman within podman
  48. phalethboth rootless
  49. blueoki, I'll let you be the master of that
  50. blueas long as we fget proper security I don't really care how it's done
  51. phalethyeah, I'm not so inclined towards nspawn anymore cause of security, but I'll try if it can run rootless containers
  52. phalethalways assume the tech will be changing anyway, maybe katacontainers will win the game in few years
  53. blueya
  54. 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
  55. blueya
  56. bluephaleth: what about one dedi + several kvms (one per customer) + firecrackers inside kvm
  57. blueor is that still the memory issue
  58. 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
  59. phaleththe good think about nspawn container is that one can run anything on it
  60. bluemaybe we should just have a mixed security model, free customers share dedis, premiums are fully separated, get their own dedi + potentially kvm + nspawn
  61. bluethe ultimate security win is one dedi per customer, but it's also the most expensive
  62. phalethyeah, I think that's a good opportunity for marketing, having these shared vs. dedicated terms in the portfolio
  63. 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
  64. phalethI mean there are already lots of services like that, but still
  65. blueua
  66. blueya
  67. phalethanother cool thing about podman is that it runs on freebsd, while nspawn is linux only
  68. blueI mean if you prefer podman, let's do it. I'm not sold on nspawn
  69. 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
  70. bluedoes podman have a nice http-based API like docker?
  71. bluemaybe that solves our need to create an abstraction around calls to nspawn
  72. blueI wouldn't mind that, that would be great, would save me a lot of headache
  73. phalethyeah, I'd also like to use haproxy APIs
  74. phalethpodman does have docker compatible API https://medium.com/@pingkunga/how-to-enable-remote-api-in-podman-e32cede96309
  75. bluethat would be cool: in that case, the podman machien for repopack.com would use this API for management, that's amazing, no?
  76. blueI'm gonna try to install podman here locally and activate the API, so I can develop against it
  77. phalethyeah, it's great
  78. phalethI'd like to mess around with freebsd later on again, but now I'll be slowly introducing podman into the setup we already have
  79. blueok
  80. bluephaleth: I installed podman & ran a rootless container on it, lovely!
  81. phalethyeah, very simple
  82. bluepodman run -d --name hello-http --rm \ -p 127.0.0.1:8080:8080 \ docker.io/hashicorp/http-echo:latest \ -listen=:8080 -text="hello world"
  83. bluephaleth: ^ will start a new test container you can test with
  84. blue`podman stop hello-http` to kill it
  85. blueyou might need to remove the \
  86. blueit was a multiline command
  87. bluepodman run -d --name hello-http --rm -p 127.0.0.1:8080:8080 docker.io/hashicorp/http-echo:latest -listen=:8080 -text="hello world"
  88. blue^
  89. bluephaleth: systemctl --user enable --now podman.socket
  90. bluecheck that it worked: `systemctl --user status podman.socket --no-pager`
  91. blueshould say `Active: active (listening)`
  92. phalethon the vps?
  93. bluesure.. it'd be scoped to your user anyway, so no harm
  94. bluecurl --silent --unix-socket "$XDG_RUNTIME_DIR/podman/podman.sock" http://d/_ping
  95. blueshould say `OK`
  96. phalethyou can try this image ghcr.io/ammnt/freenginx:latest, it's a very hardened one
  97. bluealso try this
  98. bluecurl --silent --unix-socket "$XDG_RUNTIME_DIR/podman/podman.sock" http://d/v1.0.0/libpod/info | jq
  99. blue"version": {
  100. blue "APIVersion": "5.8.0",
  101. blue "GoVersion": "go1.26.0-X:nodwarf5",
  102. blue "Version": "5.8.0",
  103. blue "GitCommit": "07efc23e05c3d9aa15a0f30d57194737bfc4b6b1",
  104. blue "BuiltTime": "Sun Feb 22 22:45:50 2026",
  105. blue "Built": 1771796750,
  106. blue "OsArch": "linux/amd64",
  107. blue "Os": "linux"
  108. blue }
  109. blueit's written in go, hurrah!
  110. bluethis is amazing phaleth
  111. bluethis is exactly what we needed
  112. phalethyeah, only the crucial components to podman are written in C, crun and pasta
  113. bluephaleth: what'st he idea here? customer=user, podman runs in the context of the user?
  114. phalethyeah
  115. phalethI'd still do orgs already, but we said we will not do orgs
  116. blueyes, I meant orgs
  117. blueuser=org
  118. phalethorg can have multiple users
  119. blueyes but the podman would run under the org user?
  120. blueanywayt we can nail down the particulars later
  121. phalethyeah, for now just have orgs and users tables with 1:1 relationship
  122. phaleththis image works with podman docker.io/library/nginx:alpine-slim and it's only 5.46 MB
  123. bluecool
  124. bluephaleth: https://gitea.repopack.app/repopack/website
  125. bluecan you check if this works for you locally?
  126. blueclone repo & npm install & npx primate
  127. bluethis assumes you have podman running under your user
  128. phalethyeah, I'll try
  129. blueif all goes well, localhost:6161/networks should show networks, localhost:6161/containers should show containers
  130. blueif you don't have any containers running, just try the command earlier that creates an echo server
  131. phalethyou could add all that usage instructions into a README
  132. blueI could, but this will be fast changing. you won't see the networks or containers like that, directly anymore
  133. phalethI get Not Found error on both of those pages
  134. bluecurl --silent --unix-socket "$XDG_RUNTIME_DIR/podman/podman.sock" http://d/v5.8.0/libpod/containers/json | jq
  135. bluedoes this work? (Your version might be different)
  136. phalethnope, that curl call return nothing
  137. phalethI guess I was supposed to enable the API
  138. bluecurl --silent --unix-socket "$XDG_RUNTIME_DIR/podman/podman.sock" http://d/v1.0.0/libpod/info | jq
  139. bluewhat about this?
  140. blueyeah, I don't think your API is working
  141. blue14:08 < blue> phaleth: systemctl --user enable --now podman.socket
  142. blue14:08 < blue> check that it worked: `systemctl --user status podman.socket --no-pager`
  143. blue14:09 < blue> should say `Active: active (listening)`
  144. phalethyeah, you could add at least that to the README as that should not change
  145. phalethok, now I see the default network on the networks page
  146. phalethand no containers on the containers page since I just installed podman
  147. blueyes
  148. bluevery good
  149. phalethyeah, but not very self explorable
  150. blueyes
  151. blueI'm experimenting as we speak, so I haven't got to document much yet
  152. bluethe main question is if it reliably works for you, on another machine
  153. blueand we answered it now
  154. phalethyup
  155. phalethnotice the shell changing here https://images4.imagebam.com/da/99/f3/ME1B56O7_o.png
  156. phalethroot -> non-root -> root -> non-root
  157. blueyes