TL;DR These are systemd units for galaxyweb and the handlers.
I came across the most interesting problem and I thought I'd share a solution in case this comes up for someone else.
We use LDAP. Specifically LDAPs.
This became an issue in specific cases with supervisord. Namely supervisord could not communicate with the LDAP server because of a very specific TLS issue of an unknown cause. Python was to blame except TLS communication succeeded when I ran a python script. It only failed for supervisor.
This caused a problem because in order for galaxy to work with slurm the handlers had to run as the user 'galaxy'. Because of this TLS failure supervisord could not determine the UID of 'galaxy'. This was indicated in supervisord's logs. "
"galaxy": unknown UID
Now I understand that the galaxy people love supervisor. I do too but in this case supervisor (or some sharp moving part in the chain) was unable to communicate the LDAP server. I need another solution.
I could not find a systemd unit for galaxy-web or for the handlers. So I created one, and all was well. I thought I'd share this solution:
/etc/systemd/system/galaxy-handler\@.service
[Unit]
Description=Galaxy Handlers
Documentation=
After=network.target
After=time-sync.target
[Service]
PermissionsStartOnly=true
Type=idle
ExecStart=
PIDFile=
User=galaxy
Group=galaxy
Restart=on-abort
WorkingDirectory=/storage/app/galaxy/galaxy-csm9-server/galaxy
TimeoutStartSec=10
ExecStart=/storage/app/galaxy/galaxy-csm9-server/.venv/bin/python ./lib/galaxy/main.py -c /storage/app/galaxy/galaxy-csm9-server/config/galaxy.ini --server-name=handler%I --log-file=/storage/app/galaxy/galaxy-csm9-server/log/handler%I.log
Command to start the handlers:
systemctl restart galaxy-handler@{0..3}.service
File /etc/systemd/system/galaxy-web.service
[Unit]
Description=Galaxy Web
Documentation=
After=network.target
[Service]
ExecStart=/storage/app/galaxy/galaxy-csm9-server/.venv/bin/uwsgi --virtualenv /storage/app/galaxy/galaxy-csm9-server/.venv --ini-paste /storage/app/galaxy/galaxy-csm9-server/config/galaxy.ini --logdate --master --processes 1 --threads 2 --logto /storage/app/galaxy/galaxy-csm9-server/log/uwsgi.log --socket 127.0.0.1:4001 --pythonpath lib --stats 127.0.0.1:9191 -b 16384
# PIDFile=/var/run/galaxy-web.pid
User=galaxy
Group=galaxy
Restart=on-abort
WorkingDirectory=/storage/app/galaxy/galaxy-csm9-server/galaxy
Environment=PATH=/storage/app/galaxy/galaxy-csm9-server/.venv:/storage/app/galaxy/galaxy-csm9-server/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# TimeoutStartSec=30
HTH; HAND
Chad Matsalla