Chat Logs

  1. bluehi phaleth
  2. bluephaleth: https://gitea.repopack.app/repopack/website/src/branch/master/README.md
  3. bluerepopack can now deploy the primate website
  4. bluea lot of it is based on your work
  5. bluehttps://gitea.repopack.app/repopack/website/src/branch/master/strategies
  6. blue'strategies' are the RP mechanism for autodetection of deploy conditions
  7. bluethe strategies have requirements which, if fulfilled, they are selected. they then gather info and feed it into a containerfile
  8. bluecurrently there is only the primate/deno/v0 strategy so there's no real mechanism/heuristics to select a strategy, and also the strategy is saved to disk, which is going to moved to a db table
  9. bluethe readme should contain all you need to try it out locally, I'd be happy if you could tell me if that works for you as well
  10. bluethe next step should probably be to databaserise the strategies, and then add primate/bun/v0 and see how to meaningfully select between. since the primate repo has no particular hints as for its preferred strategy, it would likely use the `primate/v0` which would be a node strategy in the future
  11. bluealternatively, in the step PICK_STRATEGY, the user will be offered a few strategies and can pick one, and set his preferred strategy for the future
  12. blueI'm still working out the best ergonomics for this, obviously we want the default to go as smooth as possible
  13. bluethere are many open items to deal with, such as subdomains to ip mappings, so programatically dealing with haproxy, show container logs, and much much more, but it's a good start
  14. bluemy idea for the strategies is that they're be admin-managed for now (so by us), but later users would be able to submit strategies, or use custom strategies in their own namespaces/projects
  15. bluethey'd be*
  16. blueonce we got the strategies in the DB I'm going to start branching out and trying more apps. I'm particular excited about trying get dreamreal's bytecode.news online *without* relying on his Dockerfile or docker-compose.yml
  17. bluesince his project has a pom.xml using `org.springframework.boot` as parent, I was thinking of creating a `spring/v0` (in the pom.xml family) strategy and seeing how far I can get with that
  18. phalethhi blue
  19. bluehi
  20. phalethsounds great
  21. blueya
  22. phalethsince I'm on debian it's tricky for me to test that locally, I should install archlinux on VBox, not sure when
  23. phalethtoo much stuff is happening
  24. bluehow do you mean
  25. bluebtw, you don't specifically need arch for this, I think
  26. blueI just checked the readme and you just need podman really
  27. phalethbytecode.news deployment is documented for systemd-nspawn, shouldn't be too hard to make Containerfiles for podman out of that, what I don't remember is how to do container linking
  28. phalethpodman on debian is outdated
  29. blueoh
  30. blueyeah, that's the next thing we're gonna have to tackle, multi-container setups
  31. bluebytecodenews has the java backend, postgres db, then next frontend and I think some mail service
  32. phalethit's just like podman network is already there, how to give each container it's IP is also documented, so it's now only a configuration problem
  33. bluejava backend is easily detectable and deployable, postgres db can be inferred from the pos.xml deps, the next frontend and the mail service are gonna be harder
  34. phalethfor example the app server of bytecode.news needs the IP of the db
  35. blueyes
  36. phalethI don't actually remember how bytecode.news app server is cofigured, but I'm pretty sure I've documented that for systemd-nspawn
  37. blueso we have a few options I think. we can define virtual host names for the network, I believe, so you don't have to work with ips. or we make the ips available as ENVs
  38. blueI remember virtual host names were a pain for nspawn, but should be possible with podman
  39. blueENV variables I haven't done yet in RP
  40. bluebut you'd just add them over the ui
  41. phalethdon't worry about vhost for podman, it's doable but also pain, the network for podman is internal
  42. phalethyou can see how that is done from primate website deployment doc
  43. blueyeah
  44. bluesome of the things we'll be able to figure out from .env.default
  45. bluefor bytecodenews for exapmle, it's DB_URL=jdbc:postgresql://localhost:5432/nevet
  46. phalethyeah, I think that's documented in the provision repo somewhere in nspawn dir
  47. bluethat, combined with the pom.xml dep, indicates a postgres container
  48. blueso we spawn up a postgres container put its connection string under DB_URL
  49. bluewhich for a spring framework app, should be `jdbc:postgresql://`
  50. blueand the hostname
  51. phalethpodman 5.8.3 is out, can I reboot the VPS?
  52. phalethbye bye blue
  53. phalethjust ask to reboot the VPS in irc and it already does that
  54. bluephaleth: done
  55. phalethcool
  56. blueso the point I was making is this
  57. phalethcontainers didn't start automatically
  58. blueoh
  59. bluein the bytecode.news repo, they have a docker-compse.yml but also an env.default
  60. phalethsudo podman start --all
  61. phalethhad to do that manually
  62. bluewe have all the data we need to autogenerate a deployment, I think
  63. bluewhy didn't they start automatically?
  64. phalethoh, you wanna autogenerate deployment
  65. phalethno idea, systemd is buggy
  66. blueyes
  67. bluethat's what I'm already doing for primate website
  68. bluethe deployment strategy isn't specific for primate website, it's for primate in general
  69. bluein the case of primate, the heuristics aren't that complex, it's detecting 'primate' package.json and looking for config/app.ts or config/app.js
  70. bluethis doesn't have to work for 100% of repositories, but it'd be great success if it works for 80% of them
  71. bluewe're gonna craft strategies like wordpress/v0, nextjs/v0, and they're gonna detect and deploy
  72. blueand strategies belong to families based on a detected file in root
  73. blueprimate/deno/v0 is a strategy in the family package_json
  74. bluewordpress/v0 would be a composer_json strategy
  75. bluesome things will be hardcoded, others detected. wordpress always uses mysql so we don't need to detect that
  76. phalethin provision repo take a look at nspawn/containers/nevet
  77. phalethand also nspawn/containers/wp-nginx
  78. phaleththe vhost and systemd stuff can be ignored
  79. blueyeah
  80. bluethis "Allow connectivity from specific machine." step could be a real pain in the butt
  81. blueanyway, we'll get to the bridge when we cross it. multi-container setups are complex
  82. bluemy base idea is to delegate into substrategy
  83. bluehttps://gitea.repopack.app/repopack/website/src/branch/master/strategies/primate_deno_v0.yaml#L30
  84. bluethis "link: database: detect" does nothing right now (and is anyway irrelevant for primate website)
  85. bluebut ideally, it should be able to detect a database requirement, create a container and link it
  86. bluein primate's case it is easy: do we have a "@primate/postgresql" dep. though this is specific to primate and I hope that the database substrategy for package_json family could be general
  87. blueanyway, most of the real complexity in RP is in those strategies and the generation of Containerfiles and containers
  88. bluenext I'm going to do hatchling or scld or just primate/bun/v0 so I can see how easy it would be switch back and forth between deno and bun
  89. bluewe're also going to have a command line tool `repopack` over npm, so you could do `repopack deploy` from the root of your repo
  90. bluebut that requires login etc., couldn't bother with that mess just yet
  91. bluefor now, see if you can get a newer podman on debian or maybe arch on a virtual machine. would be good to know if this works well for you locally too
  92. blueafaik you only need some version of podman 5, not the latest
  93. phalethpodman does have internal dns, so assigning ip addresses to containers might not be necessary
  94. phalethit's just about trying it
  95. phalethonly podman networks are needed
  96. blueya
  97. phalethI'll try later, pretty sure I already don't understand :D but too busy with other crap right now
  98. blueno worries, if you follow the readme, it should work
  99. blueotherwise ask here or in #repopack
  100. blueI'm off to the store, bbl