Package: gravity
Process management forGalaxyservers.License: MITDocumentation:https://gravity.readthedocs.ioCode:https://github.com/galaxyproject/gravityOverviewModern Galaxy servers run multiple disparate processes:gunicornfor serving the web application,celeryfor
asynchronous tasks,tusdfor 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,galaxyctlwhich is used to manage the starting, stopping, and
logging of Galaxy’s various processes, andgalaxy, which can be used to run a Galaxy server in the foreground.Quick StartInstallationPython 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:$pipinstallgravityUsageFrom 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’sgalaxyctlandgalaxycommands on your$PATH:$../.venv/bin/activate$galaxyctl--helpUsage: galaxyctl [OPTIONS] COMMAND [ARGS]...

  Manage Galaxy server configurations and processes.

... additional help outputYou can start and run Galaxy in the foreground using thegalaxycommand:$galaxyRegistered 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 withCTRL+C.More detailed configuration and usage examples, especially those concerning production Galaxy servers, can be found inthe full documentation.History1.0.6Support pydantic v1 and v2 by @mvdbeek inhttps://github.com/galaxyproject/gravity/pull/118Fix GalaxyReportsService crash and remove config_type by @jvanbraekel inhttps://github.com/galaxyproject/gravity/pull/116Support running multiple tusds and controlling the value of hooks-http by @natefoo inhttps://github.com/galaxyproject/gravity/pull/1191.0.5Support pydantic v1 and v2 by @heisner-tillman inhttps://github.com/galaxyproject/gravity/pull/1181.0.4Supervisor: more readable program name + reread config on each change by @abretaud inhttps://github.com/galaxyproject/gravity/pull/110Remove unneeded supervisorctl update call by @abretaud inhttps://github.com/galaxyproject/gravity/pull/112Minimal path change needed for galaxy PR 16795 by @sveinugu inhttps://github.com/galaxyproject/gravity/pull/1141.0.3Don’t create supervisor conf dir unless necessary, create the gravity data dir as the correct user by @natefoo inhttps://github.com/galaxyproject/gravity/pull/1051.0.2Pin a minimum package version of gx-it-proxy by @natefoo inhttps://github.com/galaxyproject/gravity/pull/1021.0.1Added configuration of gx-it-proxy to support path-based proxying by @sveinugu inhttps://github.com/galaxyproject/gravity/pull/1001.0.0Version 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](https://gravity.readthedocs.io/en/latest/) 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.Support systemd as a process manager by @natefoo inhttps://github.com/galaxyproject/gravity/pull/77Full stateless mode when working with single instances and other improvements for 1.0 by @natefoo inhttps://github.com/galaxyproject/gravity/pull/80Multi-unicorn rolling restart and general multi-instance service support by @natefoo inhttps://github.com/galaxyproject/gravity/pull/81Don’t clobber other Galaxies’ systemd units when managed by different Gravity config files by @natefoo inhttps://github.com/galaxyproject/gravity/pull/83Don’t restart tusd on graceful by @natefoo inhttps://github.com/galaxyproject/gravity/pull/85Read job_conf.yml by default if job_config_file is unset by @natefoo inhttps://github.com/galaxyproject/gravity/pull/86Fixes for spaces in the galaxy root path, fix thegalaxyentrypoint by @natefoo inhttps://github.com/galaxyproject/gravity/pull/87Update existing env with program env when running exec, rather than the other way around by @natefoo inhttps://github.com/galaxyproject/gravity/pull/93Hide the “exec” ServiceCommandStyle from documentation since it is only used internally by @natefoo inhttps://github.com/galaxyproject/gravity/pull/94Updates for settings documentation generation by @natefoo inhttps://github.com/galaxyproject/gravity/pull/95Set$VIRTUAL_ENVifvirtualenvis set in config by @natefoo inhttps://github.com/galaxyproject/gravity/pull/97Always add venv bin dir to$PATHifvirtualenvis set by @natefoo inhttps://github.com/galaxyproject/gravity/pull/980.13.6Fix graceful method for gunicorn--preloadby @Slugger70 inhttps://github.com/galaxyproject/gravity/pull/76Add--versionoption to get Gravity version by @natefoo inhttps://github.com/galaxyproject/gravity/pull/79Fix stopping of gx-it-proxy by @abretaud inhttps://github.com/galaxyproject/gravity/pull/910.13.5If virtualenv is set in the Gravity config, automatically add its bin dir to $PATH if the gx-it-proxy is enabled by @natefoo inhttps://github.com/galaxyproject/gravity/pull/71Support converting settings to command line arguments in a generalized way by @natefoo inhttps://github.com/galaxyproject/gravity/pull/730.13.4Fixes for startup test by @natefoo inhttps://github.com/galaxyproject/gravity/pull/68Fix setting environment vars on handlers by @natefoo inhttps://github.com/galaxyproject/gravity/pull/700.13.3Don’t use gunicorn logging options with unicornherder by @natefoo inhttps://github.com/galaxyproject/gravity/pull/650.13.2Don’t override PATH in subprocess call by @jdavcs inhttps://github.com/galaxyproject/gravity/pull/62Only send pre create hook by @mvdbeek inhttps://github.com/galaxyproject/gravity/pull/640.13.1Set correct default for environment settings by @natefoo inhttps://github.com/galaxyproject/gravity/pull/58Don’t catch exceptions in the deregister, register, and rename subcommands by @natefoo inhttps://github.com/galaxyproject/gravity/pull/59processesin thehandlingdict in the job conf dict is a dict, not a list by @natefoo inhttps://github.com/galaxyproject/gravity/pull/600.13.0Add options to enable/disable gunicorn, celery, and celery-beat services by @natefoo inhttps://github.com/galaxyproject/gravity/pull/47Add ability to include gravity config from a separate file and document by @natefoo inhttps://github.com/galaxyproject/gravity/pull/48Only default to preload = true for gunicorn if not using unicornherder by @natefoo inhttps://github.com/galaxyproject/gravity/pull/49Add option to specify tusd path by @natefoo inhttps://github.com/galaxyproject/gravity/pull/50Support setting per-service environment variables by @natefoo inhttps://github.com/galaxyproject/gravity/pull/560.12.0Fix typo inlog_dirdescription by @nsoranzo inhttps://github.com/galaxyproject/gravity/pull/44Shortcut individual services fix by @natefoo inhttps://github.com/galaxyproject/gravity/pull/45Add additional options to celery beat / celery workers by @mvdbeek inhttps://github.com/galaxyproject/gravity/pull/460.11.0Allow setting supervisor socket path via environment variable by @mvdbeek inhttps://github.com/galaxyproject/gravity/pull/36Automatically switch to non-sample galaxy.yml if it exists by @mvdbeek inhttps://github.com/galaxyproject/gravity/pull/39Add pydantic config schema by @mvdbeek inhttps://github.com/galaxyproject/gravity/pull/42Add –quiet option to galaxy and galaxyctl start by @mvdbeek inhttps://github.com/galaxyproject/gravity/pull/40Add support for yaml job config by @mvdbeek inhttps://github.com/galaxyproject/gravity/pull/37Add –preload support for gunicorn by @mvdbeek inhttps://github.com/galaxyproject/gravity/pull/41Support running tusd by @natefoo inhttps://github.com/galaxyproject/gravity/pull/230.10.0Fix for the case where a job_conf.xml exists but no handlers are defined by @natefoo inhttps://github.com/galaxyproject/gravity/pull/24Do not raise error if config file section is empty by @nsoranzo inhttps://github.com/galaxyproject/gravity/pull/25Add tests for static handlers and a defined job_conf.xml with no handlers by @natefoo inhttps://github.com/galaxyproject/gravity/pull/26Fix minor typos in readme by @ic4f inhttps://github.com/galaxyproject/gravity/pull/27Move configuration to gravity key of galaxy.yml file by @mvdbeek inhttps://github.com/galaxyproject/gravity/pull/28Fix for resolved galaxy.yml.sample symlink by @mvdbeek inhttps://github.com/galaxyproject/gravity/pull/31Support managing gx-it-proxy via gravity by @mvdbeek inhttps://github.com/galaxyproject/gravity/pull/320.9Gunicorn/fastAPI support, click support, tests by @mvdbeek inhttps://github.com/galaxyproject/gravity/pull/14Don’t test on Python 3.6, which is unsupported by @natefoo inhttps://github.com/galaxyproject/gravity/pull/17Update README. Also some various small bugfixes and fixes for other stuff mentioned in the README by @natefoo inhttps://github.com/galaxyproject/gravity/pull/18Add unicornherder support by @natefoo inhttps://github.com/galaxyproject/gravity/pull/15Expose the log following used bystart -fas its own subcommand. by @natefoo inhttps://github.com/galaxyproject/gravity/pull/16Better integration with Galaxy’s run.sh by @natefoo inhttps://github.com/galaxyproject/gravity/pull/19Use relative paths in supervisord by @natefoo inhttps://github.com/galaxyproject/gravity/pull/21Converted CLI fromargparsetoclick.Stole ideas and code fromplanemoin general.Improve the AttributeDict so that it can have “hidden” items (anything that
starts with a_) that won’t be serialized. Also, it serializes itself and
can be created via deserialization from a classmethod. This simplifies using
it to persist state data in the new GravityState subclass.0.8.3Mergegalaxycfgandgalaxyadmcommands togalaxy.0.8.2Allow for passing names of individual services directly tosupervisorctlvia thestart,stop, andrestartmethods.Fix a bug where uWSGI would not start when using the automatic virtualenv
install method.0.8.1Version 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.8Add auto-register togalaxy startif it’s called from the root (or
subdirectory) of a Galaxy root directory.Makegalaxycfg removeaccept 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 fromgalaxyadmintogravity(thanks John Chilton).0.7Added thegalaxyadmsubcommandgracefulon 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.OlderWorks in progress as part of the Galaxy code.