.. figure:: https://raw.githubusercontent.com/galaxyproject/gravity/main/docs/gravity-logo.png
:alt: Gravity Logo
:align: center
:figwidth: 100%
:target: https://github.com/galaxyproject/gravity
Process management for Galaxy
_ servers.
.. image:: https://readthedocs.org/projects/gravity/badge/?version=latest
:target: http://gravity.readthedocs.io/en/latest/
:alt: Documentation Status
.. image:: https://badge.fury.io/py/gravity.svg
:target: https://pypi.python.org/pypi/gravity/
:alt: Gravity on the Python Package Index (PyPI)
.. image:: https://github.com/galaxyproject/gravity/actions/workflows/test.yaml/badge.svg
:target: https://github.com/galaxyproject/gravity/actions/workflows/test.yaml
Overview
Modern Galaxy servers run multiple disparate processes: gunicorn
_ for serving the web application, celery
_ for
asynchronous tasks, tusd
_ for fault-tolerant uploads, standalone Galaxy processes for job handling, and more. Gravity
is Galaxy's process manager, to make configuring and running these services simple.
Installing Gravity will give you two executables, galaxyctl
which is used to manage the starting, stopping, and
logging of Galaxy's various processes, and galaxy
, which can be used to run a Galaxy server in the foreground.
Quick Start
Installation
Python 3.7 or later is required. Gravity can be installed independently of Galaxy, but it is also a dependency of
Galaxy since Galaxy 22.01. If you've installed Galaxy, then Gravity is already installed in Galaxy's virtualenv.
To install independently:
.. code:: console
$ pip install gravity
Usage
From the root directory of a source checkout of Galaxy, after first run (or running Galaxy's
./scripts/common_startup.sh
), activate Galaxy's virtualenv, which will put Gravity's galaxyctl
and galaxy
commands on your $PATH
:
.. code:: console
$ . ./.venv/bin/activate
$ galaxyctl --help
Usage: galaxyctl [OPTIONS] COMMAND [ARGS]...
Manage Galaxy server configurations and processes.
... additional help output
You can start and run Galaxy in the foreground using the galaxy
command:
.. code:: console
$ galaxy
Registered galaxy config: /srv/galaxy/config/galaxy.yml
Creating or updating service gunicorn
Creating or updating service celery
Creating or updating service celery-beat
celery: added process group
2022-01-20 14:44:24,619 INFO spawned: 'celery' with pid 291651
celery-beat: added process group
2022-01-20 14:44:24,620 INFO spawned: 'celery-beat' with pid 291652
gunicorn: added process group
2022-01-20 14:44:24,622 INFO spawned: 'gunicorn' with pid 291653
celery STARTING
celery-beat STARTING
gunicorn STARTING
==> /srv/galaxy/var/gravity/log/gunicorn.log <==
...log output follows...
Galaxy will continue to run and output logs to stdout until terminated with CTRL+C
.
More detailed configuration and usage examples, especially those concerning production Galaxy servers, can be found in
the full documentation
_.
.. _Galaxy: http://galaxyproject.org/
.. _gunicorn: https://gunicorn.org/
.. _celery: https://docs.celeryq.dev/
.. _tusd: https://tus.io/
.. _the full documentation: https://gravity.readthedocs.io
=========
History
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Version 1.0.0 represents a significant update to Gravity, its features and functionality. Although Gravity 1.x is intended to be backwards compatible with 0.x, you are strongly encouraged to read the documentation if upgrading to Gravity 1.x or to Galaxy 23.0 (which depends on Gravity 1.x) in order to get the most out of the new features.
0.13.6
0.13.5
0.13.4
0.13.3
0.13.2
0.13.1
0.13.0
0.12.0
0.11.0
0.10.0
0.9
.. _argparse: https://docs.python.org/3/library/argparse.html
.. _click: http://click.pocoo.org/
.. _planemo: https://github.com/galaxyproject/planemo
0.8.3
- Merge
galaxycfg
and galaxyadm
commands to galaxy
.
0.8.2
- Allow for passing names of individual services directly to
supervisorctl
via the start
, stop
, and restart
methods. - Fix a bug where uWSGI would not start when using the automatic virtualenv
install method.
0.8.1
- Version bump because I deleted the 0.8 files from PyPI, and despite the fact
that it lets you delete them, it doesn't let you upload once they have been
uploaded once...
0.8
- Add auto-register to
galaxy start
if it's called from the root (or
subdirectory) of a Galaxy root directory. - Make
galaxycfg remove
accept instance names as params in addition to
config file paths. - Use the same hash generated for an instance name as the hash for a generated
virtualenv name, so virtualenvs are more easily identified as belonging to a
config.
- Renamed from
galaxyadmin
to gravity
(thanks John Chilton).
0.7
- Added the
galaxyadm
subcommand graceful
on a suggestion from Nicola
Soranzo. - Install uWSGI into the config's virtualenv if requested.
- Removed any dependence on Galaxy and eggs.
- Moved project to its own repository from the Galaxy clone I'd been working
from.
Older
- Works in progress as part of the Galaxy code.