capella-collab-manager
capella-collab-manager copied to clipboard
Initialize training setup, spawn related sessions
It has to be possible to start a training:
- Spawn the sessions for all defined required tools
- Initialize the sessions with the linked Git repository (clone the Git repository)
- Open the session in the "training mode" viewer with pre-defined layout
Training mode
- ✅ A training is a project in the Collaboration Manager.
- ✅ We can make use of the existing access rights management.
- ✅ A training might be an internal project, so that it's visible to everyone.
- ✅ It has a name and a description out of the box.
- ✅ There is a flag "training" on the projects table in the database
- A training project has models: Usually a Jupyter and a Capella model.
- In the model overview, the "Request persistent session" button should be hidden.
- Disable pipelines (optional as only project leads can see it)
- Disable TeamForCapella repositories (optional as only admins can see it)
Given this, #1003 is no longer required.
To start training, make use of a new feature: Pre-provisioned workspaces.
Pre-provisioned workspaces
Pre-provisioned workspaces will replace read-only sessions. Instead of the selection of Tool + Version in the project overview, there will be just one button: "Request pre-provisioned workspace". It will show a list of all models, not just the ones matching a specific tool or version. The user can select one or more models. In the training mode, there is no model selection, all models are selected and can't be deselected - we don't need a dialog. If two models with different tools or versions are selected, multiple sessions will be started.
There should be a check-box if the pre-provisioned workspace should be persistent or not. If not, the handling is similar to the current read-only sessions, but with the option to start multiple tools. After session termination, all changes are lost. If the check-box is selected, the linked Git repositories of the models are loaded in the user's persistent volume. In training mode, non persistent workspaces are not allowed. There will be no check-box for training projects.
A pre-provisioned workspace is created for each tool/version with the following structure:
/workspace/projects/<project-slug>/<tool>/<version>
The tool of the session should create the workspace and all parent directories if not existing.
After requesting the pre-provisioned workspace, the session viewer should automatically open and list the available sessions. There has to be a "loading" animation on each session (+ it should indicate the current status) until the session is started.
- What would happen if you open a persistent pre-provisioned workspace the second time with a subset of models that were loaded the first time? ==> If a model does already exist in the workspace, but is not requested, ignore it (don't delete or modify it in the workspace). ==> More advanced handling can be introduced with the Git workflow automation: https://github.com/DSD-DBS/capella-collab-manager/milestone/9
- What happens with the state of the models if you open a persistent pre-provisioned workspace for the second time? ==> If a model already exists in the workspace, skip intialization. It it doesn't exist, initialize it.
- If a project contains models with a wide variaty of tools, we potentially spin up a lot of sessions, which may hit our resource limits pretty quickly (ergo, session won't start) ==> We already support unlimited (limited to the number of (projects + tool + version) combination) read-only sessions. The risk is already there. ==> However, we should monitor how intensively the feature is used and whether restrictions may be necessary. Related to https://github.com/DSD-DBS/capella-collab-manager/issues/669
NB. With the option our current persistent and read-only sessions get more similarities. One distinction is still, though, that you can only work with T4C models in persistent sessions.
Reset pre-provisioned workspace
It should be possible to reset a pre-provisioned workspace (reset the training workspace) if it is messed up. Can be part of https://github.com/DSD-DBS/capella-collab-manager/issues/191.
one quick comment re no persistence required for training - you may want to save your progress and come back to it next day so it would be nice if we could figure something for it
one quick comment re no persistence required for training - you may want to save your progress and come back to it next day so it would be nice if we could figure something for it
This should be covered by this paragraph:
There should be a check-box if the pre-provisioned workspace should be persistent or not. [...] If the check-box is selected, the linked Git repositories of the models are loaded in the user's persistent volume. In training mode, non persistent workspaces are not allowed. There will be no check-box for training projects.
To clarify it: When spawning a pre-provisioned workspace for a training project, there will be no option to request a read-only workspace. Instead, the workspace is always persistent to prevent data loss. If there is already a matching workspace, it will be reused when you start the same training again.