-
Notifications
You must be signed in to change notification settings - Fork 3
chore: add multi-container sessions #6
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c5b3863
chore: add native Rstudio sessions rfc
olevski 1bfff2f
chore: modify crd
olevski f0be2ac
chore: add multi container session rfc
olevski 7ff1bcb
Merge branch 'main' into multi-container-sessions
olevski 118be35
chore: move rfc to new location
olevski ea694ce
chore: rename file
olevski 297d502
chore: address comments
olevski 412a393
Merge branch 'main' into multi-container-sessions
olevski e8706e4
squashme: edits
olevski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
163 changes: 163 additions & 0 deletions
163
design/005-multi-container-sessions/005-multi-container-sessions.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,163 @@ | ||
| - Start Date: 22-03-2022 | ||
| - Status: Proposed | ||
|
|
||
| # Native Rstudio Sessions | ||
|
|
||
| ## Summary | ||
|
|
||
| Enable Amalthea to support defining more than one container that is exposed and accessible not | ||
| just the regular /lab endpoint. In the case of Rstudio currently we support both /lab and /studio | ||
| but the proxying for this is done at the Jupyterlab level. The idea here is that such proxying | ||
| should be done by Amalthea. | ||
|
|
||
| ## Motivation | ||
|
|
||
| - Users can run additional programs like dashboards beside their regular session | ||
| - We can run alternative UIs like vscode or rstudio alongside jupyterlab without relying on the proxying | ||
| from rstudio | ||
| - We further generalize Amalthea to accept any type of service/container | ||
|
|
||
| ## Design Detail | ||
|
|
||
| ### Current manifest | ||
|
|
||
| ```yaml | ||
| spec: | ||
| culling: | ||
| idleSecondsThreshold: 0 | ||
| maxAgeSecondsThreshold: 0 | ||
| auth: | ||
| oidc: | ||
| authorizedEmails: | ||
| - <user-email> | ||
| authorizedGroups: [] | ||
| clientId: OidcClientName | ||
| clientSecret: | ||
| value: OidcSecretValue | ||
| enabled: true | ||
| issuerUrl: https://dev.renku.ch/auth/realms/Renku | ||
| token: "" | ||
| jupyterServer: | ||
| defaultUrl: | ||
| image: | ||
| resources: | ||
| rootDir: /home/jovyanl/work/<project_name> | ||
| routing: | ||
| host: dev.renku.ch | ||
| ingressAnnotations: | ||
| kubernetes.io/ingress.class: nginx | ||
| nginx.ingress.kubernetes.io/proxy-body-size: "0" | ||
| nginx.ingress.kubernetes.io/proxy-buffer-size: 8k | ||
| nginx.ingress.kubernetes.io/proxy-request-buffering: "off" | ||
| path: /sessions/<session_name> | ||
| tls: | ||
| enabled: true | ||
| secretName: dev-renku-ch-tls | ||
| storage: | ||
| pvc: | ||
| enabled: | ||
| mountPath: /home/jovyanl/work | ||
olevski marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| storageClassName: | ||
| size: | ||
| ``` | ||
|
|
||
| ### Proposed revised manifest | ||
|
|
||
| ```yaml | ||
| spec: | ||
| template: | ||
| configMap: | ||
| name: jupyter-configmap | ||
| culling: | ||
| idleSecondsThreshold: 0 | ||
| maxAgeSecondsThreshold: 0 | ||
| idleProbe: # NEW similar syntax expected to http get k8s probe | ||
| auth: | ||
| oidc: | ||
| token: | ||
| servers: # NEW | ||
| - containerName: jupyter-server | ||
| image: | ||
| resources: | ||
| requests: | ||
| memory: 1G | ||
| cpu: 1 | ||
| ingress: | ||
| - port: 8889 | ||
| url: /lab | ||
| livenessProbe: {} | ||
| readinessProbe: {} | ||
| startupProbe: {} | ||
| - containerName: dashboard | ||
| image: | ||
| resources: | ||
| requests: | ||
| memory: 1G | ||
| cpu: 1 | ||
| ingress: | ||
| - port: 8890 | ||
| url: /dashboard | ||
| livenessProbe: {} | ||
| readinessProbe: {} | ||
| startupProbe: {} | ||
| routing: | ||
| host: dev.renku.ch | ||
| ingressAnnotations: | ||
| kubernetes.io/ingress.class: nginx | ||
| nginx.ingress.kubernetes.io/proxy-body-size: "0" | ||
| nginx.ingress.kubernetes.io/proxy-buffer-size: 8k | ||
| nginx.ingress.kubernetes.io/proxy-request-buffering: "off" | ||
rokroskar marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| path: /sessions/<session_name> | ||
| tls: | ||
| enabled: true | ||
| secretName: dev-renku-ch-tls | ||
| storage: | ||
| pvc: | ||
| enabled: | ||
| mountPath: /home/jovyanl/work | ||
rokroskar marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| storageClassName: | ||
| size: | ||
| ``` | ||
|
|
||
| ### Ingress | ||
|
|
||
| ```mermaid | ||
| graph LR | ||
| Internet[Internet] | ||
| Internet --> Ingress[Ingress] | ||
| subgraph K8s | ||
| Ingress --> Auth[Auth proxy<br />:4180<br />/sesssion/name] | ||
| subgraph Pod | ||
| Auth --> Traefik[Traefik<br />:8888] | ||
| Traefik --> S1[Jupyterlab<br />:8889<br />/lab] | ||
| Traefik --> S2[Dashboard<br />:8890<br />/dashboard] | ||
| end | ||
| end | ||
| ``` | ||
|
|
||
| ### Anonymous sessions | ||
| Remove auth proxy, get Traefik to do simple token-based auth. Alternatively also just allow anyone with the | ||
| link to the anonymous sessions to access it. The link can be generated with some random characters so that it | ||
| is hard to guess. | ||
|
|
||
| ## Drawbacks | ||
|
|
||
| We need to add a traefik proxy in order to do this. | ||
|
|
||
| We are adding a bit more complexity to the code. | ||
|
|
||
| ## Rationale and Alternatives | ||
|
|
||
| > Why is this design the best in the space of possible designs? | ||
|
|
||
| > What other designs have been considered and what is the rationale for not choosing them? | ||
|
|
||
| > What is the impact of not doing this? | ||
|
|
||
| ## Unresolved questions | ||
|
|
||
| > What parts of the design do you expect to resolve through the RFC process before this gets merged? | ||
|
|
||
| > What parts of the design do you expect to resolve through the implementation of this feature before stabilisation? | ||
|
|
||
| > What related issues do you consider out of scope for this RFC that could be addressed in the future independently of the solution that comes out of this RFC? | ||
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.
Uh oh!
There was an error while loading. Please reload this page.