Skip to content

Commit

Permalink
Merge e4646d4 into ea98de0
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego committed Jan 24, 2019
2 parents ea98de0 + e4646d4 commit cdaa955
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
16 changes: 13 additions & 3 deletions reana_workflow_controller/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
"""If CEPH storage backend is used, this represents the name of the
Kubernetes persistent volume claim."""

MOUNT_CVMFS = os.getenv('REANA_MOUNT_CVMFS', False)
MOUNT_CVMFS = True if os.getenv('REANA_MOUNT_CVMFS', '').lower() == \
'true' else False
"""Option to mount CVMFS volumes in workflow engines and jobs."""

SHARED_FS_MAPPING = {
Expand All @@ -67,9 +68,18 @@
}
"""Mapping from the shared file system backend to the job file system."""

WORKFLOW_ENGINE_VERSION = 'cvmfs-16'
CWL_WORKFLOW_ENGINE_VERSION = os.getenv('CWL_WORKFLOW_ENGINE_VERSION',
'latest')
"""CWL workflow engine version."""

YADAGE_WORKFLOW_ENGINE_VERSION = os.getenv('YADAGE_WORKFLOW_ENGINE_VERSION',
'latest')
"""Yadage workflow engine version."""

SERIAL_WORKFLOW_ENGINE_VERSION = os.getenv('SERIAL_WORKFLOW_ENGINE_VERSION',
'latest')
"""Serial workflow engine version."""

WORKFLOW_ENGINE_COMMON_ENV_VARS = [
{
'name': 'ZMQ_PROXY_CONNECT',
Expand All @@ -81,7 +91,7 @@
},
{
'name': 'REANA_MOUNT_CVMFS',
'value': MOUNT_CVMFS
'value': '{}'.format(MOUNT_CVMFS)
}
]
"""Common to all workflow engines environment variables."""
Expand Down
10 changes: 6 additions & 4 deletions reana_workflow_controller/workflow_run_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
TTL_SECONDS_AFTER_FINISHED,
WORKFLOW_ENGINE_COMMON_ENV_VARS,
WORKFLOW_ENGINE_COMMON_ENV_VARS_DEBUG,
WORKFLOW_ENGINE_VERSION)
CWL_WORKFLOW_ENGINE_VERSION,
YADAGE_WORKFLOW_ENGINE_VERSION,
SERIAL_WORKFLOW_ENGINE_VERSION)


class WorkflowRunManager():
Expand All @@ -34,7 +36,7 @@ class WorkflowRunManager():

engine_mapping = {
'cwl': {'image': 'reanahub/reana-workflow-engine-cwl:{}'.
format(WORKFLOW_ENGINE_VERSION),
format(CWL_WORKFLOW_ENGINE_VERSION),
'command': ("run-cwl-workflow "
"--workflow-uuid {id} "
"--workflow-workspace {workspace} "
Expand All @@ -43,15 +45,15 @@ class WorkflowRunManager():
"--operational-options '{options}' "),
'environment_variables': WORKFLOW_ENGINE_COMMON_ENV_VARS},
'yadage': {'image': 'reanahub/reana-workflow-engine-yadage:{}'.
format(WORKFLOW_ENGINE_VERSION),
format(YADAGE_WORKFLOW_ENGINE_VERSION),
'command': ("run-yadage-workflow "
"--workflow-uuid {id} "
"--workflow-workspace {workspace} "
"--workflow-json '{workflow_json}' "
"--workflow-parameters '{parameters}' "),
'environment_variables': WORKFLOW_ENGINE_COMMON_ENV_VARS},
'serial': {'image': 'reanahub/reana-workflow-engine-serial:{}'.
format(WORKFLOW_ENGINE_VERSION),
format(SERIAL_WORKFLOW_ENGINE_VERSION),
'command': ("run-serial-workflow "
"--workflow-uuid {id} "
"--workflow-workspace {workspace} "
Expand Down

0 comments on commit cdaa955

Please sign in to comment.