Skip to content
This repository was archived by the owner on Aug 14, 2021. It is now read-only.

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.

Virtualenv

Create a Python 3 virtualenv in the repo directory.

cd /home/cromwell/cromwell-service
python3 -m venv venv

Wrappers

This 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 script

cromwell-server:

#!/usr/bin/env bash
java -Dconfig.file=/etc/cromwell.conf -jar /usr/local/bin/cromwell-45.jar server

Cromwell frontend script

cromwell-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/venv

Systemd Service files

Create two files in /etc/systemd/system, cromwell.service and cromwell-frontend.service.

Cromwell server 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

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

Enable the services

sudo systemctl enable cromwell.service
sudo systemctl enable cromwell-frontend.service

Clone this wiki locally