Flow step to airflow :
1. pass ubuntu : Pass01ubuntu
2. buka terminal : show apps, then find terminal, below
3. check python version on linux syntakx :
python --version
4. install airflow :
create env dan python version sendiri :
syntaks nya :
conda create --name airflow_env python==3.10
5. after finish installation, our environment was created, lets go inside environment name, by typing sintaks :
conda activate airflow_env
So we are inside airflow_env, Check python di dalam env tersebut syntaks nya adalah :
python --version
6. Now let's install Airflow in our virtual
copy this command to
So, copy these commands and 3.34 paste it in the terminal.
:
AIRFLOW_VERSION=3.0.0 PYTHON_VERSION="$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')" CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt"
pip install "apache-airflow==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}"
Sesuai permintaan, berikut adalah langkah-langkah untuk
menambahkan variabel AIRFLOW_HOME ke dalam file .bashrc menggunakan editor Nano:
Buka file .bashrc:
bash
nano ~/.bashrc
Gunakan kode dengan hati-hati.
Tambahkan baris berikut di paling bawah file:
Gunakan tombol panah bawah pada keyboard untuk mencapai akhir file, lalu ketik
atau tempel:
bash
export AIRFLOW_HOME=~/airflow
Gunakan kode dengan hati-hati.
Tekan Ctrl + O (untuk menulis perubahan).
Tekan Enter (untuk konfirmasi nama file).
Tekan Ctrl + X (untuk keluar dari Nano).
Aktifkan perubahan:
Agar terminal langsung mengenali variabel tersebut tanpa harus restart,
jalankan perintah:
bash
source ~/.bashrc
Gunakan kode dengan hati-hati.
Cara Cek:
Untuk memastikan variabel sudah masuk dengan benar, ketik perintah ini:
bash
echo $AIRFLOW_HOME
Gunakan kode dengan hati-hati.
Jika muncul output /home/username/airflow, berarti sudah
berhasil.
Let me again activate the virtual environment.
Now it's time to start the airflow. Airflow itself has many components like API server, scheduleuler, trigger and drag processor. If you want you can start each of these instance separately. But there is an option which can be used to start allinone using airflow standalone command
11. Jalan kan airflow stand alone, dengan command di bawah ini :
airflow standalone
So our airflow up and run, GO TO browser type :
12. http://localhost:8080/
akan muncul seperti di bawah ini :
So I will go inside the airflow folder and this is the file which contains the username and password.
masuk ke folder airflow sintaks linux nya :
cd airflow/
Setelah masukk folder tersebut ketik list untuk melihat isi dalam folder tersebut :
ls
nama file yang ditunjuk warna biru tersebut
pass : fuSMfZpa23xu6bkN























0 Response to "Ubuntu virtual box install airflow step step start"
Posting Komentar