manageable data pipelines with airflow - pywaw |...

57
@higrys, @sprzedwojski GDG DevFest Warsaw 2018 Manageable data pipelines with Airflow (and Kubernetes)

Upload: others

Post on 24-Feb-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Manageable data pipelines with Airflow

(and Kubernetes)

Page 2: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Page 3: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Airflow

Airflow is a platform to programmatically author, schedule and monitor workflows.

Dynamic/ElegantExtensible

Scalable

Page 4: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Workflows

Source: https://medium.com/@dustinstansbury/understanding-apache-airflows-key-concepts-a96efed52b1a

Page 5: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Companies using Airflow(>200 officially)

Page 6: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Data Pipelinehttps://xkcd.com/2054/

Page 7: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

GDG DevFest Warsaw 2018 @higrys, @sprzedwojski

Airflow vs. other workflow platforms

● Programming workflows

○ writing code not XML

○ versioning as usual

○ automated testing as usual

○ complex dependencies between tasks

● Managing workflows

○ aggregate logs in one UI

○ tracking execution

○ re-running, backfilling (run all missed runs)

Page 8: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Airflow use cases

● ETL jobs

● ML pipelines

● Regular operations:

○ Delivering data

○ Performing backups

● ...

Page 9: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Core concepts - Directed Acyclic Graph (DAG)

Source: https://github.com/apache/incubator-airflow/blob/master/airflow/contrib/example_dags/example_twitter_README.md

Page 10: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Core concepts - Operators

Source: https://blog.usejournal.com/testing-in-airflow-part-1-dag-validation-tests-dag-definition-tests-and-unit-tests-2aa94970570c

Page 11: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Operator types

● Action Operators

○ Python, Bash, Docker, GCEInstanceStart, ...

● Sensor Operators

○ S3KeySensor, HivePartitionSensor,

BigtableTableWaitForReplicationOperator , ...

● Transfer Operators

○ MsSqlToHiveTransfer, RedshiftToS3Transfer, …

Page 12: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

class ExampleOperator(BaseOperator):

def execute(self, context):

# Do something

pass

Operator and Sensor

Page 13: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

class ExampleOperator(BaseOperator):

def execute(self, context):

# Do something

pass

class ExampleSensorOperator(BaseSensorOperator):

def poke(self, context):

# Check if the condition occurred

return True

Operator and Sensor

Page 14: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Operator good practices

● Idempotent

● Atomic

● No direct data sharing

○ Small portions of data between tasks: XCOMs

○ Large amounts of data: S3, GCS, etc.

Page 15: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Core concepts - Tasks, TaskInstances, DagRuns

Source: https://medium.com/@dustinstansbury/understanding-apache-airflows-key-concepts-a96efed52b1a

Page 16: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Show me the code!

Page 17: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018 Source: https://www.logolynx.com/images/logolynx/0b/0b42e766caee6dcd7355c1c95ddaaa1c.png

Page 18: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018 Source: http://www.faicoach.com/wp-content/uploads/2017/10/cash-burn.jpg

Page 19: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

The solution

Sources: https://services.garmin.cn/appsLibraryBusinessServices_v0/rest/apps/9b5dabf3-925b

https://malloc.fi/static/images/slack-memory-management.pnghttps://i.gifer.com/9GXs.gif

Page 20: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Solution components

● Generic

○ BashOperator

○ PythonOperator

● Specific

○ EmailOperator

Page 21: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

The DAG

Page 22: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Initialize DAG

dag = DAG(dag_id='gcp_spy',

...

)

Page 23: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Initialize DAG

dag = DAG(dag_id='gcp_spy',

default_args={

'start_date': utils.dates.days_ago(1),

'retries': 1

},

...

)

Page 24: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Initialize DAG

dag = DAG(dag_id='gcp_spy',

default_args={

'start_date': utils.dates.days_ago(1),

'retries': 1

},

schedule_interval='0 16 * * *'

)

Page 25: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

List of instances

bash_task = BashOperator(

task_id="gcp_service_list_instances_sql",

...

)

Page 26: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

List of instances

bash_task = BashOperator(

task_id="gcp_service_list_instances_sql",

bash_command=

"gcloud sql instances list | tail -n +2 | grep -oE '^[^ ]+' "

"| tr '\n' ' '",

...

)

Page 27: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

List of instances

bash_task = BashOperator(

task_id="gcp_service_list_instances_sql",

bash_command=

"gcloud sql instances list | tail -n +2 | grep -oE '^[^ ]+' "

"| tr '\n' ' '",

xcom_push=True,

...

)

Page 28: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

List of instances

bash_task = BashOperator(

task_id="gcp_service_list_instances_sql",

bash_command=

"gcloud sql instances list | tail -n +2 | grep -oE '^[^ ]+' "

"| tr '\n' ' '",

xcom_push=True,

dag=dag

)

Page 29: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

All services

GCP_SERVICES = [

('sql', 'Cloud SQL'),

('spanner', 'Spanner'),

('bigtable', 'BigTable'),

('compute', 'Compute Engine'),

]

Page 30: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

List of instances - all services

????

bash_task = BashOperator(

task_id="gcp_service_list_instances_sql",

bash_command=

"gcloud sql instances list | tail -n +2 | grep -oE '^[^ ]+' "

"| tr '\n' ' '",

xcom_push=True,

dag=dag

)

Page 31: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

List of instances - all services

for gcp_service in GCP_SERVICES:

bash_task = BashOperator(

task_id="gcp_service_list_instances_{}".format(gcp_service[0]),

bash_command=

"gcloud {} instances list | tail -n +2 | grep -oE '^[^ ]+' "

"| tr '\n' ' '".format(gcp_service[0]),

xcom_push=True,

dag=dag

)

