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
baseandoverlaysfolder, kustomize uses these folder generate airflow deployment yaml file from airflow helm chart. - the
cdfolder also containsbaseandoverlaysfolder, kustomize uses these to generate argocd's application deployment manifest. - the
argocdfolder is where we store the different dev and production ArgoCD deployment configurations. Makefilecontains all the useful commands
Here is a list of secrets/files that you should change before your deployment to production.
.ssh/id_rsaand.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-keyin setup command section.
cd ${PROJECT_ROOT}/argocdmake 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