
Learn to deploy a resilient Apache Airflow with Docker and Swarm, cover Docker concepts, containerize with Docker Compose, compare Airflow 2.0 to 1.x, and scale on AWS with zero-downtime upgrades.
Explore how Docker creates lightweight, isolated containers to deploy and run applications, manage images on Docker Hub, and scale with multi-container setups using Docker Compose.
Acquire an AWS EC2 instance, install Docker and Docker Compose on CentOS 7 or 8 using the convenience script, start Docker, and verify installations with Docker and Docker Compose commands.
Learn to run MySQL 8 in Docker with Docker run, including container naming, port mapping, and volume mounts for persistent data access from the host.
Execute core docker commands to run a mysql container, pull images, view real-time logs, exec into the container, and verify the airflow database.
Explore Airflow 2.0 architecture, including the web server, scheduler, and metadata store (MySQL or Postgres), with Redis or RabbitMQ brokers, and how salary executor runs DAG tasks.
Install MySQL and RabbitMQ with Docker Compose version 3, defining services, images, environment variables, ports, volumes, and health checks for a single VM demo.
Configure the Celery master for Airflow 2.0 using Docker, setting up a web server and scheduler with common Airflow config, Fernet key, and MySQL and RabbitMQ connections.
Configure celery workers in a dockerized airflow setup, review bridge and host networks, run celery worker with docker-compose, monitor tasks via RabbitMQ, and adjust logs and tz for local time.
Explore the Airflow Flower service for celery workers, revealing which DAG runs on which worker and enabling load monitoring via docker compose on the master node.
Airflow 2.x supports multiple schedulers; install a second scheduler on a separate machine, run with a dedicated scheduler.yml, and verify high availability as load distributes with zero downtime.
Configure Google SMTP email alerts in Airflow with Jinja templates and per-DAG priority, restart salary workers, and verify failure notifications are sent on DAG failures.
Discover how Docker Swarm creates and manages a multi-node cluster, schedules services with replicas or global mode, and handles scaling, rolling updates, and failover across swarm managers and workers.
Design a highly available Airflow 2.0 architecture with Docker Swarm, detailing master web server and scheduler, distributed workers, salary workers, and MySQL and RabbitMQ services.
Learn how an overlay network in Docker Swarm enables containers on multiple hosts to communicate via a private, shared network with overlay IPs.
Install MySQL and RabbitMQ with Docker Swarm, create a swarm cluster and overlay network, translate compose to swarm services, configure mounts, ports, and env vars, and verify with logs.
Install the Airflow web server on Docker Swarm by converting the web server compose to a Docker service, using Swarm images, environment variables, volumes, and ports; verify logs.
Install the Airflow scheduler with Docker Swarm in global mode across master nodes, monitor scheduled tasks via the web server and the Revit MQ console, then prepare the salary workers.
install the Airflow Flower component with docker compose, convert to a docker service, and access the UI on the manager node at IP:5555; Flower requires RabbitMQ and a MySQL connection.
Deploy Apache Airflow 2.0 celery workers with Docker Swarm using a global mode service, host-network port mappings, and bind volumes with log permissions, then monitor tasks via the Flower UI.
Why Am I conducting this course ?
When I started configuring airflow in my organisation, I spent many weeks on writing Docker Compose files for each airflow component.
Airflow community provides a single docker compose file which installs all the components in a single machine. It works fine for practising purposes. But in production, we setup each component on different machines. Also, there is no docker image available on Docker registry to start airflow through Docker Swarm.
Overall, I contributed many sleepless nights to achieve fault tolerant, resilient, distributed, Highly Available airflow using Docker Swarm. I consolidated all my learnings, knowledge into this course. So that others don't need to struggle like mine.
What do you Learn From this Course ?
The primary objective of this course is to achieve resilient airflow using the Docker and Docker Swarm. I am using the latest stable airflow (2.0.1) throughout this course.
At first, we study all the required docker concepts. Don't worry if you have no prior experience on docker. I cover all docker necessary concepts which are used in this course. In the second module, we investigate Airflow 2.0 and understand the additional advantage over airflow 1.x. We discover the airflow HA architecture and discuss each system requirement.
After this, we acquire these machines from AWS and start containerising one by one applications using docker compose.
At the end, we run multiple airflow schedulers and benchmark it.
Last module is on docker swarm and we witness how easy it is to setup the entire airflow just by running a few swarm commands.
In the beginning, we learn all the swarm concepts, architecture, commands and networking. We translate the docker compose file into the docker service command. Subsequently, We create a Swarm Cluster and trigger one by one airflow services on it.