A template project to deploy airflow with argo CD. The project is designed for the following purpose
- Need of separating development and production Airflow environment
- Develop environment and production environment deploys Airflow with different parameters (password, ingress rule, worker replica, ...etc).
- Enable our data scientist team to deploy to develop or production environment with ease.
Read this blog post to learn more.
- Access an to existing k8s cluster.
- Basic familiarity with Airflow component.
- Access to a separate Airflow dags repository.
- this project uses kustomize to manage develop and production environments.
- the root project folder contains
base
andoverlays
folder, kustomize uses these folder generate airflow deployment yaml file from airflow helm chart. - the
cd
folder also containsbase
andoverlays
folder, kustomize uses these to generate argocd's application deployment manifest. - the
argocd
folder is where we store the different dev and production ArgoCD deployment configurations. Makefile
contains all the useful commands
Here is a list of secrets/files that you should change before your deployment to production.
.ssh/id_rsa
and.ssh/id_rsa.pub
: these files are used for gitSync to pull your dags repository.base/values.yaml
: update all paswords, secrets, knownHosts to proper value.overlays/develop/kustomize.yaml
: update ingress route to your develop instance host.overlays/production/kustomize.yaml
: update ingress route to your production instance host.Makefile
: update thefernet-key
in setup command section.
cd ${PROJECT_ROOT}/argocd
make setup/namespace
: this create namespace to deploy ArgoCDmake setup/plugin
: this setup helm plugin for ArgoCDK_ENV=develop make deploy
: this will deploy ArgoCD with overlays/develop config
cd ${PROJECT_ROOT}
make setup
: this will create airflow related credentials.K_ENV=develop make deploy: this will deploy airflow application manifest on ArgoCD