-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quality of life changes to Airflow Demo (#4895)
Co-authored-by: Abhi Vaidyanatha <[email protected]>
- Loading branch information
1 parent
1fedca9
commit 8f43ba9
Showing
1 changed file
with
28 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,37 @@ | ||
#!/usr/bin/env bash | ||
cd ../../.. | ||
echo "Attempting to remove previous Airbyte installation..." | ||
docker-compose down -v | ||
docker-compose up -d | ||
cd resources/examples/airflow || exit | ||
echo "Attempting to remove previous Airflow installation..." | ||
docker-compose -f docker-compose-airflow.yaml down -v | ||
docker-compose -f docker-compose-airflow.yaml up -d | ||
# Create Postgres Database to replicate to. | ||
docker run --rm --name airbyte-destination -e POSTGRES_PASSWORD=password -p 2000:5432 -d postgres | ||
trap 'kill $ABID; kill $AFID; kill $SSID; kill $PGID; exit' INT | ||
( | ||
cd ../../.. | ||
echo "Starting Airbyte..." | ||
docker-compose down -v | ||
docker-compose up -d | ||
)& | ||
ABID=$! | ||
( | ||
echo "Starting Airflow..." | ||
docker-compose -f docker-compose-airflow.yaml down -v | ||
docker-compose -f docker-compose-airflow.yaml up -d | ||
)& | ||
AFID=$! | ||
( | ||
echo "Starting Superset..." | ||
docker-compose -f superset/docker-compose-superset.yaml down -v | ||
docker-compose -f superset/docker-compose-superset.yaml up -d | ||
)& | ||
SSID=$! | ||
( | ||
echo "Creating PG destination (localhost:2000 postgres/password)" | ||
docker rm --force airbyte-destination | ||
docker run --rm --name airbyte-destination -e POSTGRES_PASSWORD=password -p 2000:5432 -d postgres | ||
)& | ||
PGID=$! | ||
echo "Waiting for applications to start..." | ||
wait | ||
echo "Access Airbyte at http://localhost:8000 and set up a connection." | ||
echo "Enter your Airbyte connection ID: " | ||
read connection_id | ||
# Set connection ID for DAG. | ||
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' | ||
echo "Access Airflow at http://localhost:8085 to kick off your Airbyte sync DAG." | ||
echo "Attempting to remove previous Superset installation." | ||
docker-compose -f superset/docker-compose-superset.yaml down -v | ||
docker-compose -f superset/docker-compose-superset.yaml up -d | ||
echo "Access Superset at http://localhost:8088 to set up your dashboards." |