0
0
Apache Airflowdevops~10 mins

Multi-environment deployment (dev, staging, prod) in Apache Airflow - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the Airflow environment variable for the deployment environment.

Apache Airflow
export AIRFLOW_ENV=[1]
Drag options to blanks, or click blank then click option'
Adevelopment
Btesting
Cdebug
Dproduction
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'production' instead of 'development' for dev environment.
2fill in blank
medium

Complete the code to select the correct Airflow configuration value for the staging environment.

Apache Airflow
airflow config get-value core [1]
Drag options to blanks, or click blank then click option'
Aairflow.cfg
Bdags_folder
Cexecutor
Dsql_alchemy_conn
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing the config file name with a config key.
3fill in blank
hard

Fix the error in the command to deploy Airflow DAGs to the production environment.

Apache Airflow
scp dags/ [1]:/usr/local/airflow/dags/
Drag options to blanks, or click blank then click option'
Auser@prod-server
Bprod-server
Cuser@staging-server
Dlocalhost
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the user in the remote host address.
4fill in blank
hard

Fill both blanks to set the Airflow home directory and the environment variable for staging.

Apache Airflow
export AIRFLOW_HOME=[1]
export AIRFLOW_ENV=[2]
Drag options to blanks, or click blank then click option'
A/opt/airflow/staging
Bstaging
C/usr/local/airflow
Dproduction
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing production paths or environment names in staging setup.
5fill in blank
hard

Fill all three blanks to create a dictionary mapping environments to their Airflow executor types.

Apache Airflow
executors = {
    '[1]': '[2]',
    '[3]': 'LocalExecutor'
}
Drag options to blanks, or click blank then click option'
Aproduction
BCeleryExecutor
Cdevelopment
DSequentialExecutor
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping executor types between environments.