Replies: 4 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Hey @verhulstm, If you're planning to run a workshop or have multiple people temporarily use Nebari, I'd suggest using the Nebari Self Registration plugin, which allows users to register using coupon codes. These codes can be configured to give users access to specific keycloak groups, allowing fine-grained permission control. That said, if this does not fit your use case, you can use the The error you are seeing is because your user does not have the required scopes. For example: $ curl -H "Authorization: token $TOKEN" https://domain/hub/api/info
{"status": 403, "message": "Action is not authorized with current scopes; requires any of [read:hub]"} You can add these scopes manually in Keycloak, or you can add your user to any of the existing Keycloak groups with higher privileges. |
Beta Was this translation helpful? Give feedback.
-
Hey @verhulstm
yes, you can use Jupyterhub's API as you tried above with the correct permissions set on keycloak as @marcelovilla suggested, or you can use jupyterhub-ssh service. Using the user pre-adquired token, you can send an SSH command using Paramiko, for example, to trigger the user instance creation (keep in mind the SSH will linger until the cloud instances are scaled up; this may timeout). Here is a general overview on how that works https://www.nebari.dev/docs/how-tos/connect-via-ssh#connect-to-nebari-via-ssh
By default, nebari terminates any user instance idle for 30min; this is part of the iddle-culling service |
Beta Was this translation helpful? Give feedback.
-
Can i programmatically call a api to create 25 users and spin up 25 notebook instances? one for each user?
and then programmatically bring them down as well?
Beta Was this translation helpful? Give feedback.
All reactions