Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[22.01] Include gravity in sample config #13531

Merged
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
3 changes: 3 additions & 0 deletions lib/galaxy/config/config_manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import requests
import yaml
from boltons.iterutils import remap
from gravity.util import settings_to_sample
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that it won't be possible for gravity to depend on galaxy-config in the future, unless we refactor this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could make it a local import, or publish the config schema separately, but I thought we can do this once we're trying to do this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This broke the test_galaxy_packages tests on CircleCI, I guess because gravity needs to be added to packages/config/requirements.txt .


try:
from pykwalify.core import Core
Expand Down Expand Up @@ -694,6 +695,8 @@ 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":
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)
Expand Down
119 changes: 119 additions & 0 deletions lib/galaxy/config/sample/galaxy.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,125 @@
#
# 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 ``<state_dir>/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

# 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: {}
uwsgi:

# The address and port on which to listen. By default, only listen to
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/dependencies/dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/dependencies/pinned-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down