Page 32: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Send Slack message

send_slack_msg_task = PythonOperator(

python_callable=send_slack_msg,

provide_context=True,

task_id='send_slack_msg_task',

dag=dag

)

Page 33: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Send Slack message

send_slack_msg_task = PythonOperator(

python_callable=send_slack_msg,

provide_context=True,

task_id='send_slack_msg_task',

dag=dag

)

Page 34: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

def send_slack_msg(**context):

for gcp_service in GCP_SERVICES:

result = context['task_instance'].\

xcom_pull(task_ids='gcp_service_list_instances_{}'

.format(gcp_service[0]))

...

Page 35: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

def send_slack_msg(**context):

for gcp_service in GCP_SERVICES:

result = context['task_instance'].\

xcom_pull(task_ids='gcp_service_list_instances_{}'

.format(gcp_service[0]))

...

Page 36: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

def send_slack_msg(**context):

for gcp_service in GCP_SERVICES:

result = context['task_instance'].\

xcom_pull(task_ids='gcp_service_list_instances_{}'

.format(gcp_service[0]))

data = ...

...

Page 37: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

def send_slack_msg(**context):

for gcp_service in GCP_SERVICES:

result = context['task_instance'].\

xcom_pull(task_ids='gcp_service_list_instances_{}'

.format(gcp_service[0]))

data = ...

requests.post(

url=SLACK_WEBHOOK,

data=json.dumps(data),

headers={'Content-type': 'application/json'}

)

Page 38: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Prepare email

prepare_email_task = PythonOperator(

python_callable=prepare_email,

provide_context=True,

task_id='prepare_email_task',

dag=dag

)

Page 39: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Prepare email

prepare_email_task = PythonOperator(

python_callable=prepare_email,

provide_context=True,

task_id='prepare_email_task',

dag=dag

)

Page 40: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

def prepare_email(**context):

for gcp_service in GCP_SERVICES:

result = context['task_instance'].\

xcom_pull(task_ids='gcp_service_list_instances_{}'

.format(gcp_service[0]))

...

html_content = ...

context['task_instance'].xcom_push(key='email', value=html_content)

Page 41: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

def prepare_email(**context):

for gcp_service in GCP_SERVICES:

result = context['task_instance'].\

xcom_pull(task_ids='gcp_service_list_instances_{}'

.format(gcp_service[0]))

...

html_content = ...

context['task_instance'].xcom_push(key='email', value=html_content)

Page 42: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Send email

send_email_task = EmailOperator(

task_id='send_email',

to='[email protected]',

subject=INSTANCES_IN_PROJECT_TITLE,

html_content=...,

dag=dag

)

Page 43: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Send email

send_email_task = EmailOperator(

task_id='send_email',

to='[email protected]',

subject=INSTANCES_IN_PROJECT_TITLE,

html_content=

"{{ task_instance.xcom_pull(task_ids='prepare_email_task', key='email') }}",

dag=dag

)

Page 44: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Dependencies

for gcp_service in GCP_SERVICES:

bash_task = BashOperator(

...

)

bash_task >> send_slack_msg_task

bash_task >> prepare_email_task

Page 45: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Dependencies

for gcp_service in GCP_SERVICES:

bash_task = BashOperator(

...

)

bash_task >> send_slack_msg_task

bash_task >> prepare_email_task

prepare_email_task >> send_email_task

Page 46: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Dependencies

for gcp_service in GCP_SERVICES:

bash_task = BashOperator(

...

)

bash_task >> send_slack_msg_task

bash_task >> prepare_email_task

prepare_email_task >> send_email_task

Page 47: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Demo

https://github.com/PolideaInternal/airflow-gcp-spy

Page 48: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Complex DAGs

Source: https://speakerdeck.com/pybay/2016-matt-davis-a-practical-introduction-to-airflow?slide=13

Page 49: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Complex, Manageable, DAGs

Page 50: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018 Source: https://medium.com/@dustinstansbury/understanding-apache-airflows-key-concepts-a96efed52b1a

Page 51: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Single node

Local Executor

Web server

RDBMS DAGs

SchedulerLocal executors`

Local executorsLocal executors

Local executors

multiprocessing

Page 52: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Celery Executor

Controller

Web server

RDBMS DAGs

Scheduler

Celery BrokerRabbitMQ/Redis/AmazonSQS

Node 1 Node 2

DAGs DAGs

Worker Worker

Sync files(Chef/Puppet/Ansible/NFS)

Page 53: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

(Beta): Kubernetes Executor

Controller

Web server

RDBMSDAGs

Scheduler

Kubernetes Cluster

Node 1 Node 2

Pod

Sync files

● Git Init● Persistent Volume● Baked-in (future)

Packageas pods

Kubernetes Master

DAGs DAGs

PodPod

Pod

Page 54: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

GCP - Composer

https://github.com/GoogleCloudPlatform/airflow-operator

Page 55: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Thank You!

Follow us @polidea.com/blog

Source: https://techflourish.com/images/superman-animated-clipart.gifhttps://airflow.apache.org/_images/pin_large.png

Page 56: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

GDG DevFest Warsaw 2018 @higrys, @sprzedwojski

Page 57: Manageable data pipelines with Airflow - PyWaw | Homepywaw.org/media/slides/pywaw-80-manageable-data... · 2018. 12. 15. · GDG DevFest Warsaw 2018 @higrys, @sprzedwojski Airflow

@higrys, @sprzedwojskiGDG DevFest Warsaw 2018

Questions? :)

Follow us @polidea.com/blog

Source: https://techflourish.com/images/superman-animated-clipart.gifhttps://airflow.apache.org/_images/pin_large.png