Skip to main content

StreamFlow framework

Project description

StreamFlow

CWL Conformance

The StreamFlow framework is a container-native Workflow Management System (WMS) written in Python 3. It has been designed around two main principles:

  • Allow the execution of tasks in multi-container environments, in order to support concurrent execution of multiple communicating tasks in a multi-agent ecosystem.
  • Relax the requirement of a single shared data space, in order to allow for hybrid workflow executions on top of multi-cloud or hybrid cloud/HPC infrastructures.

Use StreamFlow

PyPI

The StreamFlow module is available on PyPI, so you can install it using pip.

pip install streamflow

Please note that StreamFlow requires python >= 3.8. Then you can execute it directly from the CLI

streamflow run /path/to/streamflow.yml

Docker

StreamFlow Docker images are available on Docker Hub. In order to run a workflow inside the StreaFlow image

  • A StreamFlow project, containing a streamflow.yml file and all the other relevant dependencies (e.g. a CWL description of the workflow steps and a Helm description of the execution environment) need to be mounted as a volume inside the container, for example in the /streamflow/project folder
  • Workflow outputs, if any, will be stored in the /streamflow/results folder. Therefore, it is necessary to mount such location as a volume in order to persist the results
  • StreamFlow will save all its temporary files inside the /tmp/streamflow location. For debugging purposes, or in order to improve I/O performances in case of huge files, it could be useful to mount also such location as a volume
  • The path of the streamflow.yml file inside the container (e.g. /streamflow/project/streamflow.yml) must be passed as an argument to the Docker container

The script below gives an example of StreamFlow execution in a Docker container

docker run -d \
    --mount type=bind,source="$(pwd)"/my-project,target=/streamflow/project \
    --mount type=bind,source="$(pwd)"/results,target=/streamflow/results \
    --mount type=bind,source="$(pwd)"/tmp,target=/tmp/streamflow \
    alphaunito/streamflow run /streamflow/project/streamflow.yml

Kubernetes

It is also possible to execute the StreamFlow container as a Job in Kubernetes. In this case, StreamFlow is able to deploy Helm models directly on the parent cluster through the ServiceAccount credentials. In order to do that, the inCluster option must be set to true for each involved module on the streamflow.yml file

models:
  helm-model:
    type: helm
    config:
      inCluster: true
      ...

A Helm template of a StreamFlow Job can be found in the helm/chart folder.

Please note that, in case RBAC is active on the Kubernetes cluster, a proper RoleBinding must be attached to the ServiceAccount object, in order to give StreamFlow the permissions to manage deployments of pods and executions of tasks.

CWL Compatibility

StreamFlow relies on the Common Workflow Language (CWL) standard to design workflow models. CWL conformance badges for StreamFlow are reported below.

CWL v1.0

Classes

Required features

Optional features

CWL v1.1

Classes

Required features

Optional features

CWL v1.2

Classes

Required features

Optional features

Contribute to StreamFlow

As a first step, get StreamFlow from GitHub

git clone git@github.com:alpha-unito/streamflow.git

Then you can install all the requred packages using the pip install command

cd streamflow
pip install .

StreamFlow relies on GitHub Actions for PyPI and Docker Hub distributions. Therefore, in order to publish a new version of the software, you only have to augment the version number in version.py file.

StreamFlow Team

Iacopo Colonnelli iacopo.colonnelli@unito.it (creator and maintainer)
Barbara Cantalupo barbara.cantalupo@unito.it (maintainer)
Marco Aldinucci aldinuc@di.unito.it (maintainer)

Gaetano Saitta gaetano.saitta@edu.unito.it (contributor)
Alberto Mulone alberto.mulone@edu.unito.it (contributor)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamflow-0.1.4.tar.gz (149.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamflow-0.1.4-py2.py3-none-any.whl (175.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file streamflow-0.1.4.tar.gz.

File metadata

  • Download URL: streamflow-0.1.4.tar.gz
  • Upload date:
  • Size: 149.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for streamflow-0.1.4.tar.gz
Algorithm Hash digest
SHA256 77117d1a9bbaae0003e9aa6d16d3d1c78c640b560157be53efa0c5d2bb23e830
MD5 65d9bdd441cc4a28fc060e7dd1a5cafa
BLAKE2b-256 288bdcf194b6d561f7c4fcf52d7379359ebb615efc720d64b45b28ff81c463a4

See more details on using hashes here.

File details

Details for the file streamflow-0.1.4-py2.py3-none-any.whl.

File metadata

  • Download URL: streamflow-0.1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 175.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for streamflow-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 055661b83cb8b927f4ff4db217e1d57c5a2412dc4fa97e73f3e28012064ad22d
MD5 a48bdb38a3adc20e6ed70de62073ce6c
BLAKE2b-256 edf1b169f143b888f896d5cec492952f0e3c697f2dfa0c986622c1b2eb0d15da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page