Commit Graph
55 Commits
Author SHA1 Message Date
Matthias Bernt bb90e3b5dc activate the conda env before the python venv
and install node and yarn via conda if a conda env is used
2023-07-21 00:58:35 +01:00
Nicola Soranzo 39c0000c1b Bump minimum pip version to 20.3 . Ignore `--replace-pip and --no-replace-pip` startup options
Pip 20.3 added support for PEP 600, i.e. manylinux wheels using platform
tags of the form "manylinux_${GLIBCMAJOR}_${GLIBCMINOR}_${ARCH}". Fix
installation of dependencies like pysam 0.20.0 wheels, which otherwise need
to be built from source and can fail as reported by @assuntad23 in
https://gist.github.com/assuntad23/3022db63a6878f044a209961dd40e592

Also:
- Install `wheel` to fix warning like `Using legacy setup.py install for
  beaker, since package 'wheel' is not installed.`
- Drop unnecessary `defaults` channel from conda commands.
- Fix "SC2223: This default assignment may cause DoS due to globbing. Quote
  it." errors reported by `shellcheck -x` .
2023-01-17 15:01:38 +00:00
Nate Coraor 1684da5c15 Don't modify venv activate to set $GRAVITY_STATE_DIR 2022-12-05 12:52:11 -05:00
mvdbeek da334f1e42 Fix first startup when only python3 is on PATH 2022-08-08 16:28:26 +02:00
mvdbeek 6f3bdd39d9 Merge branch 'release_22.01' into dev 2022-04-08 10:13:24 +02:00
Nicola Soranzo 6d53620a52 Respect GRAVITY_STATE_DIR when activating venv
So that:

export GRAVITY_STATE_DIR=/srv/galaxy/gravity
./run.sh

writes gravity state/log files to the right place.
2022-04-06 23:48:18 +01:00
Nicola Soranzo 7ecd7f0cb8 Remove --wait startup option
Follow-up on https://github.com/galaxyproject/galaxy/pull/13071 .
2022-04-05 19:15:23 +01:00
mvdbeek 89e06a06cc Update supervisor config when starting galaxy via run.sh 2022-04-05 11:14:11 +02:00
Nicola Soranzo 00f7522e7e Merge branch 'release_22.01' into dev 2022-03-19 01:57:33 +00:00
mvdbeek e9d2d683d6 Add --capture-output when running gunicorn in daemon mode 2022-03-17 19:34:16 +01:00
mvdbeek fd51314a88 Drop more uWSGI legacy things 2022-03-15 21:32:00 +01:00
mvdbeek 3fa572d612 First pass at supporting --preload and worker_id
We do need to include some kind of worker id in the server_name. If we
don't do this and we start with multiple workers the internal
QueueWorker won't work and multiple processes can pick up the same job
if the web process is also a job handler.
2022-03-10 17:15:37 +01:00
Marius van den BeekandNicola Soranzo bcbdb9184e Don't escape quotes
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2022-02-23 15:43:32 +01:00
Marius van den BeekandNicola Soranzo b439675a38 Tweak comment
And no, we could read out the port from the uwsgi section, or decide to move it elsewhere.

Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2022-02-23 12:59:23 +01:00
mvdbeek 3800ddf6ff Move up GUNICORN_CMD_ARGS 2022-02-23 10:33:44 +01:00
mvdbeek 31dd8e4b46 Fix tool_shed entrypoint and default port 2022-02-22 17:58:28 +01:00
Nate Coraor 6c9d497e82 Only set $GALAXY_DAEMON_LOG when using gravity since other servers have
their own means of setting a log file. Read the supervisor log if it
exists and the daemon log does not, since failure to start Galaxy will
prevent creation of the daemon log file.

