Submit

Back to the channels

#primate

  1. blue hi phaleth
  2. phaleth hi blue
  3. blue dreamreal: can we give phaleth access to the bytenews/nevet repo? I can't make it run on linux with docker, and porting it to nspawn has already cost me 2 hours of nothing... he's the nspawn expert here
  4. blue plus, if he gets it done, it'll be RP-ready
  5. blue I'm REALLY not good at devops
  6. phaleth you wanna deploy nevet onto the VPS?
  7. blue I wanna deploy it locally on nspawn, so I can test the primate component I'm writing for it
  8. blue but yes, eventually, if dreamreal is fine with that, I'll have it run on RP
  9. blue I already have it building on buildkit in <90s, which isn't bad, but I just can't figure out networking
  10. blue he's using docker compose, which is bad voodoo magic, but works for him on mac. it doesn't work for me on linux
  11. blue it uses a postgresql container, it's not a really complex setup but I can't make it work
  12. phaleth docker compose is cool, yeah
  13. phaleth and did you already look at any of the postgres setup that I've documented?
  14. blue not yet
  15. phaleth I hope bytenews/nevet is not hosted on github btw
  16. blue it is, unfortunately
  17. phaleth oh
  18. blue I'm currently messing around in the endless blackhole that is systemd-networkd and systemd-resolved
  19. phaleth lately, I've been having trouble logging into github
  20. blue is there anything poettering didn't write a daemon for?
  21. blue systemd-make-me-my-coffeed
  22. dreamreal phaleth: github user account? The only request that I have is that you don't merge anything to main
  23. blue I'm stuck at "java.net.UnknownHostException: nevet-db
  24. phaleth systemd-poke-me-in-the-eyed is still prolly not a thing
  25. dreamreal PR all you want, the ops side is NOT my skill area
  26. phaleth dreamreal: and you want me to do any change to that nevet repo?
  27. dreamreal phaleth: Well, here's the thing: I'm good at certain things, yeah? I fake everything else. The ops side is one of those faked things.
  28. dreamreal I have it deployed on MY server successfully, but the UI is still MIA, because, well, ops.
  29. phaleth nah, but if you use docker compose that means you've everything perfectly documented
  30. dreamreal So if you look at it and go "oh, man, this is dumb from an ops perspective" or "this is incorrect" or "here's better" I'm happy to look at PRs, I just don't want changes applied without KNOWING about them
  31. dreamreal I have everything WORKING here
  32. dreamreal but I'd like to unblock blue
  33. dreamreal and I don't know how to describe what he's doing wrong, since it works for me
  34. phaleth I'm not gonna try to change anything about the repo itself
  35. dreamreal Well, I mean, you see what I said about it :D
  36. phaleth but let me have one question, why is it on github when it's private?
  37. dreamreal because eventually I want it to not be
  38. phaleth oh, ok, makes sense
  39. dreamreal as soon as I have a fully-working deployment, I'm copying it over to a different repo, one that isn't private, and saying "have at it"
  40. dreamreal so: pm me the github user name?
  41. blue it's the same user
  42. phaleth whatever, I guess download the repo as zip and upload it to VPS to /home/phaleth and that's all that's needed, sounds like a horror right?
  43. dreamreal phaleth: should work :D
  44. blue 100%
  45. blue the only thing that drives me nuts is the network situation, like I don't get it at all
  46. blue I thought networkd should solve that, but no
  47. blue poettering and his daemons
  48. dreamreal "phaleth?"
  49. * dreamreal is tryna confirm before guessing in any way
  50. dreamreal my finger's hovering over the button
  51. phaleth well, just let blue download it, I won't be able to log into github anyway
  52. phaleth but yeah, I'm phaleth on github
  53. phaleth as much as you think my profile looks weird
  54. blue it's this guy https://github.com/phaleth
  55. nevet phaleth - Overview
  56. blue y'know, the guy who has the primate repo pinned on his profile
  57. dreamreal phaleth: you still on discord?
  58. phaleth blue: I don't see why would you need to do anything with systemd-networkd other than restart it after you change a couple of configs for the bridge, but I've already documented that
  59. blue mhm
  60. dreamreal phaleth: I just sent it to you there
  61. phaleth dreamreal: you can pm me on discord if you want, yeah
  62. blue maybe I need to stop being lazy and not try to get it down in one script
  63. blue done*
  64. blue but this --network-zone flag is kinda cool, I gotta admit it
  65. nevet but this now has karma of -1.
  66. dreamreal heh
  67. dreamreal karma has so many freaking exceptions
  68. dreamreal that plugin is a nightmare
  69. blue indeed
  70. phaleth dreamreal: ok
  71. blue if you can just help me get it set up phaleth, I'd be so happy. I feel like a total idiot
  72. dreamreal It has the ability to ignore manual emdashes (I just don't have that on anywhere) but detecting "program arguments" is another area of problems... and sometimes people DO want to mention "C with objects"
  73. blue I just want to test my primate frontend against it, it can't be that hard
  74. blue or well, my primate app
  75. dreamreal phaleth: and if you see what makes it difficult for blue, I want to fix that, because I don't see the holes
  76. blue hopefully all this nonsense will soon go away. I started working on @rcompat/container, so I can programmatically create and start containers
  77. blue I need it for primate itself, for testing the postgresql module, but we also need it for RP
  78. blue I've been running postgresql all this directly on the host which is legit insane
  79. blue all this time*
  80. blue I want to throw it away
  81. blue I'm still on the old computer, but I'm not willing to repeat the same mistakes on the new one
  82. phaleth blue: ok, but if you at least tried to deploy it to the VPS I could take a look and see what's wrong there, also just forget about --network-zone
  83. nevet blue: ok, but if you at least tried to deploy it to the VPS I could take a look and see what's wrong there, also just forget about now has karma of -1.
  84. dreamreal blue: nevet in production is using postgres in a docker container
  85. phaleth heh
  86. blue hm
  87. blue dreamreal: you fine with me uploading a copy of the nevet repo to the RP gitea?
  88. blue that way I don't even need to run it on my computer, I can CI it on RP
  89. blue (RP gitea is private, only phaleth and I have access to it)
  90. dreamreal sure.
  91. phaleth I didn't have a chance to try the CI on our gitea, but I think it should just work
  92. phaleth would be curious if it does/doesn't
  93. blue ya
  94. dreamreal blue: I'm going to revisit the karma plugin to see if I can fix some of that
  95. dreamreal some of the issues are unavoidable, period, if karma's in play, but we should be able to apply some intelligence to cut down on the false positives
  96. phaleth dreamreal: the deployment looks very straightforward, even package-lock.json is included, so the build of the frontend should just work
  97. blue phaleth: https://gitea.repopack.app/jottinger/bytecode.news
  98. blue brb
  99. phaleth blue: cool, well, I thought making a zip copy would be a horror, which is what I have now, but two repos of the same project, hmm
  100. blue phaleth: the ideal is a git checkout inside the container...
  101. blue but I don't know if you care about setting that up, wouldn't work right now with the way gitea is set up
  102. blue can you deploy the frontend on nevet.repopack.app ?
  103. blue he's got an experimental frontend
  104. blue I think you noticed that
  105. phaleth well the repo is private on both github and gitea so just need to get PAT (token)
  106. phaleth nextjs being experimental?
  107. blue no, the nextjs one is just another one
  108. blue there's a reference one at.. let me see
  109. dreamreal phaleth: the idea is that eventually we'll have a whole suite of front ends: nextjs, primate, xhtml, jsf, thymeleaf, etc
  110. dreamreal all with different "base hostnames" so if you wanted to use a nextjs frontend you'd hit nextjs.bytecode.news, and if you wanted to COMPARE that to primate, you could SIMILARLY go to primate.bytecode.news and see the differences
  111. dreamreal the backend server is intended to be the same in all cases
  112. blue oh, he hasn't merged it yet
  113. blue it's pr'd though
  114. dreamreal and then there's a "bytecode.news" and "www.bytecode.news" domain that resolves to whatever frontend is the best of breed
  115. blue https://github.com/jottinger/bytecode.news/pull/110
  116. blue I can't get you the PR branch to gitea, if you want
  117. blue I can*
  118. dreamreal blue: nobody's even commented on it yet that I've seen!
  119. phaleth I can deploy the nextjs frontend, that's fine
  120. dreamreal I have LITTLE confidence in a UI, so any UI I put together is put together with spit, nerves, fear, trembling, etc
  121. dreamreal phaleth: note that the nextjs frontend was built on a prior version of the service-blog so it's not likely to be complete or right
  122. blue I'm not srue the nextjs frontend is up to date with the backend
  123. dreamreal I'm sure it's not
  124. dreamreal the reference in 110 is the only one that is known-good with the OTP stuff
  125. blue phaleth, I can add the primate frontend, and then you can deploy that to nevet.repopack.app
  126. blue that good? that's what I'll work with, anyway
  127. dreamreal and now that I think about it, I bet the OIDC stuff is mandatory, that's gonna be something that NEEDS to be handled
  128. dreamreal damn it
  129. dreamreal blue: I'm swamped right now, the OIDC stuff HAS to be configured, it may be okay with faked token values
  130. blue what's OIDC?
  131. blue you mean sign with google?
  132. dreamreal the github/google login crap
  133. dreamreal yeah
  134. blue oh
  135. phaleth ok, then I will deploy postgres and the java backend first
  136. dreamreal phaleth: ^^^ note the .env.default
  137. blue yeah just do that. meanwhile I'll add the primate backend though I'll be mostly blindly coding until I can run the postgres/java backends
  138. dreamreal I don't think the reference hooks in the OIDC endpoints yet but the backend won't start without them being configured
  139. dreamreal blue: note that in 110 the openapi.json is generated *as an artifact of the build* - so packaging WILL update that file, the repo shoudl always be current as a result
  140. phaleth blue: alright
  141. dreamreal I don't commit until a full backend test cycle passes, and that file is generated as an artifact of that process; it's sorted in processing so diffs don't show up unless the actual API changes
  142. phaleth dreamreal: ok, looks like docker compose takes care of setting up a lot of those env vars
  143. blue mostly I just need the postgtes/java to run reliably on nspawn
  144. dreamreal I don't think there would be a problem providing invalid API keys for services like the LLM, weather, google, github
  145. dreamreal they don't get verified on startup
  146. blue please note some of this stuff is currently built outside of the container. namely `./mvnw app`. it should move inside nspawn, ideally
  147. blue phaleth: https://dpaste.com/GWFBVPGA3
  148. phaleth oh, there's maven
  149. blue this builds everything inside buildkit
  150. blue b/c obv we don't want to need mvn on the host system
  151. dreamreal yeah, mvnw will download the proper version of maven if you like
  152. dreamreal would have used gradle but wanted the build to work
  153. blue dreamreal: the problem is the RP server has next to nothing on the host, except nspawn itself. so anything that is needed for building, needs to be inside the Containerfile
  154. dreamreal *nod* yeah, well, maven wrapper is there for a reason
  155. blue yeah, but we don't build anything directly on the host. it would be possible to run mvnw inside the container, but also the Containerfile I linked works in the same way without the wrapper
  156. blue it built locally in 90 seconds, should be faster on RP
  157. phaleth there is an ubuntu image for that java thing, so that should run without a problem on systemd-nspawn https://paste.debian.net/plainh/259f874c
  158. nevet Starvation. The same thing.
  159. phaleth huh
  160. phaleth well, actually, I should go eat something and sleep
  161. blue alright
  162. blue phaleth: nevet sums up urls.. in this case, I have no idea where it got that from, possibly an AI hallucination
  163. dreamreal That is FASCINATING. I think debian.net needs to be added to the ignored urls for the urltitle thing - some sites respond differently based on source and client identifiers.
  164. phaleth it saw podman, it proceeded to talk to a peasant
  165. dreamreal url ignore add paste.debian.net
  166. nevet Added paste.debian.net to ignored hosts.
  167. dreamreal url ignore list
  168. nevet Ignored hosts include: pastebin.com, x.com, pastebin.org, paste.debian.net, dpaste.com, bpa.st, and twitter.com
  169. dreamreal Let's try it: https://paste.debian.net/plainh/259f874c
  170. dreamreal beauty.
  171. blue dreamreal: one of the declared goals of RP is to redeploy fast enough that developres can save themselves the hassle of a local setup; you'll notice it as soon as you want to test google oauth: it is an absolute PITA to do it locally. You need weird shenaningans like ngrok
  172. blue having ubiquitously reachable DEV systems is a bliss
  173. blue whether it's doable in acceptable times, is another questions. 90s is obviously too much
  174. blue question*
  175. dreamreal Well, I have a system that takes 17m to build...
  176. phaleth at work I take care of java system that takes ~12min to build, but only when all that is not necessary is excluded from the build, dunno how long a full build would take, prolly well over half of an hour
  177. dreamreal ours does a graalvm native compile, so it's pretty serious :D
  178. phaleth that one uses ant script leading to a ton of other ant scripts and also a whole bunch of groovy script, it's totally meh
  179. phaleth groovy scripts*
  180. dreamreal ant + groovy, eh. Yeah, that sounds like a horror.
  181. dreamreal why not ant+jelly? :D
  182. blue welp, Containerfile / Dockerfile are generally layered, so redeployments should ideally be lightning fast. next step: hooking up primate's hot-reloading to a subdomain (doable? probably)
  183. phaleth noone can be arsed changing anything about it even tho we get huge surprises on prod system lately after each deployment
  184. dreamreal phaleth: yeah. I get it - migrating an ant build can be 100% unfun
  185. blue maybe `npx primate --proxy-via=localhost:some-port, though you'd still need a tool like ngrok :(
  186. nevet maybe `npx primate now has karma of -1.
  187. blue web app is such a total and absolute pain inthe butt
  188. blue web dev*
  189. blue or maybe primate could bridge directly, hm
  190. blue that would be sick
  191. phaleth I'd understand ant, I'm that kinda person, but the groovy stuff is not to be touched
  192. blue phaleth, do you think we can build into primate the ability to reverse proxy incoming stuff? as in, someone hits my-primate-app.repopack.app, and that gets redirected to my local dev app?
  193. blue because that would be beautiful
  194. dreamreal blue: BTW, I'm workshopping karma improvements
  195. blue redirected is the wrong verb, tunnelled*
  196. blue dreamreal: that's AWESOME!
  197. phaleth blue: sounds like a security problem, but if you have IPv6 it's prolly doable, just maybe too complicated
  198. blue well yes it could be a security problem, but it's also te entire business model of ngrok
  199. blue ngrok does exactly that. but if you want a stable subdomain, it costs money
  200. blue if you don't, you get random-1234.ngrok.app, and changing that EVERY time you test in google's oauth client, is a total pain
  201. blue I used to have to d owith socialcloud, that wan't nice
  202. blue to do it*
  203. phaleth ok, maybe we can think of that later
  204. blue dreamreal: with a bit of luck, he'll get it done this week and I'll be able to get moving
  205. dreamreal that would be awesome
  206. dreamreal I figure he'll have a lot of nasty comments like "what maroon wrote this bit" etc and that'll be 100% deserved and hopefully give me a way to fix it :D
  207. blue it's likely: he's not the guy to hold back when he sees something he doesn't like
  208. blue which is exactly why I like working with him
  209. blue also, I know jack about devops
  210. dreamreal Right there with you
  211. blue fyi, this gitea situation is temporary until RP can bootstrap itself, and host git repos. we just don't want to put company secrets on github
  212. blue but gitea in itself won't be enough, it needs a bespoke implementation
  213. blue dreamreal: does mvn do incremental builds, or how does that work? what happens if you change one line in one module, do you need to recompile everything?
  214. dreamreal It will do incremental builds, sure.
  215. dreamreal it'll build a DAG as required
  216. dreamreal you can turn that off, but the default behavior is to compile only things that have changed
  217. blue I'm interested in that mostly for the sake of RP; I want to reach redeployment times of <10s
  218. dreamreal it's the tests that are the problem
  219. blue wouldn't it test just the component that changed?
  220. blue also, my idea is mostly for dev: the 'did I break stuff' comes to me before the commit. in between, you could have many redeployments
  221. dreamreal no, it runs TESTS
  222. dreamreal "you want me to run tests? I'mma run your suite" and you can control what suite/tests run, but it's expecting to be thorough
  223. dreamreal for nevet, the actual *full build* takes about 25 seconds; the actual build with tests takes around 2m
  224. dreamreal and both of thore are from clean builds; a "rebuild" is MUCH faster but the test suite still takes a while
  225. blue I get it, but the point of quick rebuilds is to get direct feedback, during development. Think about it less as of a deployment, but as if you were changing something in your code, running it locally. You don't want to waste 2m, or even 25 seconds, every time.
  226. dreamreal I know EXACTLY what you're talking about.
  227. dreamreal I'm pretty long in the tooth.
  228. dreamreal I'm just telling you the way it is.
  229. blue Now imagine you get that feedback on nevet.repopack.app; why? Because you want to change something about oauth or anything else that requires external interaction with your app -- which is historically a catastrophe if you run it locally, due to security, firewalling, inaccessibility.
  230. dreamreal Again, totally aware.
  231. blue This is a real painpoint I've been struggling with for years, and I'm not the only one, otherwise things like ngrok wouldn't exist
  232. blue It's one of THE reasons I'm working on RP
  233. dreamreal *nod*

Search posts