Skip to content

Commit

Permalink
Merge c48f21f into 1a380c4
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego committed Jan 13, 2020
2 parents 1a380c4 + c48f21f commit 2986168
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
4 changes: 3 additions & 1 deletion reana_workflow_controller/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@
DEBUG_ENV_VARS = ({'name': 'WDB_SOCKET_SERVER',
'value': 'wdb'},
{'name': 'WDB_NO_BROWSER_AUTO_OPEN',
'value': 'True'})
'value': 'True'},
{'name': 'FLASK_ENV',
'value': 'development'})
"""Common to all workflow engines environment variables for debug mode."""

TTL_SECONDS_AFTER_FINISHED = 60
Expand Down
23 changes: 23 additions & 0 deletions reana_workflow_controller/workflow_run_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,29 @@ def _create_job_spec(self, name, command=None, image=None,
job_controller_env_vars.extend(
current_app.config['DEBUG_ENV_VARS'])

# Add code mount to runtime pods to enable debugging.
code_volume_name = 'reana-code'
code_mount_path = '/code'
spec.template.spec.volumes.append({
'name': code_volume_name,
'hostPath': {
# We use here `/code` because as we are in development mode
# REANA code is mounted there. Later with subPath's we
# choose which components code to actually mount.
'path': '/code'
}
})
job_controller_container.volume_mounts.append({
'name': code_volume_name,
'mountPath': code_mount_path,
'subPath': 'reana-job-controller'
})
workflow_enginge_container.volume_mounts({
'name': code_volume_name,
'mountPath': code_mount_path,
'subPath': f'reana-workflow-engine-{self.workflow.type_}'
})

job_controller_env_vars.extend([
{
'name': 'REANA_USER_ID',
Expand Down

0 comments on commit 2986168

Please sign in to comment.