When running first startup in CI, attempt to read log files from
multiple places to make debugging different types of failures possible.
2022-01-26 14:50:39 -05:00
Nate Coraor 1d21506f78 Set $GALAXY_DAEMON_LOG when running run.sh --daemon for compatibility. 2022-01-24 15:45:11 -05:00
Nate Coraor 096c75a1fb No magic arg getter for gunicorn means we have to explicitly pass the
sample config if necessary
2022-01-24 14:00:56 -05:00
Nate Coraor 98e1cd0c29 Set gunicorn worker for non-galaxy webapps 2022-01-24 10:20:59 -05:00
Nate Coraor b3bd38be4a Attempt to properly start reports 2022-01-21 15:45:10 -05:00
Nate Coraor 141e9008f4 Not all echos interpret backslash chars (and -e is not standard either) 2022-01-21 14:07:26 -05:00
Nate Coraor 080b92ad25 Add daemon mode options for Gravity 2022-01-21 13:51:53 -05:00
Nate Coraor c9cf15576c Move gunicorn to regular requirements (not just dev) and add uvloop.
Swap circusd for gravity to start dev-mode/run.sh Galaxy.
2022-01-21 13:29:14 -05:00
Nate Coraor a53ef1888d If creating venv, modify activate to set $GRAVITY_STATE_DIR so that
gravity can be used anywhere once the venv is activated.
2022-01-21 09:51:34 -05:00
Nicola Soranzo 72874b74a5 Add tox environment and GitHub workflow for reports startup test
Also:
- Fix tox envlist still using py36
- Partially fix running reports with `APP_WEBSERVER=dev`
2021-12-18 15:56:46 +00:00
Nicola Soranzo 262ab8386c Increase pip minimum version in startup script
Pip <19.0 cannot install abi3 wheels, so for example on Python >3.6 it
would (try to) build a cryptography wheel, which is not needed since
cp36-abi3 wheels are already available on PyPI:
https://cryptography.io/en/latest/faq/#why-are-there-no-wheels-for-my-python3-x-version

Fix https://github.com/galaxyproject/galaxy/issues/13023 .

xref: https://github.com/galaxyproject/planemo/issues/1208#issuecomment-984831111
2021-12-03 11:02:20 +00:00
mvdbeek 8157300d1d Restore pastescript, make new stack depend on APP_WEBSERVER=dev 2021-04-07 14:39:06 +02:00
mvdbeek d97c6e1e21 Set up default logging if running run.sh with --daemon 2021-04-07 14:39:06 +02:00
mvdbeek 47d4e18c3b Replace paster with circusd, add basic functionality to run.sh 2021-04-02 18:47:41 +02:00
Nicola Soranzo 7118b4fa11 Hide "python: not found" error when Python 2 is not installed 2020-04-27 02:32:06 +01:00
Nicola Soranzo da256571e6 Source the full path of conda activate script
Otherwise, if a virtualenv is active on top of conda base env (e.g. when
running py37-first_startup tox test in TravisCI), the wrong `activate`
script is sourced.

Also fix `CONDA_PREFIX` environment variable definition when using a shell
not supported by conda.
2020-02-23 23:06:01 +00:00
Nicola Soranzo f61ae2c42a Don't check if python is from conda when CONDA_EXE env var is set
Since at least version 3.7.4 of the `python` package from the `defaults`
conda channel, `python -V` doesn't reveal its origin any more.

Also some fixes suggested by `shellcheck`.
2020-02-23 23:05:52 +00:00
Nicola Soranzo ca226282f1 Fix startup checks when using a Conda env
Unless `--skip-venv` is specified, Galaxy creates/activates a virtualenv
also when using a Conda environment.
2019-08-19 01:28:35 +01:00
Nicola Soranzo 975c8b605f Fix activation of `_galaxy_` conda env
- Use `conda_activate`, which works also under dash
- Run `conda_activate` also when `$GALAXY_CONDA_ENV` already exists
- Run `virtualenv` when the conda env is active but `$GALAXY_VIRTUAL_ENV`
  does not exist
- Update the default for `GALAXY_CONDA_ENV` in
  scripts/common_startup_functions.sh

Follow-up on https://github.com/galaxyproject/galaxy/pull/6975 .
2018-12-14 00:22:12 +00:00
Nicola Soranzo 992ea5e4b9 Pass through `--daemon` option to gunicorn
Documented at
http://docs.gunicorn.org/en/stable/settings.html#daemon
2018-11-23 14:56:15 +00:00
Nicola Soranzo fbd2284e5d Fix PID file handling for gunicorn
gunicorn uses `--pid`, not `--pid-file`.
2018-11-15 11:27:14 +01:00
mvdbeek b64c82921e Need quotes around export? 2018-10-01 14:06:12 +02:00
mvdbeek 702870c17c Allow starting Galaxy under gunicorn when using galaxy.ini
and starting Galaxy with `APP_WEBSERVER=gunicorn sh run.sh`.
Additional gunicorn cmdline arguments can be passed using
`GUNICORN_CMD_ARGS`. In a first pass this will allow
running planemo {server, test} under python 3, as Paste
has some problems under python 3:

