gravity - Galaxy Server Administration
Installing this will give you an executables,
galaxy which is used to
manage Galaxy. A virtualenv will automatically be created for your Galaxy
server. It's a good thing.
Python 2.7 is required. Sadly, Python 3 won't work, because supervisor doesn't support it, although work is in progress.
pip install gravity
Add this section to your
tool_shed_wsgi.ini to set:
instance_name = string # override the default auto-generated instance name galaxy_root = /path # if galaxy is not at ../ or ./ from the config file virtualenv = /path # override default auto-generated virtualenv path (it # will be created if it does not exist) log_dir = /path # where to log galaxy server output. for uwsgi you # probably want to use uwsgi's logto option though uwsgi_path = /path # explicit path to uwsgi, otherwise it will be found on # $PATH. Or, the special value `install`, which will # cause it to be installed into service's virtualenv
Potentially useful information, tricks, etc.:
- Unless you set different state dirs with
$GRAVITY_STATE_DIR, there will only be one supervisord for all of your galaxy instances. But they will be separated out by a generated
instance_name. You can override this with
- To put configs (galaxy configs, galaxy + reports, whatever) into the
same instance, set their
instance_nameto the same string in each config's
[galaxy:server]. This puts them into a single supervisor group, which may be what you want, although note that any start/stop/restart/etc. is performed on the entire group, which may not be what you want.
- The config manager generally views things in terms of config files.
If you change the virtualenv or
galaxy_rootin a config file, it will not change that value for all services in the instance (supervisor group), it will only change it for the services started from that config.
- Anything you drop in to
$GRAVITY_STATE_DIR/supervisor/supervisord.conf.dwill be picked up by supervisord on a
galaxy supervisorctl updateor just
job_conf.xmlparsed corresponds to the galaxy config, it'll check the path in
[app:main]or default to
galaxy_root/config/job_conf.xmlif that file exists. If handlers in
job_conf.xmlhave a corresponding
galaxy.ini, they will be started using Paste. If there is not a corresponding
[server:]they will be started as a "standalone" server with
galaxy -h for help. Subcommands also support
Register a Galaxy, Reports, or Tool Shed server config with the process manager, create a virtualenv, create supervisor configs, and update. Does not start.
List config files registered with the process manager.
List known instances and services.
Show stored configuration details for the named config file.
rename /path/to/old.ini /path/to/new.ini
Use this if you move your config.
Deregister a Galaxy et. al. server config., or all configs referencing
Roughly what you'd expect. If
instance_name isn't provided, perform
the operation on all known instances.
If you call
start from the root (or from 1 subdirectory deep) of a Galaxy
config/galaxy.ini if it exists, or else
config/galaxy.ini.sample will automatically be registered with
add and then
galaxy start will start the newly added server.
The same as restart but uWSGI master processes will only receive a
SIGHUP so the workers restart but the master stays up.
The same as reload but Paste servers will be restarted sequentially, and the next one will not be restarted until the previous one is up and accepting requests.
Figure out what has changed in configs, which could be:
- changes to
- adding or removing
- adding or removing a
- adding or removing handlers in
This will perform the operation for all registered configs, which may cause unintended service restarts.
Any needed changes to supervisor configs will be performed and then
supervisorctl update will be called. You will need to do a
galaxy start after this to start any newly added instances (or
possibly even old instances, since adding new programs to a group in
supervisor causes the entire group to be stopped).
Update is called automatically for the
Pass through directly to supervisor