Repository navigation
List local Nebi workspaces in jhub-apps when no Nebi server is deployed - #260
Merged
Merged
Conversation
Add nebi.remote.enabled (default true). When false, the Nebi remote and internal URLs resolve to empty, so the token exchange and the Nebi card are off, and the jhub-apps environment selector lists the installed workspaces from the Nebi instance in the user's running JupyterLab. JHUB_APP_ENV_MANAGER=pixi is now set on every pod instead of only in the token-exchange hook, so jhub-app-proxy can activate a local workspace.
Contributor
|
Docs preview for |
Contributor
|
The preview for this PR has expired.
Re-add the |
With no Nebi server, an app ran straight from the user's workspace: the app pod opened the Nebi database in the home and used the environment JupyterLab had installed. Both only work while all of a user's pods sit on one node and share its volumes. The app pod now copies the workspace's pixi.toml and pixi.lock into its own emptyDir, registers the copy in a database of its own and runs pixi install there, through the same init container the Nebi server path uses. The environment selector offers each workspace as its directory, so starting an app needs only those two files: neither JupyterLab nor the Nebi database. The selection reaches the init container through its environment rather than its command line, for the Nebi server path as well, and paths outside the user's storage are ignored.
Without a Nebi server the app form lists workspaces by asking the user's running JupyterLab, so it was empty whenever JupyterLab was stopped. The hub now saves each user's list under /srv/jupyterhub/nebi-envs/, both when the form asks JupyterLab and when JupyterLab stops (the spawner asks the pod directly before deleting it), and offers the saved list while JupyterLab is stopped or when asking it fails.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without nebi-pack, the jhub-apps environment selector was always empty, so apps could not run in a user's environment.
Adds
nebi.remote.enabled(defaulttrue). Withfalse, the token exchange and the Nebi card are off and each user's selector lists their own local Nebi workspaces:The list comes from the user's main JupyterLab. The hub saves it under
/srv/jupyterhub/nebi-envs/when the app form asks and when JupyterLab stops, and offers the saved list while JupyterLab is stopped.An app pod copies the workspace's
pixi.tomlandpixi.lockinto its ownemptyDirand runspixi installthere. It uses neither JupyterLab's installed environment nor its Nebi database.JHUB_APP_ENV_MANAGER=pixiis set on every pod.Docs: a user guide, "Apps from your local Nebi environments", under Guides.