Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ function environment_initialization() {
fi
export AIRFLOW__CORE__LOAD_EXAMPLES=${LOAD_EXAMPLES}
wait_for_asset_compilation
if [[ ${USE_MPROCS:="false"} == "true" || ${USE_MPROCS} == "True" ]]; then
if [[ ${TERMINAL_MULTIPLEXER:="mprocs"} == "mprocs" ]]; then
# shellcheck source=scripts/in_container/bin/run_mprocs
exec run_mprocs
else
Expand Down
31 changes: 26 additions & 5 deletions contributing-docs/03_contributors_quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -644,15 +644,37 @@ If ``breeze`` was started with ``breeze --python 3.10 --backend postgres`` (or s
.. note::
``stop_airflow`` is available only when ``breeze`` is started with ``breeze start-airflow``.

Using mprocs Instead of tmux
Using tmux Instead of mprocs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

By default, ``breeze start-airflow`` uses tmux to manage Airflow components. You can use mprocs as an
alternative with the ``--use-mprocs`` flag:
By default, ``breeze start-airflow`` uses mprocs to manage Airflow components. You can use ``tmux`` as an
alternative with the ``--terminal-multiplexer tmux`` argument. The last choice of yours will be remembered
for the next run, you can switch back to ``mprocs`` anytime by using ``--terminal-multiplexer mprocs``.

.. code-block:: bash

breeze start-airflow --use-mprocs
breeze start-airflow --terminal-multiplexer tmux

and

.. code-block:: bash

breeze start-airflow --terminal-multiplexer mprocs

You can also switch terminal multiplexer via breeze config:

.. code-block:: bash

breeze setup config --terminal_multiplexer tmux
breeze setup config --terminal_multiplexer mprocs

** Benefits of using tmux:**

* Familiar terminal multiplexer for many developers
* More control over panes and windows
* Customizable key bindings and layouts
* Wide range of plugins and extensions
* ability to see more than one log at a time

**Benefits of using mprocs:**

Expand All @@ -670,7 +692,6 @@ For more information on mprocs, look at `mprocs documentation <mprocs/MPROCS_QUI

breeze --help


Following are some of important topics of `Breeze documentation <../dev/breeze/doc/README.rst>`__:

* `Breeze Installation <../dev/breeze/doc/01_installation.rst>`__
Expand Down
37 changes: 27 additions & 10 deletions contributing-docs/mprocs/MPROCS_QUICK_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,41 @@

## Basic Command

Start airflow uses mprocs by default:

```bash
breeze start-airflow
```

You can switch to using `tmux` instead by specifying the option:

```bash
breeze start-airflow --use-mprocs
breeze start-airflow --terminal-multiplexer tmux
```

Breeze will start Airflow components using mprocs to manage multiple processes in a single terminal window.
Once you select the terminal multiplexer, Breeze will remember your choice for future runs.

You can also switch terminal multiplexers by running `breeze setup config`:

```bash
breeze setup config --terminal-multiplexer mprocs
breeze setup config --terminal-multiplexer tmux
```


When Breeze will start Airflow components using mprocs to manage multiple processes in a single terminal window.
It will generate dynamically the required configuration based on the selected executor and options and use it,
the generated configuration file is stored in a `files` folder inside the container, so that you can also
use it outside of Breeze if needed.

## Common Usage Patterns

| Command | Description |
|---------------------------------------------------------------|---------------------------------|
| `breeze start-airflow --use-mprocs` | Start Airflow with mprocs |
| `breeze start-airflow --use-mprocs --debug scheduler` | Debug scheduler with mprocs |
| `breeze start-airflow --use-mprocs --executor CeleryExecutor` | Use mprocs with Celery |
| `breeze start-airflow --use-mprocs --dev-mode` | Use mprocs in dev mode |
| `breeze start-airflow --use-tmux` | Explicitly use tmux (default) |
| Command | Description |
|-----------------------------------------------------------------|-----------------------------------------------------|
| `breeze start-airflow --terminal-multiplexer mprocs` | Start Airflow with mprocs (and remember the choice) |
| `breeze start-airflow --terminal-multiplexer tmux` | Start Airflow with tmux (and remember the choice) |
| `breeze start-airflow --debug scheduler` | Debug scheduler with last selected multiplexer |
| `breeze start-airflow --dev-mode --terminal-multiplexer mprocs` | Use mprocs in dev mode (and remember the choice) |


## mprocs Keyboard Shortcuts
Expand Down Expand Up @@ -67,7 +84,7 @@ use it outside of Breeze if needed.

| Variable | Purpose |
|----------------------------|---------------------------------|
| `USE_MPROCS` | Enable mprocs mode |
| `TERMNAL_MULTIPLEXER` | Use mprocs when set to "mprocs" |
| `INTEGRATION_CELERY` | Enable Celery components |
| `CELERY_FLOWER` | Enable Flower UI |
| `STANDALONE_DAG_PROCESSOR` | Enable standalone DAG processor |
Expand Down
2 changes: 1 addition & 1 deletion dev/breeze/doc/images/output-commands.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading