From 07a763eede029c8adccf974892cdd3169912d4a3 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 13 Mar 2022 15:56:04 +0100 Subject: [PATCH 1/3] Include gravity sample schema in galaxy.yml.sample --- lib/galaxy/config/config_manage.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/galaxy/config/config_manage.py b/lib/galaxy/config/config_manage.py index cd4fa10c0d06..ec3e478c2d7f 100644 --- a/lib/galaxy/config/config_manage.py +++ b/lib/galaxy/config/config_manage.py @@ -694,6 +694,12 @@ def _build_sample_yaml(args, app_desc): description = description.lstrip() as_comment = "\n".join(f"# {line}" for line in description.split("\n")) + "\n" f.write(as_comment) + if app_desc.app_name == "galaxy": + try: + from gravity.util import settings_to_sample + f.write(settings_to_sample()) + except ImportError: + _warn("Please install gravity (pip install gravity) to rebuild yaml sample") _write_sample_section(args, f, 'uwsgi', Schema(UWSGI_OPTIONS), as_comment=False, uwsgi_hack=True) _write_sample_section(args, f, app_desc.app_name, schema) destination = os.path.join(args.galaxy_root, app_desc.sample_destination) From 0f650811273ecbc5af04543a47e6aa45a2bb2738 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 13 Mar 2022 16:43:59 +0100 Subject: [PATCH 2/3] Rebuild galaxy.yml.sample --- lib/galaxy/config/sample/galaxy.yml.sample | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/lib/galaxy/config/sample/galaxy.yml.sample b/lib/galaxy/config/sample/galaxy.yml.sample index d6d5c43bfc56..487217eba4fa 100644 --- a/lib/galaxy/config/sample/galaxy.yml.sample +++ b/lib/galaxy/config/sample/galaxy.yml.sample @@ -16,6 +16,104 @@ # # Config hackers are encouraged to check there before asking for help. # +# Configuration for Gravity process manager. +# ``uwsgi:`` section will be ignored if Galaxy is started via Gravity commands (e.g ``./run.sh``, ``galaxy`` or ``galaxyctl``). +gravity: + + # Specify Galaxy's root directory. + # Gravity will attempt to find the root directory, but you can set the directory explicitly with this option. + # galaxy_root: + + # Set to a directory that should contain log files for the processes controlled by Gravity. + # If not specified defaults to ``/logs``. + # log_dir: + + # Set to Galaxy's virtualenv directory. + # If not specified, Gravity assumes all processes are on PATH. + # virtualenv: + + # Select the application server. + # ``gunicorn`` is the default application server. + # ``unicornherder`` is a production-oriented manager for (G)unicorn servers that automates zero-downtime Galaxy server restarts, + # similar to uWSGI Zerg Mode used in the past. + # Valid options are: gunicorn, unicornherder + # app_server: gunicorn + + # Override the default instance name. + # this is hidden from you when running a single instance. + # instance_name: _default_ + + # Configuration for Gunicorn. + gunicorn: + + # The socket to bind. A string of the form: ``HOST``, ``HOST:PORT``, ``unix:PATH``, ``fd://FD``. An IP is a valid HOST. + # bind: localhost:8080 + + # Controls the number of Galaxy application processes Gunicorn will spawn. + # Increased web performance can be attained by increasing this value. + # If Gunicorn is the only application on the server, a good starting value is the number of CPUs * 2 + 1. + # 4-12 workers should be able to handle hundreds if not thousands of requests per second. + # workers: 1 + + # Gunicorn workers silent for more than this many seconds are killed and restarted. + # Value is a positive number or 0. Setting it to 0 has the effect of infinite timeouts by disabling timeouts for all workers entirely. + # If you disable the ``preload`` option workers need to have finished booting within the timeout. + # timeout: 300 + + # Extra arguments to pass to Gunicorn command line. + # extra_args: + + # Use Gunicorn's --preload option to fork workers after loading the Galaxy Application. + # Consumes less memory when multiple processes are configured. + # preload: true + + # Configuration for Celery Processes. + celery: + + # Number of Celery Workers to start. + # concurrency: 2 + + # Log Level to use for Celery Worker. + # Valid options are: DEBUG, INFO, WARNING, ERROR + # loglevel: DEBUG + + # Extra arguments to pass to Celery command line. + # extra_args: + + # Configuration for gx-it-proxy. + gx_it_proxy: + + # Set to true to start gx-it-proxy + # enable: false + + # Public-facing IP of the proxy + # ip: localhost + + # Public-facing port of the proxy + # port: 4002 + + # Routes file to monitor. + # Should be set to the same path as ``interactivetools_map`` in the ``galaxy:`` section. + # sessions: database/interactivetools_map.sqlite + + # Include verbose messages in gx-it-proxy + # verbose: true + + # Forward all requests to IP. + # This is an advanced option that is only needed when proxying to remote interactive tool container that cannot be reached through the local network. + # forward_ip: + + # Forward all requests to port. + # This is an advanced option that is only needed when proxying to remote interactive tool container that cannot be reached through the local network. + # forward_port: + + # Rewrite location blocks with proxy port. + # This is an advanced option that is only needed when proxying to remote interactive tool container that cannot be reached through the local network. + # reverse_proxy: false + + # Configure dynamic handlers in this section. + # See https://docs.galaxyproject.org/en/latest/admin/scaling.html#dynamically-defined-handlers for details. + # handlers: {} uwsgi: # The address and port on which to listen. By default, only listen to From 90672de88d7277f7cd31c41849c4c74482750c88 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 15 Mar 2022 12:02:06 +0100 Subject: [PATCH 3/3] Rebuild sample for gravity 0.11.0 --- lib/galaxy/config/config_manage.py | 7 ++----- lib/galaxy/config/sample/galaxy.yml.sample | 21 +++++++++++++++++++ lib/galaxy/dependencies/dev-requirements.txt | 2 +- .../dependencies/pinned-requirements.txt | 2 +- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/lib/galaxy/config/config_manage.py b/lib/galaxy/config/config_manage.py index ec3e478c2d7f..a1862b711fcb 100644 --- a/lib/galaxy/config/config_manage.py +++ b/lib/galaxy/config/config_manage.py @@ -12,6 +12,7 @@ import requests import yaml from boltons.iterutils import remap +from gravity.util import settings_to_sample try: from pykwalify.core import Core @@ -695,11 +696,7 @@ def _build_sample_yaml(args, app_desc): as_comment = "\n".join(f"# {line}" for line in description.split("\n")) + "\n" f.write(as_comment) if app_desc.app_name == "galaxy": - try: - from gravity.util import settings_to_sample - f.write(settings_to_sample()) - except ImportError: - _warn("Please install gravity (pip install gravity) to rebuild yaml sample") + f.write(settings_to_sample()) _write_sample_section(args, f, 'uwsgi', Schema(UWSGI_OPTIONS), as_comment=False, uwsgi_hack=True) _write_sample_section(args, f, app_desc.app_name, schema) destination = os.path.join(args.galaxy_root, app_desc.sample_destination) diff --git a/lib/galaxy/config/sample/galaxy.yml.sample b/lib/galaxy/config/sample/galaxy.yml.sample index 487217eba4fa..b64f25279385 100644 --- a/lib/galaxy/config/sample/galaxy.yml.sample +++ b/lib/galaxy/config/sample/galaxy.yml.sample @@ -111,6 +111,27 @@ gravity: # This is an advanced option that is only needed when proxying to remote interactive tool container that cannot be reached through the local network. # reverse_proxy: false + # Configuration for tusd server (https://github.com/tus/tusd). + # The ``tusd`` binary must be installed manually and made available on PATH (e.g in galaxy's .venv/bin directory). + tusd: + + # Enable tusd server. + # If enabled, you also need to set up your proxy as outlined in https://docs.galaxyproject.org/en/latest/admin/nginx.html#receiving-files-via-the-tus-protocol. + # enable: false + + # Host to bind the tusd server to + # host: localhost + + # Port to bind the tusd server to + # port: 1080 + + # Directory to store uploads in. + # Must match ``tus_upload_store`` setting in ``galaxy:`` section. + # upload_dir: + + # Extra arguments to pass to tusd command line. + # extra_args: + # Configure dynamic handlers in this section. # See https://docs.galaxyproject.org/en/latest/admin/scaling.html#dynamically-defined-handlers for details. # handlers: {} diff --git a/lib/galaxy/dependencies/dev-requirements.txt b/lib/galaxy/dependencies/dev-requirements.txt index ea32410662e8..d269a4704b3b 100644 --- a/lib/galaxy/dependencies/dev-requirements.txt +++ b/lib/galaxy/dependencies/dev-requirements.txt @@ -65,7 +65,7 @@ fs==2.4.14 funcsigs==1.0.2 future==0.18.2; (python_version >= "2.6" and python_full_version < "3.0.0") or (python_full_version >= "3.3.0") galaxy-sequence-utils==1.1.5 -gravity==0.10.0; python_version >= "3.6" +gravity==0.11.0; python_version >= "3.6" greenlet==1.1.2; python_version >= "3" and python_full_version < "3.0.0" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") and (python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.6.0") or python_version >= "3" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") and (python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.6.0") and python_full_version >= "3.5.0" gunicorn==20.1.0; python_version >= "3.5" gxformat2==0.15.0 diff --git a/lib/galaxy/dependencies/pinned-requirements.txt b/lib/galaxy/dependencies/pinned-requirements.txt index d350ee235066..bae02105d301 100644 --- a/lib/galaxy/dependencies/pinned-requirements.txt +++ b/lib/galaxy/dependencies/pinned-requirements.txt @@ -56,7 +56,7 @@ fs==2.4.14 funcsigs==1.0.2 future==0.18.2; (python_version >= "2.6" and python_full_version < "3.0.0") or (python_full_version >= "3.3.0") galaxy-sequence-utils==1.1.5 -gravity==0.10.0; python_version >= "3.6" +gravity==0.11.0; python_version >= "3.6" greenlet==1.1.2; python_version >= "3" and python_full_version < "3.0.0" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") and (python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.6.0") or python_version >= "3" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") and (python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.6.0") and python_full_version >= "3.5.0" gunicorn==20.1.0; python_version >= "3.5" gxformat2==0.15.0