Skip to content

Commit 69a0fba

Browse files
jason810496ephraimbuddy
authored andcommitted
Add localstack Breeze integration (#54050) (#57668)
* Add localstack breeze integration * Fix Breeze unit test * Disbale test for localstack and export envs * Add docs for Running External System Integrations with Breeze * Fix output-commands.svg (cherry picked from commit 84bd22c)
1 parent b9aed71 commit 69a0fba

14 files changed

+131
-24
lines changed

Dockerfile.ci

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,6 +1208,27 @@ function environment_initialization() {
12081208
ssh-keyscan -H localhost >> ~/.ssh/known_hosts 2>/dev/null
12091209
fi
12101210

1211+
if [[ ${INTEGRATION_LOCALSTACK:-"false"} == "true" ]]; then
1212+
echo
1213+
echo "${COLOR_BLUE}Configuring LocalStack integration${COLOR_RESET}"
1214+
echo
1215+
1216+
# Define LocalStack AWS configuration
1217+
declare -A localstack_config=(
1218+
["AWS_ENDPOINT_URL"]="http://localstack:4566"
1219+
["AWS_ACCESS_KEY_ID"]="test"
1220+
["AWS_SECRET_ACCESS_KEY"]="test"
1221+
["AWS_DEFAULT_REGION"]="us-east-1"
1222+
)
1223+
1224+
# Export each configuration variable and log it
1225+
for key in "${!localstack_config[@]}"; do
1226+
export "$key"="${localstack_config[$key]}"
1227+
echo " * ${COLOR_BLUE}${key}:${COLOR_RESET} ${localstack_config[$key]}"
1228+
done
1229+
echo
1230+
fi
1231+
12111232
cd "${AIRFLOW_SOURCES}"
12121233

12131234
# Temporarily add /opt/airflow/providers/standard/tests to PYTHONPATH in order to see example dags

contributing-docs/testing/integration_tests.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ core or provider type of test.
7070
+--------------+-------------------------------------------------------+
7171
| keycloak | Integration for manual testing of multi-team Airflow. |
7272
+--------------+-------------------------------------------------------+
73+
| localstack | Integration that emulates AWS services locally. |
74+
+--------------+-------------------------------------------------------+
7375
| mongo | Integration required for MongoDB hooks. |
7476
+--------------+-------------------------------------------------------+
7577
| mssql | Integration required for mssql hooks. |

dev/breeze/doc/03_developer_tasks.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,29 @@ These are all available flags of ``start-airflow`` command:
392392
:width: 100%
393393
:alt: Breeze start-airflow
394394

395+
Running External System Integrations with Breeze
396+
------------------------------------------------
397+
398+
You can run Airflow alongside external systems in Breeze, such as Kafka, Cassandra, MongoDB, and more.
399+
400+
To start Airflow with an integration, use the following command:
401+
402+
.. code-block:: bash
403+
404+
breeze --python 3.10 --backend postgres --integration <integration_name>
405+
406+
For example, to run Airflow with Kafka:
407+
408+
.. code-block:: bash
409+
410+
breeze --python 3.10 --backend postgres --integration kafka
411+
412+
Check the available integrations by running:
413+
414+
.. code-block:: bash
415+
416+
breeze --integration --help
417+
395418
Launching multiple terminals in the same environment
396419
----------------------------------------------------
397420

dev/breeze/doc/images/output-commands.svg

Lines changed: 5 additions & 5 deletions
Loading

0 commit comments

Comments
 (0)