[18:10:23] Is there an API to create or destroy a web proxy on Cloud VPS? I can't find any mention of them documentation in the openstack CLI. Is it a specific Cloud VCP construct? [18:12:17] kindrobot: yeah, it's a cloud vps specific thing [18:13:08] there's an api, but it's not documented anywhere at the moment [18:13:53] Could you show me how to use it? I'd be happy to add some documentation to Wikitech in exchange. :) [18:14:38] if you're working with go, you can use the very unstable https://gitlab.wikimedia.org/repos/cloud/cloud-vps/go-cloudvps/pkg/webproxy, and for python you can take inspiration from https://gerrit.wikimedia.org/r/plugins/gitiles/openstack/horizon/wmf-proxy-dashboard/+/refs/heads/main/wikimediaproxydashboard/views.py [18:15:09] Great! Thank you. :) [18:15:31] yeah, happy to help and I think I'm currently the expert of it. the main thing is that authentication is done using openstack keystone tokens, which aren't invented here but aren't really well documented either. we thankfully have quite a bit of code using it so we should be able to find examples for you [18:15:39] ooc, what are you planning to use it for? [18:16:28] (and by 'very unstable' I mean that the interface offered by the package is subject to change, not that it doesn't really work) [18:16:38] Ephemeral e2e test environments on k8s [18:16:53] hm, interesting [18:18:15] We have a k8s (k3s) server running on Cloud VPS. When a patch it made, I'd like it to deploy the environment, and deep it accessible at aw-PATCHNUMBER.wmcloud.org until the patch is accepted (so that the reviewer can also check it out manually.) [18:18:36] s/deep/keep [18:20:54] I'm debating between using sub-domains (and thus web proxies) for the ingress or paths (e.g. aw-e2e.wmcloud.org/PATCHNUMBER/), but it seems like Mediawiki doesn't really like being hosted in a subfolder, and would require a fair about of custom configuration to make it work [18:21:17] um, mediawiki itself has no issues being hosted in a subfolder [18:23:54] Maybe I need to pull on that thread some more [18:25:03] I guess I should say, the mediawiki docker containers don't really like being hosted in subfolders [18:28:23] hm, very interesting. i guess that makes sense since the web server config can't be changed very easily without heavily modifying the containers [18:29:07] I could get the ingress router to strip the /PATCHNUMBER, but then I'll need to make sure the rewrite rules and $wgServer as set up correctly. [18:30:18] if you strip /patchnumber in the ingress I don't think the rewrite rules need any adjusting since it's on the root from the container's POV, and $wgServer should be easy to adjust during the installation process [18:30:51] I was just thinking that. I'll give that a try. Thanks for talking it through with me. [20:27:13] taavi: I stripped the prefix "/test" at the ingress, set `$wgScriptPath = "/test/w";` and `$wgServer = "http://wikifunctions.home/test";` and everything is working except all the generated links are missing the "/test" prefix (e.g. the Special pages link goes to "http://wikifunctions.home/wiki/Special:SpecialPages" and thus 404s. Any thoughts? [20:29:56] How does wiki database dumping work when the wikis are actively being written to? Does the dumping process just know what point in time to stop at? [20:31:54] kindrobot: check $wgArticlePath is set up correctly [20:34:41] taavi: when I set `$wgArticlePath = "/test/wiki/$1";`, then when I visit "http://wikifunctions.home/test", it redirects me to "http://wikifunctions.home/test/test/wiki/Main_Page". [20:35:49] hm, that's weird [20:36:04] what if you give it an absolute url instead of a relative one? [20:36:33] For which one? [20:36:59] $wgArticlePath [20:39:26] i have a suspicion that the ingress level path remapping might also rewrite redirects, but can't be sure since i'm not sure how which ingress you're using [20:40:14] Heh, then I get an infinite redirect. [20:40:44] Where it is indeed redirecting to the right spot: "http://wikifunctions.home/test/wiki/Main_Page" [20:41:32] But it must "think" it's not in the right spot because the prefix has been stripped out and so it's trying to redirect. [21:25:53] taavi: if I were to try to use the API to make web proxies, how can I get a token without TOTP in the automated use-case? [21:28:18] Ah, I'll make an application credential? [22:24:03] kindrobot: are you aware of patchdemo? https://patchdemo.wmflabs.org/ [22:25:33] there may be some prior art there worth taking inspiration from if not outright forking/building atop.