From a9420d24b5df394de1b8e73e428a2276bcfa2f13 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 21 Mar 2022 13:44:37 +0100 Subject: [PATCH] Drop remaining references to uWSGI --- .k8s_ci.Dockerfile | 2 +- contrib/galaxy_supervisor.conf | 45 ------------------- doc/source/admin/config_logging.rst | 16 ++----- doc/source/admin/migrating_to_gunicorn.md | 3 +- doc/source/admin/proxy_package_layout.rst | 2 +- .../admin/special_topics/interactivetools.rst | 1 - .../sample/job_conf.xml.sample_advanced | 22 ++++----- pyproject.toml | 1 - 8 files changed, 19 insertions(+), 73 deletions(-) delete mode 100644 contrib/galaxy_supervisor.conf diff --git a/.k8s_ci.Dockerfile b/.k8s_ci.Dockerfile index 0129ae9d591..4042f77ea1d 100644 --- a/.k8s_ci.Dockerfile +++ b/.k8s_ci.Dockerfile @@ -191,4 +191,4 @@ ENV GALAXY_CONFIG_CONDA_AUTO_INIT=False ENTRYPOINT ["tini", "--"] # [optional] to run: -CMD uwsgi --yaml config/galaxy.yml +CMD galaxy diff --git a/contrib/galaxy_supervisor.conf b/contrib/galaxy_supervisor.conf deleted file mode 100644 index ca61fdb6be5..00000000000 --- a/contrib/galaxy_supervisor.conf +++ /dev/null @@ -1,45 +0,0 @@ -# This is a sample supervisor config file. -# In this configuration, 2 handlers and 1 uwsgi (uwsgi is more performant than the default Paste) instance with 2 processes and 2 threads will be started. -# In order for this to work, you will need to have a [uwsgi] section in galaxy.ini, as such: -# -# [uwsgi] -# master = True -# -# Further, this assumes uwsgi has been installed through pip into a virtualenv (/home/galaxy/galaxy/.venv/, in this example). -# If this is not the case, adjust the path to uwsgi accordingly. -# If uwsgi was not installed through pip, include "--plugin python" in the uwsgi command. -# This configuration has been tested with galaxy release_16.01 and uWSGI==2.0.12. -# This assumes galaxy is installed in /home/galaxy/galaxy, so change occurences of /home/galaxy/galaxy accordingly. -# If you want to run galaxy under a different username, change "user = galaxy" to "user = ". -# You will probably want to proxy uwsgi (you can't connect with a browser to uwsgi port 4001) with nginx or apache, -# see https://galaxyproject.org/admin/config/performance/scaling/#apache -# or https://galaxyproject.org/admin/config/performance/scaling/#nginx - -[program:galaxy_web] -command = /home/galaxy/galaxy/.venv/bin/uwsgi --virtualenv /home/galaxy/galaxy/.venv --ini-paste /home/galaxy/galaxy/config/galaxy.ini --logdate --master --processes 2 --threads 2 --logto /home/galaxy/galaxy/uwsgi.log --socket 127.0.0.1:4001 --pythonpath lib --stats 127.0.0.1:9191 -directory = /home/galaxy/galaxy -umask = 022 -autostart = true -autorestart = true -startsecs = 20 -user = galaxy -environment = PATH=/home/galaxy/galaxy/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin,PYTHONHOME=/home/galaxy/galaxy/.venv -numprocs = 1 -stopsignal = INT -startretries = 15 - -[program:handler] -command = /home/galaxy/galaxy/.venv/bin/python ./lib/galaxy/main.py -c /home/galaxy/galaxy/config/galaxy.ini --server-name=handler%(process_num)s --log-file=/home/galaxy/galaxy/handler%(process_num)s.log -directory = /home/galaxy/galaxy -process_name = handler%(process_num)s -numprocs = 2 -umask = 022 -autostart = true -autorestart = true -startsecs = 20 -user = galaxy -environment = PYTHONHOME=/home/galaxy/galaxy/.venv -startretries = 15 - -[group:galaxy] -programs = handler, galaxy_web diff --git a/doc/source/admin/config_logging.rst b/doc/source/admin/config_logging.rst index e5730056d33..faeba11ddc5 100644 --- a/doc/source/admin/config_logging.rst +++ b/doc/source/admin/config_logging.rst @@ -50,18 +50,10 @@ Advanced Configuration ---------------------------- For more useful and manageable logging when running Galaxy with forking application stacks where multiple -Galaxy server processes are forked after the Galaxy application is loaded, some extensions to standard Python -:mod:`logging` are available in Galaxy: - -- Two custom fields (aka Python :class:`logging.LogRecord` attributes) identifying the uWSGI worker ID and mule ID can - be added to log messages: ``%(worker_id)s`` and ``%(mule_id)s``. These fields aid in associating log messages with the - Galaxy server processes that emitted them. They are included in the default log format (found in - :data:`galaxy.web.stack.UWSGIApplicationStack.log_format`) when using uWSGI and are available for use in custom log - formats. - -- A custom ``filename_template`` config option is available to :class:`logging.FileHandler` (or derivative class) log - handler definitions so that multiple file logging is possible. Without this custom option, all forked Galaxy server - processes would only be able to log to a single combined log file, which can be very difficult to work with. +Galaxy server processes are forked after the Galaxy application is loaded, a custom ``filename_template`` config option +is available to :class:`logging.FileHandler` (or derivative class) log handler definitions so that multiple file logging is possible. +Without this custom option, all forked Galaxy server processes would only be able to log to a single combined log file, +which can be very difficult to work with. YAML ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/source/admin/migrating_to_gunicorn.md b/doc/source/admin/migrating_to_gunicorn.md index f5ed9566f40..f83f967634e 100644 --- a/doc/source/admin/migrating_to_gunicorn.md +++ b/doc/source/admin/migrating_to_gunicorn.md @@ -2,7 +2,8 @@ ## Why do we migrate away from uWSGI -Starting with Galaxy release 22.01 the default application webserver is [Gunicorn](https://gunicorn.org/), which replaces [uWSGI](https://uwsgi-docs.readthedocs.io/en/latest/). We will remove support for running Galaxy under uWSGI in Galaxy release 22.05. +Starting with Galaxy release 22.01 the default application webserver is [Gunicorn](https://gunicorn.org/), which replaces [uWSGI](https://uwsgi-docs.readthedocs.io/en/latest/). +We have removed support for running Galaxy under uWSGI in Galaxy release 22.05. We have made this move because uWSGI support for newer Python versions has been problematic and because we have modernized the API portion of our backend. The Galaxy web application is now an ASGI application driven by [FastAPI](https://fastapi.tiangolo.com/) and [Starlette](https://www.starlette.io/). diff --git a/doc/source/admin/proxy_package_layout.rst b/doc/source/admin/proxy_package_layout.rst index 1cde42234eb..af82deac93e 100644 --- a/doc/source/admin/proxy_package_layout.rst +++ b/doc/source/admin/proxy_package_layout.rst @@ -89,7 +89,7 @@ without enclosing them in any sort of block: .. code-block:: nginx - uwsgi_read_timeout 180; + proxy_read_timeout 180; client_max_body_size 10g; ssl_certificate /etc/nginx/ssl/server.crt; ssl_certificate_key /etc/nginx/ssl/server.key; diff --git a/doc/source/admin/special_topics/interactivetools.rst b/doc/source/admin/special_topics/interactivetools.rst index 1bea5ac37ca..60364dc4f53 100644 --- a/doc/source/admin/special_topics/interactivetools.rst +++ b/doc/source/admin/special_topics/interactivetools.rst @@ -34,7 +34,6 @@ Some important benefits of using Galaxy InteractiveTools - If you accidentally close the **InteractiveTool browser window**, you can **regain access** by selecting from a **list of active InteractiveTools** - A single **InteractiveTool** can **grant access** to **multiple running applications, servers, and interfaces** - **InteractiveTools** can be **added to** Galaxy **Workflows** -- **Native, out-of-the box support for InteractiveTools** in Galaxy via uWSGI proxying - **InteractiveTools** are **bonafide Galaxy Tools**; just specify **tool_type as "interactive"** and list the ports you want to expose - **InteractiveTools** can be **added** to and **installed from the ToolShed**. - **R Shiny apps**, **Javascript-based VNC** access to desktop environments, **genome-browsers-in-a-box**, **interactive notebook environments**, etc, are all possible with **InteractiveTools** diff --git a/lib/galaxy/config/sample/job_conf.xml.sample_advanced b/lib/galaxy/config/sample/job_conf.xml.sample_advanced index 76f35416fed..716a35a31a4 100644 --- a/lib/galaxy/config/sample/job_conf.xml.sample_advanced +++ b/lib/galaxy/config/sample/job_conf.xml.sample_advanced @@ -113,7 +113,7 @@ scratch directory available on compute). --> @@ -390,7 +390,7 @@ - `assign_with` - How jobs should be assigned to handlers. The value can be a single method or a comma-separated list that will be tried in order. The default depends on whether any handlers and a job - handler "pool" (such as uWSGI mules in a `job-handlers` farm) are configured. Valid methods are + handler "pool" are configured. Valid methods are explained in detail in the documentation referenced above and have the values: - `mem-self` - In-memory Self Assignment @@ -549,7 +549,7 @@ command. --> - @@ -901,8 +901,8 @@ 16000 8 BigMem - /path/to/file/with/hosts/to/be/excluded/one_per_line.txt @@ -927,8 +927,8 @@ bgruening/galaxy-stable - Unless the job destination specifies an override - with docker_container_id_override. If neither of + Unless the job destination specifies an override + with docker_container_id_override. If neither of these is set a default container can be specified with docker_default_container_id. The resolved container ID will be passed along to condor as @@ -962,7 +962,7 @@ handler will be reused for the resubmitted job. The ``destination`` attriubte is optional, if not present the job's original destination will be reused for the re-submission. The ``delay`` attribute is optional, if present it will cause the job to - delay for that number of seconds before being re-submitted. + delay for that number of seconds before being re-submitted. --> --time=00:05:00 --nodes=1 @@ -1090,12 +1090,12 @@ centos:latest - false - diff --git a/pyproject.toml b/pyproject.toml index bcaa54aea77..a19e416ab85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,7 +85,6 @@ pysam = "*" python = ">=3.7,<4" python-dateutil = "*" python-multipart = "*" # required to support form parsing in FastAPI/Starlette -pyuwsgi = "*" PyYAML = "*" refgenconf = ">=0.12.0" requests = "*"