从 https://github.com/puckel/docker-airflow 中拷贝了一份airflow的仓库代码,进行了一些自己的修改
600
使用官方提供的Docker-compose 来安装airflow
Set up a Database Backend — Airflow Documentation
-- Setting up a MySQL Database
CREATE DATABASE airflow_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'airflow_user' IDENTIFIED BY 'airflow_pass';
GRANT ALL PRIVILEGES ON airflow_db.* TO 'airflow_user';
配置相关的环境变量
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: mysql+mysqldb://root@mysql/airflow?charset=utf8mb4
AIRFLOW__CORE__SQL_ALCHEMY_CONN: mysql+mysqldb://root@mysql/airflow?charset=utf8mb4
AIRFLOW__CORE__SQL_ENGINE_COLLATION_FOR_IDS: utf8mb3_general_ci
AIRFLOW__CELERY__RESULT_BACKEND: db+mysql://root@mysql/airflow?charset=utf8mb4
实际运行helm 脚本,覆盖默认参数
helm install my-airflow apache-airflow/airflow --version 1.15.0 -f helm/overwrite-values.yaml
安装成功输出结果
NAME: my-airflow
LAST DEPLOYED: Wed Dec 18 13:08:16 2024
NAMESPACE: deploy
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Thank you for installing Apache Airflow 2.9.3!
Your release is named my-airflow.
You can now access your dashboard(s) by executing the following command(s) and visiting the corresponding port at localhost in your browser:
Airflow Webserver: kubectl port-forward svc/my-airflow-webserver 8080:8080 --namespace deploy
Default Webserver (Airflow UI) Login credentials:
username: itzhang89
password: Root@2024
Default Postgres connection credentials:
username: postgres
password: postgres
port: 5432
You can get Fernet Key value by running the following:
echo Fernet Key: $(kubectl get secret --namespace deploy my-airflow-fernet-key -o jsonpath="{.data.fernet-key}" | base64 --decode)
Content type
Image
Digest
sha256:de540ec39…
Size
292.8 MB
Last updated
over 3 years ago
docker pull 5200710/airflow:2.3.2