This repository was archived by the owner on Aug 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Systemd Configuration
Daniel Patrick Foose edited this page Aug 28, 2019
·
2 revisions
You can persist Cromwell and this service by creating systemd services.
In this example, the cromwell and womtool JARS have been downloaded to /usr/local/bin, and the cromwell-service repository has been cloned in /home/cromwell.
Create a Python 3 virtualenv in the repo directory.
cd /home/cromwell/cromwell-service
python3 -m venv venvThis step is not necessary, but it makes things nice.
Create two files in /usr/local/bin, cromwell-server and cromwell-frontend, and set them to executable (sudo chmod +x cromwell-server cromwell-frontend).
cromwell-server:
#!/usr/bin/env bash
java -Dconfig.file=/etc/cromwell.conf -jar /usr/local/bin/cromwell-45.jar servercromwell-frontend:
#!/usr/bin/env bash
export DB_URI="postgresql+psycopg2://cromwell:7u8oqadixrxmIhfgKWXDTDPz0AJVxCJX@localhost:5432/cromwell_frontend"
export WORKFLOW_DEFINITION_DIR="/home/cromwell/workflows"
export SECRET="KIZXUxGPusmR48vD8Eni5KcfJX91iDju"
uwsgi --ini /home/cromwell/cromwell-frontend/uwsgi_socket.ini -H /home/cromwell/cromwell-frontend/venvCreate two files in /etc/systemd/system, cromwell.service and cromwell-frontend.service.
cromwell.service:
[Unit]
Description=Cromwell job server
After=syslog.target
[Service]
SyslogIdentifier=Cromwell
WorkingDirectory=/home/cromwell
ExecStart=/usr/local/bin/cromwell-server
User=darwin
Type=simple
[Install]
WantedBy=multi-user.target
cromwell-frontend.service
[Unit]
Description=Cromwell job server frontend
After=syslog.target
[Service]
SyslogIdentifier=Cromwell Frontend
WorkingDirectory=/home/cromwell
ExecStart=/usr/local/bin/cromwell-frontend
User=darwin
Type=simple
[Install]
WantedBy=multi-user.target
sudo systemctl enable cromwell.service
sudo systemctl enable cromwell-frontend.service