cloud-pipeline
cloud-pipeline copied to clipboard
[Quick Launcher] Include Quick Launcher as a service in deployment process
Background
To successfully implement #2600 we need to add quick-launcher to build process.
Solution to integrate this functionality to default deployment (f.e. with -s quick-launcher automatically done the next) :
Approach
Approach for including quick-launcher to deploy process could be decomposed to the next parts:
Build process
- Include quick-launcher to build process and final artifact
Deploy process
User creation
- Default users storages should be automatically created when user is created
- Process of creation of default user storage should be changed to support creation folder structure
- Introduce new
system preferencestorage.user.home.hierarchy.template- json described hierarchy of storage folders to be created - When storage is created (while we create an user) we need to create folders according to this preference
- Introduce new
- Process of creation of default user storage should be changed to support creation folder structure
NOTE: As temporary solution sys cp cron job could be used to create home storages for users
Quick Launcher configuration
-
Required system user and its infrastructure is created automatically (e.g. SHINY_PORTAL, SHINY_PORTAL_ADMIN_USER, SHINY_PORTAL_ANONYMOUS_USER users)
-
Edge configured to serve additional external-app (e.g. quick-launcher)
- quick launcher dist copied from pipeline distribution
- additional nginx configuration created to serve
appandtoollauncher- depending on CP_APPLICATION_LAUNCHER_EXTERNAL_HOST and CP_TOOL_LAUNCHER_EXTERNAL_HOST additional nginx configuration template should be filled up and placed to /opt/edge/external-apps/
-
Quick-launcher is configure with required parameters (could have default values or be overwritten)
- if
CP_APPLICATION_LAUNCHER_EXTERNAL_HOSTis provided we need to configure quick-launcher to serveapplication launcher, for this purpose admin could provide external config template (provided withCP_APPLICATION_LAUNCHER_CONFIG_PATH) or default one could be used (from distribution) - if
CP_TOOL_LAUNCHER_EXTERNAL_HOSTis provided we need to configure quick-launcher to serveapplication launcher, for this purpose admin could provide external config template (provided withCP_TOOL_LAUNCHER_CONFIG_PATH) or default one could be used (from distribution)
- if
Additional steps
- Optimized images should be build and tagged (mechanism to use default images should be in place as well)
- Dockerfiles should be provided for such images in
deploy/docker/cp-tools/optimized - For such dockers metadata should be added to tool spec, when tool is registering we need to parse this metadata and tag a tool with it:
- Dockerfiles should be provided for such images in
{
"short_description": "Jupyter Lab with CPU-only support: environment for interactive and reproducible computing",
"instance_type": "${CP_PREF_CLUSTER_INSTANCE_TYPE}",
"disk_size": "50",
"default_command": "/start.sh --lab",
"endpoints": [ ... ],
"metadata": {
"app_type": "${CP_TOOL_LAUNCHER_EXTERNAL_HOST}"
}
}