Infra/Airflow(2)
-
Airflow 모니터링 (Python)
import subprocess def check_celery(): cmd = "/home/ubuntu/airflow/bin/celery --app airflow.executors.celery_executor.app inspect ping" result = subprocess.getoutput(cmd) if 'pong' in result: return 0 else: return result def check_db(): cmd = '/home/ubuntu/airflow/bin/airflow db check' result = subprocess.getoutput(cmd) if 'Connection successful' in result: return 1 else: return result def check_..
2022.08.24 -
[Airflow] ubuntu 18, python 3.6 airflow
Dependencies sudo apt-get update sudo apt-get install -y \ python3-pip \ postgresql \ postgresql-contrib \ redis \ nginx Configure postresql sudo -u postgres bash -c "createdb airflow" sudo -u postgres bash -c "createuser airflow --pwprompt" Create airflow user sudo adduser airflow su airflow cd ~/ Install airflow (pip) pip3 install --upgrade pip pip3 install --user apache-airflow[postgres,celer..
2021.10.19