Skip to content

Airflow demo: Clean up scripts and more clearly describe actions #4639

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

Merged
merged 4 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions resources/examples/airflow/down.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
cd ../../..
docker-compose down -v
cd resources/examples/airflow || exit
docker-compose -f docker-compose-superset.yaml down -v
docker-compose -f docker-compose.yaml down -v
docker-compose -f docker-compose-airflow.yaml down -v
docker-compose -f superset/docker-compose-superset.yaml down -v
docker stop airbyte-destination
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ services:
- redis:/data

db:
env_file: docker/.env
env_file: ../docker/.env
image: postgres:10
container_name: superset_db
restart: unless-stopped
volumes:
- db_home:/var/lib/postgresql/data

superset:
env_file: docker/.env-non-dev
env_file: ../docker/.env-non-dev
image: *superset-image
container_name: superset_app
command: ["/app/docker/docker-bootstrap.sh", "app-gunicorn"]
Expand All @@ -56,7 +56,7 @@ services:
image: *superset-image
container_name: superset_init
command: ["/app/docker/docker-init.sh"]
env_file: docker/.env-non-dev
env_file: ../docker/.env-non-dev
depends_on: *superset-depends-on
user: "root"
volumes: *superset-volumes
Expand All @@ -65,7 +65,7 @@ services:
image: *superset-image
container_name: superset_worker
command: ["/app/docker/docker-bootstrap.sh", "worker"]
env_file: docker/.env-non-dev
env_file: ../docker/.env-non-dev
restart: unless-stopped
depends_on: *superset-depends-on
user: "root"
Expand All @@ -75,7 +75,7 @@ services:
image: *superset-image
container_name: superset_worker_beat
command: ["/app/docker/docker-bootstrap.sh", "beat"]
env_file: docker/.env-non-dev
env_file: ../docker/.env-non-dev
restart: unless-stopped
depends_on: *superset-depends-on
user: "root"
Expand Down
12 changes: 7 additions & 5 deletions resources/examples/airflow/up.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/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
docker-compose down -v
docker-compose up -d
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
echo "Access Airbyte at http://localhost:8000 and set up a connection."
Expand All @@ -14,6 +16,6 @@ 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'
echo "Access Airflow at http://localhost:8085 to kick off your Airbyte sync DAG."
# Create Superset containers.
docker-compose -f docker-compose-superset.yaml down -v
docker-compose -f docker-compose-superset.yaml up -d
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