Reputation: 5144
I am using ubuntu 16.04 and virtualenvwrapper for the virtual environment. For production, I want to run automatically Airflow scheduler with Systemd.
How can I configure Airflow scheduler in a virtual environment and within Systemd?
Upvotes: 0
Views: 2312
Reputation: 6548
There are example systemd configuration files for each airflow component in https://github.com/apache/incubator-airflow/tree/1.9.0/scripts/systemd. Then just make sure virtualenv path for airflow, for example, ExecStart=/my/project/venv/bin/airflow scheduler
. If your airflow home directory is different from the default (~/airflow), you can override that with Environment="AIRFLOW_HOME=/my/airflow
.
Upvotes: 4