Skip to content

Instantly share code, notes, and snippets.

@wingkwong
Last active May 19, 2023 15:54
Show Gist options
  • Save wingkwong/fb257773cb306cf9084183cc56716eab to your computer and use it in GitHub Desktop.
Save wingkwong/fb257773cb306cf9084183cc56716eab to your computer and use it in GitHub Desktop.
Setting up Airflow in AWS Cloud9 (min requirement: t2.large)
# setup docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
# setup airflow 1.10.14
git clone https://github.com/xnuinside/airflow_in_docker_compose
cd airflow_in_docker_compose
docker-compose -f docker-compose-with-celery-executor.yml up --build
# setup airflow 2.1.0
curl -LfO 'https://airflow.apache.org/docs/apache-airflow/2.1.0/docker-compose.yaml'
mkdir ./dags ./logs ./plugins
echo -e "AIRFLOW_UID=$(id -u)\nAIRFLOW_GID=0" > .env
docker-compose up airflow-init
docker-compose up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment