mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-23 01:39:27 +02:00
add systemd files for airflow+superset
This commit is contained in:
parent
09c0794175
commit
0f395eae21
24
airflow/systemd/airflow
Normal file
24
airflow/systemd/airflow
Normal file
@ -0,0 +1,24 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# This file is the environment file for Airflow. Put this file in /etc/sysconfig/airflow per default
|
||||
# configuration of the systemd unit files.
|
||||
#
|
||||
AIRFLOW_HOME=/home/airflow/airflow
|
||||
AIRFLOW_CONFIG=/home/airflow/airflow/airflow.cfg
|
||||
PATH=/home/airflow/.virtualenvs/airflow/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
|
16
airflow/systemd/airflow-flower.service
Normal file
16
airflow/systemd/airflow-flower.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Airflow celery flower
|
||||
After=network.target postgresql.service redis-server.service
|
||||
Wants=postgresql.service redis-server.service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/default/airflow
|
||||
User=airflow
|
||||
Group=airflow
|
||||
Type=simple
|
||||
ExecStart=/home/airflow/.virtualenvs/airflow/bin/airflow flower --port=5555
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
16
airflow/systemd/airflow-scheduler.service
Normal file
16
airflow/systemd/airflow-scheduler.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Airflow scheduler daemon
|
||||
After=network.target postgresql.service redis-server.service
|
||||
Wants=postgresql.service redis-server.service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/default/airflow
|
||||
User=airflow
|
||||
Group=airflow
|
||||
Type=simple
|
||||
ExecStart=/home/airflow/.virtualenvs/airflow/bin/airflow scheduler
|
||||
Restart=always
|
||||
RestartSec=5s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
18
airflow/systemd/airflow-webserver.service
Normal file
18
airflow/systemd/airflow-webserver.service
Normal file
@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=Airflow webserver daemon
|
||||
After=network.target postgresql.service redis-server.service
|
||||
Wants=postgresql.service redis-server.service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/default/airflow
|
||||
User=airflow
|
||||
Group=airflow
|
||||
Type=simple
|
||||
RuntimeDirectory=airflow
|
||||
ExecStart=/home/airflow/.virtualenvs/airflow/bin/airflow webserver --pid /run/airflow/webserver.pid
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
16
airflow/systemd/airflow-worker.service
Normal file
16
airflow/systemd/airflow-worker.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Airflow celery worker daemon
|
||||
After=network.target postgresql.service redis-server.service
|
||||
Wants=postgresql.service redis-server.service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/default/airflow
|
||||
User=airflow
|
||||
Group=airflow
|
||||
Type=simple
|
||||
ExecStart=/home/airflow/.virtualenvs/airflow/bin/airflow worker
|
||||
Restart=on-failure
|
||||
RestartSec=10s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
4
superset/systemd/superset
Normal file
4
superset/systemd/superset
Normal file
@ -0,0 +1,4 @@
|
||||
PYTHONPATH=/home/superset/superset
|
||||
SUPERSET_HOME=/home/superset/superset
|
||||
FLASK_APP=superset
|
||||
GUNICORN_CMD_ARGS="--workers=4 --timeout=60 --bind=0.0.0.0:8088 --limit-request-line=0 --limit-request-field_size=0"
|
16
superset/systemd/superset-flower.service
Normal file
16
superset/systemd/superset-flower.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Superset celery flower
|
||||
After=network.target postgresql.service redis-server.service
|
||||
Wants=postgresql.service redis-server.service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/default/superset
|
||||
User=superset
|
||||
Group=superset
|
||||
Type=simple
|
||||
ExecStart=/home/superset/.virtualenvs/superset/bin/celery flower --app=superset.tasks.celery_app:app --port=5555
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
16
superset/systemd/superset-webserver.service
Normal file
16
superset/systemd/superset-webserver.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Superset webserver daemon
|
||||
After=network.target postgresql.service redis-server.service
|
||||
Wants=postgresql.service redis-server.service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/default/superset
|
||||
User=superset
|
||||
Group=superset
|
||||
Type=simple
|
||||
ExecStart=/home/superset/.virtualenvs/superset/bin/gunicorn superset:app
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
16
superset/systemd/superset-worker.service
Normal file
16
superset/systemd/superset-worker.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Superset celery worker daemon
|
||||
After=network.target postgresql.service redis-server.service
|
||||
Wants=postgresql.service redis-server.service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/default/superset
|
||||
User=superset
|
||||
Group=superset
|
||||
Type=simple
|
||||
ExecStart=/home/superset/.virtualenvs/superset/bin/celery worker --app=superset.tasks.celery_app:app --pool=prefork -Ofair -c 4
|
||||
Restart=on-failure
|
||||
RestartSec=10s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user