-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom URL #1307
Custom URL #1307
Conversation
@appolloford have you considered to use the controller deployment? https://carta-controller.readthedocs.io/en/dev/ Are you trying to deploy CARTA to serve multiple users? |
@kswang1029 No, we cannot install the controller. The idea of HPC server is sharing servers among jobs and it is controlled by job scheduler. We cannot guarantee a server continuously on only for CARTA. Also, users consume their quota (e.g. 1000 CPU hours per month) to launch their jobs. If we keep a controller there to control the sessions, it is hard to know how much resources they have consumed. |
@appolloford I built your branch on AlmaLinux8 (GCC 8.5.0), but it is unable to run:
Which OS are you developing it on? |
@appolloford please file a feature request at https://github.com/CARTAvis/carta/issues then we can continue from there. This PR will be on hold due to our code freeze for release 4.0. |
@ajm-asiaa It should be a problem from variable initialization. I made a new commit. Could you try it again? |
Free form 🙂 try to be as comprehensive as possible. Thanks. |
Just a couple of things:
However, I still think this PR is a good idea, and I realise that there will be situations (like yours) where the controller is not an option (although please make sure your users use tunnelling etc instead of VNC/x-forwarding when using CARTA!). I'd rather make this a bit more generic. At the moment, we do something like
The backend could just use the default template URL (as above) if none is provided, and fill in in your case, it would be as simple as just using |
@veggiesaurus Thank you for the comments. I did not know that the controller works as a reverse proxy. Our plan was to integrate CARTA into Open OnDemand so I did not study controller carefully. |
I think this is purely just a generalisation of your idea, so rather than just a prefix, we can adjust the URL in almost any way |
Hi, I'm the colleague who pushed @appolloford to open this PR
I think trying to specify the full URL here has problems. Mainly that you don't really get to choose all those parts freely at all.
as one can't get to decide the layout for the latter part of the path, and definitely not the query parameter (token) part. And you also don't get to choose the port part either, and this part doesn't impact any of the websocket code since it's only the
So you really only get to pick the prefix for the path segment, and in order to resolve the path to all the static content, need to know precisely the url prefix part If the server could be configured to link all assets relatively, an approach using url rewrites in the proxy would also be doable, but I suspect that would just be more work (as far as i could tell from some tests, it doesn't do so right now) |
@Micket those are strong arguments 👍 I'm convinced 😇 Also, I think it's great that you're integrating this into Open On Demand 🚀 |
I think that we're agreed that this is a good feature to add. I would like some changes to be made to the implementation (some of them should wait for some other PRs to be merged in), and there's a merge conflict that needs to be resolved. I am going to make a copy of @appolloford's branch in the main repo and take over development -- I will close this PR, but will make a new draft PR from the new branch. |
The new PR is #1338. |
Description
What is implemented or fixed? Mention the linked issue(s), if any.
This function is implemented for deploying CARTA onto HPC servers controlled by job scheduler (e.g. slurm). If a user launches CARTA on a computing node, we need the URL prefix information to do the reverse proxy. The approach is used in Open OnDemand to set interactive apps
How does this PR solve the issue? Give a brief summary.
This PR allows users to customize the URL by an environment variable
CARTA_URL_PREFIX
. If launchingCARTA_URL_PREFIX=foo ./carta_backend
locally, the URL will be changed tohttp://localhost:port/foo/?token=....
.Are there any companion PRs (frontend, protobuf)?
No
Is there anything else that testers should know (e.g. exactly how to reproduce the issue)?
We have tested the frontend on our HPC server, but we are not sure the influence to the the scripting/database/config
Checklist
changelog updated/ no changelog update neededprotobuf updated to the latest dev commit/ no protobuf update needed