From 327984db53954f3c04f49579b561837c59dedc80 Mon Sep 17 00:00:00 2001 From: Bolke de Bruin Date: Mon, 23 Nov 2015 19:32:54 +0100 Subject: [PATCH] Add contents and description --- scripts/systemd/README | 6 ++++++ scripts/systemd/airflow-flower.service | 17 +++++++++++++++++ scripts/systemd/airflow-kerberos.service | 17 +++++++++++++++++ scripts/systemd/airflow-scheduler.service | 17 +++++++++++++++++ scripts/systemd/airflow-webserver.service | 17 +++++++++++++++++ scripts/systemd/airflow-worker.service | 17 +++++++++++++++++ 6 files changed, 91 insertions(+) diff --git a/scripts/systemd/README b/scripts/systemd/README index e69de29bb2..55fa5d7508 100644 --- a/scripts/systemd/README +++ b/scripts/systemd/README @@ -0,0 +1,6 @@ +The systemd files in this directory are tested on RedHat based systems. Copy (or link) them to /usr/lib/systemd/system. +You can then start the different servers by using systemctl start . Enabling services can be done by issuing + systemctl enable . By default the environment configuration points to /etc/sysconfig/airflow where you can +override defaults like AIRFLOW_HOME. + +With some minor changes they probably work on other systemd systems. \ No newline at end of file diff --git a/scripts/systemd/airflow-flower.service b/scripts/systemd/airflow-flower.service index e69de29bb2..e181f71b49 100644 --- a/scripts/systemd/airflow-flower.service +++ b/scripts/systemd/airflow-flower.service @@ -0,0 +1,17 @@ +[Unit] +Description=Airflow celery flower +After=network.target postgresql.service mysql.service redis.service rabbitmq-server.service +Wants=postgresql.service mysql.service redis.service rabbitmq-server.service + +[Service] +EnvironmentFile=/etc/sysconfig/airflow +User=airflow +Group=airflow +Type=simple +ExecStart=/bin/airflow flower +KillMode=process +Restart=on-failure +RestartSec=42s + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/scripts/systemd/airflow-kerberos.service b/scripts/systemd/airflow-kerberos.service index e69de29bb2..06b24bbc02 100644 --- a/scripts/systemd/airflow-kerberos.service +++ b/scripts/systemd/airflow-kerberos.service @@ -0,0 +1,17 @@ +[Unit] +Description=Airflow kerberos ticket renewer +After=network.target postgresql.service mysql.service redis.service rabbitmq-server.service +Wants=postgresql.service mysql.service redis.service rabbitmq-server.service + +[Service] +EnvironmentFile=/etc/sysconfig/airflow +User=airflow +Group=airflow +Type=simple +ExecStart=/bin/airflow kerberos +KillMode=process +Restart=on-failure +RestartSec=42s + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/scripts/systemd/airflow-scheduler.service b/scripts/systemd/airflow-scheduler.service index e69de29bb2..2806dce3b8 100644 --- a/scripts/systemd/airflow-scheduler.service +++ b/scripts/systemd/airflow-scheduler.service @@ -0,0 +1,17 @@ +[Unit] +Description=Airflow scheduler daemon +After=network.target postgresql.service mysql.service redis.service rabbitmq-server.service +Wants=postgresql.service mysql.service redis.service rabbitmq-server.service + +[Service] +EnvironmentFile=/etc/sysconfig/airflow +User=airflow +Group=airflow +Type=simple +ExecStart=/bin/airflow scheduler -n 5 +KillMode=process +Restart=on-failure +RestartSec=42s + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/scripts/systemd/airflow-webserver.service b/scripts/systemd/airflow-webserver.service index e69de29bb2..e77e85f4d6 100644 --- a/scripts/systemd/airflow-webserver.service +++ b/scripts/systemd/airflow-webserver.service @@ -0,0 +1,17 @@ +[Unit] +Description=Airflow webserver daemon +After=network.target postgresql.service mysql.service redis.service rabbitmq-server.service +Wants=postgresql.service mysql.service redis.service rabbitmq-server.service + +[Service] +EnvironmentFile=/etc/sysconfig/airflow +User=airflow +Group=airflow +Type=simple +ExecStart=/bin/airflow webserver +KillMode=process +Restart=on-failure +RestartSec=42s + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/scripts/systemd/airflow-worker.service b/scripts/systemd/airflow-worker.service index e69de29bb2..8d2edbcd76 100644 --- a/scripts/systemd/airflow-worker.service +++ b/scripts/systemd/airflow-worker.service @@ -0,0 +1,17 @@ +[Unit] +Description=Airflow celery worker daemon +After=network.target postgresql.service mysql.service redis.service rabbitmq-server.service +Wants=postgresql.service mysql.service redis.service rabbitmq-server.service + +[Service] +EnvironmentFile=/etc/sysconfig/airflow +User=airflow +Group=airflow +Type=simple +ExecStart=/bin/airflow worker +KillMode=process +Restart=on-failure +RestartSec=42s + +[Install] +WantedBy=multi-user.target \ No newline at end of file