Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Airflow demo script for one click deployment #4451

Merged
merged 5 commits into from
Jul 2, 2021

Conversation

avaidyanatha
Copy link
Contributor

Main Inspiration

  • The Airflow plugin is fairly hard to configure and use, so having a script that does all the heavy lifting for you is pretty awesome for demos and setting up development DAGs.

Main Changes

  • Adds an examples directory to the resources directory to store Airbyte demo scripts.
  • Adds a script and all its dependencies to examples that brings up Airbyte, Airflow, and creates an Airflow connection for you based on your Airbyte connection ID.
  • Adds a walkthrough for using the script.

@avaidyanatha avaidyanatha added area/documentation Improvements or additions to documentation depends-on-airflow labels Jul 1, 2021
@github-actions github-actions bot removed the area/documentation Improvements or additions to documentation label Jul 1, 2021
@avaidyanatha avaidyanatha added the area/documentation Improvements or additions to documentation label Jul 1, 2021
.gitignore Outdated

# Airflow Demo
resources/examples/airflow/logs/*
!resources/examples/airflow/logs/.gitkeep
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOF line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

start_date=days_ago(1)
) as dag:

money_to_json = AirbyteTriggerSyncOperator(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better call something else here because my example use exchange rate api

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, changed.

echo "Enter your Airbyte connection ID: "
read connection_id
docker exec -ti airflow_webserver airflow variables set 'AIRBYTE_CONNECTION_ID' "$connection_id"
docker exec -ti airflow_webserver airflow connections add 'airbyte_example' --conn-uri 'airbyte://host.docker.internal:8000'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe echo Now you can access Airflow at http://localhost:8085 active your DAG and play around

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

AIRFLOW__CELERY__BROKER_URL: redis://:@redis:6379/0
AIRFLOW__CORE__FERNET_KEY: ""
AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: "true"
AIRFLOW__CORE__LOAD_EXAMPLES: "false"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this working?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep!

@github-actions github-actions bot removed the area/documentation Improvements or additions to documentation label Jul 1, 2021
@avaidyanatha avaidyanatha merged commit 64a8247 into master Jul 2, 2021
@avaidyanatha avaidyanatha deleted the abhi/yeah-i-got-that-airflow branch July 2, 2021 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants