DSD-DBS / capella-collab-manager

A web app for collaboration on Capella (MBSE) projects
https://dsd-dbs.github.io/capella-collab-manager/
Apache License 2.0
23 stars 4 forks source link

Initialize training setup, spawn related sessions #1004

Open MoritzWeber0 opened 1 year ago

MoritzWeber0 commented 1 year ago

It has to be possible to start a training:

  1. Spawn the sessions for all defined required tools
  2. Initialize the sessions with the linked Git repository (clone the Git repository)
  3. Open the session in the "training mode" viewer with pre-defined layout
MoritzWeber0 commented 1 year ago

Training mode

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.

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.

vik378 commented 1 year ago

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

MoritzWeber0 commented 1 year ago

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.