Skip to content
This repository has been archived by the owner on Nov 25, 2019. It is now read-only.

Commit

Permalink
Use redis as the Airflow broker (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfusiello authored Sep 16, 2019
1 parent 66babb7 commit b9a9459
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion config/airflow.dev.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ worker_log_server_port = 8793
# information.
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#broker-settings
# broker_url = sqla+mysql://airflow:airflow@localhost:3306/airflow
broker_url = sqla+postgresql+psycopg2://postgres:example@db/airflow-db
broker_url = redis://airflow-broker

# The Celery result_backend. When a job finishes, it needs to update the
# metadata of the job. Therefore it will post a message on a message bus,
Expand Down
14 changes: 7 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ services:
POSTGRES_DB: airflow-db
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 30s
retries: 3

# only used to tag the base image ready to be uploaded to dockerhub
app:
Expand All @@ -48,6 +45,11 @@ services:
image: libero/jats-ingester:${IMAGE_TAG:-master}
command: sh

airflow-broker:
image: redis:5.0.5-alpine
healthcheck:
test: ["CMD", "redis-cli", "PING"]

airflow_initdb:
&airflow
build:
Expand All @@ -57,8 +59,9 @@ services:
depends_on:
- app
- db
- airflow-broker
environment:
WAIT_HOSTS: db:5432
WAIT_HOSTS: db:5432, airflow-broker:6379
AIRFLOW_CONN_REMOTE_LOGS: http://s3:9000?host=http://s3:9000
volumes:
- ./dags:/airflow/dags
Expand All @@ -72,9 +75,6 @@ services:
- 8080:8080
healthcheck:
test: ["CMD-SHELL", "python ./scripts/airflow_webserver_healthcheck.py"]
interval: 30s
timeout: 30s
retries: 3

airflow_scheduler:
<<: *airflow
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apache-airflow[postgres, s3, celery]==1.10.3
apache-airflow[redis, postgres, s3, celery]==1.10.3
Wand==0.5.4
Flask==1.0.3

0 comments on commit b9a9459

Please sign in to comment.