```
galaxy.web.stack INFO 2018-09-29 22:16:00,216 Galaxy server instance 'main' is running
Traceback (most recent call last):
  File "./scripts/paster.py", line 27, in <module>
    serve.run()
  File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/serve.py", line 1055, in run
    invoke(command, command_name, options, args[1:])
  File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/serve.py", line 1061, in invoke
    exit_code = runner.run(args)
  File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/serve.py", line 226, in run
    result = self.command()
  File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/serve.py", line 676, in command
    serve()
  File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/serve.py", line 653, in serve
    server(app)
  File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/loadwsgi.py", line 232, in server_wrapper
    **context.local_conf)
  File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/loadwsgi.py", line 90, in fix_call
    val = callable(*args, **kw)
  File "/home/travis/.planemo/gx_venv_3_release_18.09/lib/python3.6/site-packages/paste/httpserver.py", line 1353, in server_runner
    for name, value in kwargs.items():
RuntimeError: dictionary changed size during iteration
```

That said gunicorn is a nice pure-python alternative to paste going
forward.
2018-09-30 13:18:21 +02:00
Nadia Goué 8077d59fd9 Update common_startup_functions.sh
Not to override tool_shed config file.
2018-07-10 14:47:54 +02:00
Nicola Soranzo 2b8beb69c4 Merge branch 'release_18.01' into release_18.05 2018-06-06 15:58:08 +01:00
Nicola Soranzo aaff474142 Use consistent preference order for config files
1) galaxy.yml
2) galaxy.ini
3) universe_wsgi.ini

Also:
- properly quote variables which may contain spaces
- no need to pass the config file to `./scripts/manage_tool_dependencies.py`
- simplify `scripts/maintenance.sh` by moving the `cd` up and reusing
  functions from `scripts/common_startup_functions.sh`
2018-06-02 03:28:54 +01:00
Nicola Soranzo 0ea8107191 Use separate pid_log_paster_args variable
to store --pid-file and --log-file options of `./scripts/paster.py` .

https://github.com/galaxyproject/galaxy/pull/6239 fixed 3 bugs:

- `GALAXY_RUN_ALL=1 ./run.sh` was reusing the same pid and log files for
  all Galaxy processes;
- `./run.sh restart` was always using `paster.pid` and `paster.log` instead
  of the configured files
- `./run.sh status` was always using `paster.pid`

but also introduced a regression, i.e. the plain `./run.sh` started
writing to the log file instead of the standard output (console).

This fixes the regression by using a separate variable for these options
instead of conflating them in `paster_args` or `server_args`.
2018-06-02 01:09:10 +01:00
Dannon Baker 44b42e7e7e Merge remote-tracking branch 'upstream/release_18.01' into release_18.05 2018-05-31 16:08:55 -04:00
Lance Parsons 88c94fc49b Set pid and log file for paster in server_args
This avoids setting log and pid file in paster_args so that with
GALAXY_RUN_ALL they can be set individually, but ensures they are set
when running paster otherwise.
2018-05-31 12:07:02 -04:00
Lance Parsons ce9b671bd4 Hack paster args to not duplicate pid file stuff for RUN_ALL. 2018-05-29 11:57:30 -04:00
Nate Coraor b3eff87a1b Clean up and useability enhancements 2018-04-04 21:03:08 -04:00
Nate Coraor 8261a2398a Make the startup scripts play just as nicely with Conda as they do with
virtualenv.
2018-04-04 16:38:01 -04:00
Nate Coraor 44c291bc66 Merge remote-tracking branch 'origin/dev' into ini_to_yaml_config 2018-01-18 12:30:05 -05:00
Dannon Baker a5cef0fe68 Fixes the --no-client-build startup option (and renames it --skip-client-build, too) 2018-01-10 12:04:32 -05:00