Skip to content
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

adjust public WPS outputs sub-dir for weaver #401

Merged
merged 4 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
[Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest)
------------------------------------------------------------------------------------------------------------------

[//]: # (list changes here, using '-' for each new entry, remove this when items are added)
- Fix `weaver` and `cowbird` inconsistencies for `public` WPS outputs directory handling.

Because `cowbird` needs to mount multiple directories within the user-workspace for `jupyterhub`, it needs to define
a dedicated `public/wps_outputs` sub-directory to distinguish it from other `public` files not part of WPS outputs.
However, for WPS birds, other files than WPS outputs are irrelevant, and are therefore mounted directly in their
container. The variable `PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR` was being misused in the context of `weaver`,
causing WPS output URLs for `public` context to be nested as `/wpsoutputs/weaver/public/wps_outputs/{jobID}`
instead of the intended location `/wpsoutputs/weaver/public/{jobID}`, in contrast to user-context WPS outputs
located under `/wpsoutputs/weaver/users/{userID}/{jobID}`.

Relates to [Ouranosinc/pavics-sdi#314](https://github.com/Ouranosinc/pavics-sdi/pull/314).

[1.37.1](https://github.com/bird-house/birdhouse-deploy/tree/1.37.1) (2023-11-03)
------------------------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ handlers:
wps_outputs_dir: ${WPS_OUTPUTS_DIR}
secure_data_proxy_name: ${SECURE_DATA_PROXY_NAME}
# wps_outputs_res_name: ${WPS_OUTPUTS_RES_NAME}
public_workspace_wps_outputs_subdir: ${PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR}
public_workspace_wps_outputs_subdir: ${COWBIRD_PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR}
# notebooks_dir_name: ${NOTEBOOKS_DIR_NAME}
# user_wps_outputs_dir_name: ${USER_WPS_OUTPUTS_DIR_NAME}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ services:
jupyterhub:
environment:
WORKSPACE_DIR: ${DATA_PERSIST_SHARED_ROOT}/${USER_WORKSPACES}
PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR: ${PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR}
PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR: ${COWBIRD_PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR}
volumes:
- "${DATA_PERSIST_SHARED_ROOT}/${USER_WORKSPACES}:${DATA_PERSIST_SHARED_ROOT}/${USER_WORKSPACES}"
11 changes: 10 additions & 1 deletion birdhouse/components/cowbird/default.env
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@ export USER_WORKSPACES="user_workspaces"
# Subdirectory containing the hardlinks to the public WPS outputs data
# This directory will be mounted on the JupyterLab instances and is located by default
# in the ${USER_WORKSPACES} directory.
export PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR="public/wps_outputs"
# NOTE:
# Most WPS birds do not have a concept of Public vs User-specific outputs.
# These birds will employ the same WPS output directory for all jobs, regardless of the user running it.
# By default, WPS output files will be stored under '${WPS_OUTPUTS_DIR}/<bird>', and must all be considered 'public'.
# Some WPS-capable birds such as Weaver do have a concept of Public/User-context for WPS outputs.
# In this case, files under '${WPS_OUTPUTS_DIR}/<bird>' should have an additional nesting
# with 'public' and 'users/{user_id}'. Variable 'PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR' will be shared for such cases.
export PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR=public
export COWBIRD_PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR='${PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR}/wps_outputs'

# Default name for the secure-data-proxy service from Magpie.
export SECURE_DATA_PROXY_NAME="secure-data-proxy"
Expand All @@ -62,6 +70,7 @@ COWBIRD_MONGODB_DATA_DIR='${DATA_PERSIST_ROOT}/mongodb_cowbird_persist'
DELAYED_EVAL="
$DELAYED_EVAL
COWBIRD_MONGODB_DATA_DIR
COWBIRD_PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR
fmigneault marked this conversation as resolved.
Show resolved Hide resolved
"

# this dependency is only required if the mongo instance is the one provided in config/mongodb.
Expand Down
2 changes: 1 addition & 1 deletion birdhouse/components/cowbird/docker-compose-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
# root user
COWBIRD_FILESYSTEM_ADMIN_UID: 0
COWBIRD_FILESYSTEM_ADMIN_GID: 0
PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR: ${PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR}
PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR: ${COWBIRD_PUBLIC_WORKSPACE_WPS_OUTPUTS_SUBDIR}
SECURE_DATA_PROXY_NAME: ${SECURE_DATA_PROXY_NAME}
# Note that WPS_OUTPUTS_DIR and WORKSPACE_DIR must both point to paths from the same volume.
# This is to allow the creation of hardlinks between the wpsoutputs and the user workspace.
Expand Down
Loading