Apache Airflow is an Open Source tool developed to programmatically create, schedule and monitor workflows. To install it on a Windows machine, Podman Desktop can be used.
Podman Desktop is an Open Source innovative desktop tool which makes it easy to create, manage and run containerized applications visually.
Podman packages software into standardized units called containers that have everything the software needs to run including libraries, system tools, code and runtime. This will help to quickly deploy and scale applications into any environment.
Moreover, Podman CLI is used to run commands in the terminal to help initialise and start the virtual machine (VM).
-
Install Podman Desktop for Windows from here: https://podman-desktop.io/downloads/windows and further, install Podman and Podman CLI extension from the pop-up that appears on the application interface.
-
Go to the releases page: https://github.com/astronomer/astro-cli/releases and download the setup file as per the system architecture. For 64 bits Windows machine, this file should be downloaded: https://github.com/astronomer/astro-cli/releases/download/v1.33.2/astro_1.33.2_windows_amd64.exe v1.33.2 version is being used.
-
Rename the downloaded file as
astro.exe
. -
Add the filepath for the directory containing
astro.exe
as a PATH environment variable. -
Restart the machine.
-
After restarting, open Command Prompt and run the following command:
winget install -e --id Astronomer.Astro
This will upgrade the Astro CLI present in the machine.
-
Open VS Code and open a folder in which you need to open a new terminal.
-
Run the following commands to initialise and start a VM.
podman machine init podman machine start
Note: WSL2 should be enabled.
-
Run the following command.
podman run --rm -it postgres:12.6 whoami
-
Run the following command to change the default container management from Docker to Podman.
astro config set container.binary podman -g
-
Create a new directory and navigate into it.
-
Run the following command to create an astro project that contains the set of files necessary to run Airflow, including dedicated folders for DAG files, plugins and dependencies.
astro dev init
-
Run the following command to run Airflow locally.
astro dev start
-
Open
http://localhost:8080/
and sign in to Apache Airflow. Default id:admin
Default password:admin