Apache airflow installation using Docker

Apache airflow installation using Docker

Installing Apache Airflow using Docker is a straightforward and convenient way to set up and manage your Airflow environment. Docker allows you to containerize the Airflow application and its dependencies, ensuring a consistent and isolated environment across different systems. Here's a step-by-step guide to installing Apache Airflow using Docker:

Step 1: Install Docker

Before you start, make sure you have Docker installed on your system. You can download and install Docker from their official website: https://www.docker.com/get-started

Step 2: Prepare the Airflow Configuration

Create a folder on your local machine to store the Airflow configuration files. Inside the folder, create a docker-compose.yml file and an airflow folder for mounting volumes.


No alt text provided for this image

- make a directory using command prompt: mkdir Airflow- docker

- move into that directory and open vs code : cd Airflow- docker

???????????????????????cd Airflow- docker> code.(this will open vs code)


open this :https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html website, you will get : Fetching docker-compose.yaml

move back to the terminal of your vs code write: Airflow- docker> curl 'https://airflow.apache.org/docs/apache-airflow/2.6.3/docker-compose.yaml' -o 'docker-compose.yaml'

above step will download the docker compose file , after this you should make 3 directory by this command:?

?commands

?mkdir dags

?mkdir logs

?mkdir plugins

after this you should write this command in your terminal of Airflow-docker directory is : docker compose up airflow-init (This is gonna take a while)
No alt text provided for this image
No alt text provided for this image

3. Start Airflow

Let's start the remainig services by using this command : docker compose up (Docker will automatically download the required images and set up the containers for Airflow, PostgreSQL, and other dependencies.)

- Now check all the services are up or not by using this command : docker ps?

No alt text provided for this image


4. Access Airflow UI

Once the containers are up and running, you can access the Airflow UI by opening your web browser and navigating to https://localhost:8080. You should see the Airflow dashboard, and from there, you can manage your workflows and DAGs.


After all this choose your favourite browser and open :localhost:8080

?you will see this?

?username: airflow

?password: airflow?


(This is how you can start your service)

- If you want to down the docker service use the following command: docker compose down



Thank you for reading this ??


要查看或添加评论,请登录

Sandhya Karki的更多文章

社区洞察

其他会员也浏览了