Skip to content

Commit

Permalink
Docs updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fajpunk committed Jul 19, 2024
1 parent bd9fcd8 commit 07a475b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/user_guide/flocks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,12 @@ The repository URL and branch are configured in ``options``.
``options.max_executions: 1`` tells mobu to shut down and respawn the pod after each notebook.
This exercises pod spawning more frequently, but does not test the lab's ability to run a long series of notebooks.
One may wish to run multiple flocks in a given environment with different configurations for ``max_executions``.

.. _autostart_exclude_dirs:

``options.exclude_dirs`` tells mobu to not excecute any notebooks in those directories or any descendant directories.
Those directories are relative to the repo root.
If ``exclude_dirs`` is set in the :ref:`in-repo config <in_repo_exclude_dirs>`, it will override ``exclude_dirs`` specified in the autostart config here.

These notebooks need more scopes, so those scopes are specified.

Expand Down
45 changes: 45 additions & 0 deletions docs/user_guide/in_repo_config.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
##############
In-repo config
##############

Some mobu behavior can be controlled by files within notebook repos that mobu clones and runs.

.. _in_repo_exclude_dirs:

Exclude notebooks in specific directories
=========================================

You can tell mobu to exclude notebooks in specific directories by creating a ``mobu.yaml`` file at the root of your notebook repo that looks like this:

.. code-block:: yaml
exclude_dirs:
- "some-dir"
- "some-other-dir"
This prevents mobu from executing any notebooks in these directories or any descendant directories.
These directories are relative to the repo root.
If this is set in the repo config file like this, it will override the ``exclude_dirs`` value specified in the :ref:`autostart config <autostart_exclude_dirs>`.

Service-specific notebooks
==========================

Each mobu instance knows what other `services <https://phalanx.lsst.io/applications/index.html>`_ are running in its environment.
You can annotate a notebook to tell mobu to only run it if certain services are available.
Add a ``mobu`` section to the `notebook metadata <https://phalanx.lsst.io/applications/index.html>`_ with a ``required_services`` key:

.. code-block:: jsonnet
{
"cells": [
// A bunch of cells
],
"metadata": {
"mobu": {
"required_services": ["nublado"]
},
// A bunch of other metadata
},
"nbformat": 4,
"nbformat_minor": 5
}
1 change: 1 addition & 0 deletions docs/user_guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ User Guide
.. toctree::

flocks
in_repo_config
github/index

0 comments on commit 07a475b

Please sign in to comment.