Skip to content

Commit aa0e592

Browse files
authored
chore(docs): update provider plugin docs (#2535)
1 parent d6c1fe2 commit aa0e592

File tree

4 files changed

+45
-24
lines changed

4 files changed

+45
-24
lines changed

docs/how-to-guides/hpc.rst

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
Running Renku on HPC
44
====================
55

6-
Renku CLI supports various backends for executing workflows. Currently, there
7-
are two different providers are implemented, namely ``cwltool`` and ``toil``.
8-
:ref:`provider` documents gives a more detailed description of how to implement
9-
your own workflow provider.
6+
The Renku CLI supports various backends for executing workflows. Currently, two
7+
different providers are implemented, namely ``cwltool`` and ``toil``. If you
8+
have a specific provider you need for your infrastructure, have a look at
9+
:doc:`implementing_a_provider` for a detailed description of how to implement
10+
your own workflow provider. Alternatively, please `make a feature request
11+
<https://github.com/SwissDataScienceCenter/renku-python/issues/new?assignees=&labels=&template=feature_request.md>`_.
1012

1113
By default all workflows are executed by the ``cwltool`` provider, that
1214
exports the workflow to CWL and then uses `cwltool <https://github.com/common-workflow-language/cwltool>`_
@@ -18,12 +20,12 @@ providing the ``-c/--config <config.yaml>`` command line parameter.
1820
The following ``renku`` commands support the above mentioned workflow provider
1921
related command line options:
2022

21-
- :ref:`cli-rerun`,
22-
- :ref:`cli-update`,
23-
- :ref:`cli-workflow` ``execute`` and ``iterate``.
23+
- :ref:`cli-rerun`
24+
- :ref:`cli-update`
25+
- :ref:`cli-workflow` ``execute`` and ``iterate``
2426

2527
For example, to execute a previously created ``my_plan`` workflow with ``toil``, one
26-
simply would run the following command:
28+
would simply run the following command:
2729

2830
.. code-block:: console
2931
@@ -34,23 +36,34 @@ the workflows on various `high-performance computing <https://toil.readthedocs.i
3436
and `cloud <https://toil.readthedocs.io/en/latest/running/cloud/cloud.html#cloud-platforms>`_
3537
platforms.
3638

39+
In order to use any other provider with ``renku`` you must first install the required
40+
extras. In the case of ``toil`` this means running the install command like
41+
42+
.. code-block:: console
43+
44+
$ pip install renku[toil]
45+
46+
3747
Renku on Slurm
3848
^^^^^^^^^^^^^^
39-
`Slurm <https://www.schedmd.com/>`_ is a highly configurable open-source workload manager,
40-
which is in widespread use at government laboratories, universities and companies world
41-
wide and performs workload management for over half of the top 10 systems in the TOP500.
49+
50+
`Slurm <https://www.schedmd.com/>`_ is a highly configurable open-source
51+
workload manager, which is in widespread use at government laboratories,
52+
universities and companies world wide. It is used in over half of the top 10
53+
systems in the `TOP500 <https://www.top500.org/>`_ listing.
4254

4355
As ``toil`` supports Slurm, one can easily execute the previously created renku
44-
workflows on Slurm. One just needs to provide a simple configuration file to the provider
45-
(``--config``)::
56+
workflows on a Slurm-managed HPC resource. One just needs to provide a simple
57+
configuration file to the provider (``--config/-c``)::
4658

4759
batchSystem: slurm
4860
disableCaching: true
4961

50-
The ``disableCaching`` is necessary to be enabled for Slurm, for more details see the
51-
related ``toil`` issue `TOIL-1006 <https://ucsc-cgl.atlassian.net/browse/TOIL-1006>`_.
62+
The ``disableCaching`` option is necessary for Slurm; for more details see the
63+
related ``toil`` issue `TOIL-1006
64+
<https://ucsc-cgl.atlassian.net/browse/TOIL-1006>`_.
5265

53-
`Additional Slurm specific parameters <https://slurm.schedmd.com/sbatch.html>`_ can be
66+
`Additional Slurm-specific parameters <https://slurm.schedmd.com/sbatch.html>`_ can be
5467
provided with the ``TOIL_SLURM_ARGS`` environment variable.
5568

5669
Taking the example above, the following command line will execute ``my_plan`` on Slurm:

docs/how-to-guides/provider.rst renamed to docs/how-to-guides/implementing_a_provider.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
.. _provider:
1+
.. _implementing_a_provider:
22

33
Implementing a workflow provider
44
================================
55

6-
In the previous section about :ref:`hpc`, we described how using different
7-
workflow providers can enable the user running renku workflows on HPC. In
8-
this short article we will discuss how to implement our own, custom workflow
9-
provider as a plugin for Renku CLI.
6+
In :ref:`hpc`, we described how using different workflow providers can enable
7+
the user running renku workflows on HPC. Here we discuss how to implement a new,
8+
custom workflow provider as a plugin for Renku CLI.
109

1110
Renku provides the option to add a new workflow executor backend with the
1211
help of `pluggy <https://pluggy.readthedocs.io/en/latest/>`_ plugins.

docs/how-to-guides/index.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ aimed at active users of Renku CLI and target specific use-cases or common issue
88

99

1010
.. toctree::
11-
:maxdepth: 2
12-
11+
:maxdepth: 1
1312

1413
hpc
15-
provider
14+
implementing_a_provider
1615
shell-integration

docs/reference/plugins.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,13 @@ where `myproject.pluginmodule:mycmd` points to a click command e.g.:
8181
@click.command()
8282
def mycmd():
8383
...
84+
85+
Workflow Provider Plugins
86+
-------------------------
87+
88+
Additional workflow providers can be implemented by extending
89+
:class:`renku.core.models.workflow.provider.IWorkflowProvider`. See
90+
:ref:`implementing_a_provider` for more information.
91+
92+
.. autoclass:: renku.core.models.workflow.provider.IWorkflowProvider
93+
:members:

0 commit comments

Comments
 (0)