You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/07/07 18:31:10 UTC
[GitHub] [airflow] jbkc85 edited a comment on issue #16846: Better integration with systemd
jbkc85 edited a comment on issue #16846:
URL: https://github.com/apache/airflow/issues/16846#issuecomment-875834141
fwiw, and just to share:
```[Unit]
Description=airflow Scheduler v2.1.1.1
Documentation=https://airflow.apache.org/
[Service]
StandardOutput=null
Type=simple
ExecStartPre=-/bin/docker rm airflow-scheduler
ExecStart=/bin/docker run --rm --name airflow-scheduler \
--env-file /opt/airflow/config/airflow.env \
--log-driver json-file --log-opt max-size=250m --log-opt max-file=2 \
-v /opt/airflow:/opt/airflow \
-v /var/log/airflow:/var/log/airflow \
-v /opt/spark/live/conf:/opt/spark/live/conf \
--workdir /opt/airflow/dags/live \
our.repo.com/airflow:v2.1.1.1 \
scheduler
ExecStop=/bin/docker kill airflow-scheduler
Restart=on-failure
RestartSec=60
[Install]
WantedBy=multi-user.target
```
^ is how we run via systemd atm. You can do similar (if you avoid docker completely) as we have done, but we wanted to stage our instance towards running in kubernetes in the future - so we have it basically deploy a docker container instead via systemd. The only issue that we are encountering at the moment is the airflow-webserver.pid isn't cleaned up all the time by this process, so we need to add that in there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org