deploying-airflow
This skill guides deploying Airflow DAGs and projects using Astro (Astronomer's managed platform), open-source Airflow on Docker Compose, or Kubernetes with…
Identity proven by GitHub's verified organisation badge (astronomer)
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
- License
- Apache-2.0 (permissive)
- Pin
- 486ee63pinned Oct 9, 2026
- Context cost
- about 2,700 tokenswhen the skill loads
- GitHub stars
- 451on astronomer/agents
- Scripts
- None found
What it does
“Deploys Airflow DAGs and projects. Use when deploying Airflow or answering anything about deployment - deploying DAGs/projects, pushing code, setting up CI/CD, deploying to production or deployment strategies for Airflow.”
Generated summary from the skill's own text
This skill guides deploying Airflow DAGs and projects using Astro (Astronomer's managed platform), open-source Airflow on Docker Compose, or Kubernetes with Helm charts. It covers deployment commands, CI/CD patterns, environment configuration, and strategies for different deployment targets.
When to use it
- Deploying DAGs or full Airflow projects to production environments
- Setting up CI/CD pipelines for automated Airflow deployments
- Choosing between Astro, Docker Compose, or Kubernetes deployment methods
- Configuring environment variables and dependencies for Airflow instances
When not to
- Writing or authoring new DAG files before deployment
- Testing DAGs locally before pushing to production
- Initializing a new Airflow project from scratch
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add astronomer/agents --skill deploying-airflowInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install astronomer/agents deploying-airflow@486ee63d01f8126c52fbc92c36cd36ec31708dcdInstalls the commit we checked (486ee63).
Copy by hand
Download the folder at 486ee63 and put it in .claude/skills/deploying-airflow for Claude Code and in .agents/skills/deploying-airflow for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Claude Code plugin
/plugin install astronomer-data-agents@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Claude Code plugin
/plugin install data@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Claude Code plugin
/plugin install data-engineering@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "deploying-airflow" by Astronomer. Source, pinned to commit 486ee63d01f8126c52fbc92c36cd36ec31708dcd: https://github.com/astronomer/agents/tree/486ee63d01f8126c52fbc92c36cd36ec31708dcd/skills/deploying-airflow 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/deploying-airflow/ for Claude Code and .agents/skills/deploying-airflow/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/astronomer/deploying-airflow
SKILL.md at the pin
---
name: deploying-airflow
description: Deploys Airflow DAGs and projects. Use when deploying Airflow or answering anything about deployment - deploying DAGs/projects, pushing code, setting up CI/CD, deploying to production or deployment strategies for Airflow.
---
# Deploying Airflow
This skill covers deploying Airflow DAGs and projects to production, whether using Astro (Astronomer's managed platform) or open-source Airflow on Docker Compose or Kubernetes.
**Choosing a path:** Astro is a good fit for managed operations and faster CI/CD. For open-source, use Docker Compose for dev and the Helm chart for production.
---
## Astro (Astronomer)
Astro provides CLI commands and GitHub integration for deploying Airflow projects.
### Deploy Commands
| Command | What It Does |
|---------|--------------|
| `astro deploy` | Full project deploy — builds Docker image and deploys DAGs |
| `astro deploy --dags` | DAG-only deploy — pushes only DAG files (fast, no image build) |
| `astro deploy --image` | Image-only deploy — pushes only the Docker image (for multi-repo CI/CD) |
| `astro deploy --dbt` | dbt project deploy — deploys a dbt project to run alongside Airflow |
### Full Project Deploy
Builds a Docker image from your Astro project and deploys everything (DAGs, plugins, requirements, packages):
```bash
astro deploy
```
Use this when you've changed `requirements.txt`, `Dockerfile`, `packages.txt`, plugins, or any non-DAG file.
### DAG-Only Deploy
Pushes only files in the `dags/` directory without rebuilding the Docker image:
```bash
astro deploy --dags
```
This is significantly faster than a full deploy since it skips the image build. Use this when you've only changed DAG files and haven't modified dependencies or configuration.
### Image-Only Deploy
Pushes only the Docker image without updating DAGs:
```bash
astro deploy --image
```
This is useful in multi-repo setups where DAGs are deployed separately from the image, or in CI/CD pipelines that manage image and DAG deploys independently.
### dbt Project Deploy
Deploys a dbt project to run with Cosmos on an Astro deployment:
```bash
astro deploy --dbt
```
### GitHub Integration
Astro supports branch-to-deployment mapping for automated deploys:
- Map branches to specific deployments (e.g., `main` -> production, `develop` -> staging)
- Pushes to mapped branches trigger automatic deploys
- Supports DAG-only deploys on merge for faster iteration
Configure this in the Astro UI under **Deployment Settings > CI/CD**.
### CI/CD Patterns
Common CI/CD strategies on Astro:
1. **DAG-only on feature branches**: Use `astro deploy --dags` for fast iteration during development
2. **Full deploy on main**: Use `astro deploy` on merge to main for production releases
3. **Separate image and DAG pipelines**: Use `--image` and `--dags` in separate CI jobs for independent release cycles
### Deploy Queue
When multiple deploys are triggered in quick succession, Astro processes them sequentially in a deploy queue. Each deploy completes before the next one starts.
### Reference
- [Astro Deploy Documentation](https://www.astronomer.io/docs/astro/deploy-code)
---
## Open-Source: Docker Compose
Deploy Airflow using the official Docker Compose setup. This is recommended for learning and exploration — for production, use Kubernetes with the Helm chart (see below).
### Prerequisites
- Docker and Docker Compose v2.14.0+
- The official `apache/airflow` Docker image
### Quick Start
Download the official Airflow 3 Docker Compose file:
```bash
curl -LfO 'https://airflow.apache.org/docs/apache-airflow/stable/docker-compose.yaml'
```
This sets up the full Airflow 3 architecture:
| Service | Purpose |
|---------|---------|
| `airflow-apiserver` | REST API and UI (port 8080) |
| `airflow-scheduler` | Schedules DAG runs |
| `airflow-dag-processor` | Parses and processes DAG files |
| `airflow-worker` | Executes tasks (CeleryExecutor) |
| `airflow-triggerer` | Handles deferrable/async tasks |
| `postgres` | Metadata database |
| `redis` | Celery message broker |
### Minimal Setup
For a simpler setup with LocalExecutor (no Celery/Redis), create a `docker-compose.yaml`:
```yaml
x-airflow-common: &airflow-common
image: apache/airflow:3 # Use the latest Airflow 3.x release
environment: &airflow-common-env
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow
AIRFLOW__CORE__LOAD_EXAMPLES: 'false'
AIRFLOW__CORE__DAGS_FOLDER: /opt/airflow/dags
volumes:
- ./dags:/opt/airflow/dags
- ./logs:/opt/airflow/logs
- ./plugins:/opt/airflow/plugins
depends_on:
postgres:
condition: service_healthy
services:
postgres:
image: postgres:16
environment:
POSTGRES_USER: airflow
POSTGRES_PASSWORD: airflow
POSTGRES_DB: airflow
volumes:
- postgres-db-volume:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "airflow"]
interval: 10s
retries: 5
start_period: 5s
airflow-init:
<<: *airflow-common
entrypoint: /bin/bash
command:
- -c
- |
airflow db migrate
airflow users create \
--username admin \
--firstname Admin \
--lastname User \
--role Admin \
--email admin@example.com \
--password admin
depends_on:
postgres:
condition: service_healthy
airflow-apiserver:
<<: *airflow-common
command: airflow api-server
ports:
- "8080:8080"
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
airflow-scheduler:
<<: *airflow-common
command: airflow scheduler
airflow-dag-processor:
<<: *airflow-common
command: airflow dag-processor
airflow-triggerer:
<<: *airflow-common
command: airflow triggerer
volumes:
postgres-db-volume:
```
> **Airflow 3 architecture note**: The webserver has been replaced by the **API server** (`airflow api-server`), and the **DAG processor** now runs as a standalone process separate from the scheduler.
### Common Operations
```bash
# Start all services
docker compose up -d
# Stop all services
docker compose down
# View logs
docker compose logs -f airflow-scheduler
# Restart after requirements change
docker compose down && docker compose up -d --build
# Run a one-off Airflow CLI command
docker compose exec airflow-apiserver airflow dags list
```
### Installing Python Packages
Add packages to `requirements.txt` and rebuild:
```bash
# Add to requirements.txt, then:
docker compose down
docker compose up -d --build
```
Or use a custom Dockerfile:
```dockerfile
FROM apache/airflow:3 # Pin to a specific version (e.g., 3.1.7) for reproducibility
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
```
Update `docker-compose.yaml` to build from the Dockerfile:
```yaml
x-airflow-common: &airflow-common
build:
context: .
dockerfile: Dockerfile
# ... rest of config
```
### Environment Variables
Configure Airflow settings via environment variables in `docker-compose.yaml`:
```yaml
environment:
# Core settings
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__CORE__PARALLELISM: 32
AIRFLOW__CORE__MAX_ACTIVE_TASKS_PER_DAG: 16
# Email
AIRFLOW__EMAIL__EMAIL_BACKEND: airflow.utils.email.send_email_smtp
AIRFLOW__SMTP__SMTP_HOST: smtp.example.com
# Connections (as URI)
AIRFLOW_CONN_MY_DB: postgresql://user:pass@host:5432/db
```
---
## Open-Source: Kubernetes (Helm Chart)
Deploy Airflow on Kubernetes using the official Apache Airflow Helm chart.
### Prerequisites
- A Kubernetes cluster
- `kubectl` configured
- `helm` installed
### Installation
```bash
# Add the Airflow Helm repo
helm repo add apache-airflow https://airflow.apache.org
helm repo update
# Install with default values
helm install airflow apache-airflow/airflow \
--namespace airflow \
--create-namespace
# Install with custom values
helm install airflow apache-airflow/airflow \
--namespace airflow \
--create-namespace \
-f values.yaml
```
### Key values.yaml Configuration
```yaml
# Executor type
executor: KubernetesExecutor # or CeleryExecutor, LocalExecutor
# Airflow image (pin to your desired version)
defaultAirflowRepository: apache/airflow
defaultAirflowTag: "3" # Or pin: "3.1.7"
# Git-sync for DAGs (recommended for production)
dags:
gitSync:
enabled: true
repo: https://github.com/your-org/your-dags.git
branch: main
subPath: dags
wait: 60 # seconds between syncs
# API server (replaces webserver in Airflow 3)
apiServer:
resources:
requests:
cpu: "250m"
memory: "512Mi"
limits:
cpu: "500m"
memory: "1Gi"
replicas: 1
# Scheduler
scheduler:
resources:
requests:
cpu: "500m"
memory: "1Gi"
limits:
cpu: "1000m"
memory: "2Gi"
# Standalone DAG processor
dagProcessor:
enabled: true
resources:
requests:
cpu: "250m"
memory: "512Mi"
limits:
cpu: "500m"
memory: "1Gi"
# Triggerer (for deferrable tasks)
triggerer:
resources:
requests:
cpu: "250m"
memory: "512Mi"
limits:
cpu: "500m"
memory: "1Gi"
# Worker resources (CeleryExecutor only)
workers:
resources:
requests:
cpu: "500m"
memory: "1Gi"
limits:
cpu: "2000m"
memory: "4Gi"
replicas: 2
# Log persistence
logs:
persistence:
enabled: true
size: 10Gi
# PostgreSQL (built-in)
postgresql:
enabled: true
# Or use an external database
# postgresql:
# enabled: false
# data:
# metadataConnection:
# user: airflow
# pass: airflow
# host: your-rds-host.amazonaws.com
# port: 5432
# db: airflow
```
### Upgrading
```bash
# Upgrade with new values
helm upgrade airflow apache-airflow/airflow \
--namespace airflow \
-f values.yaml
# Upgrade to a new Airflow version
helm upgrade airflow apache-airflow/airflow \
--namespace airflow \
--set defaultAirflowTag="<version>"
```
### DAG Deployment Strategies on Kubernetes
1. **Git-sync** (recommended): DAGs are synced from a Git repository automatically
2. **Persistent Volume**: Mount a shared PV containing DAGs
3. **Baked into image**: Include DAGs in a custom Docker image
### Useful Commands
```bash
# Check pod status
kubectl get pods -n airflow
# View scheduler logs
kubectl logs -f deployment/airflow-scheduler -n airflow
# Port-forward the API server
kubectl port-forward svc/airflow-apiserver 8080:8080 -n airflow
# Run a one-off CLI command
kubectl exec -it deployment/airflow-scheduler -n airflow -- airflow dags list
```
---
## Related Skills
- **setting-up-astro-project**: For initializing a new Astro project
- **managing-astro-local-env**: For local development with `astro dev`
- **authoring-dags**: For writing DAGs before deployment
- **testing-dags**: For testing DAGs before deployment
From astronomer/agents at 486ee63, shown as plain text under its license: Apache-2.0 (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at 486ee63Files
- SKILL.md11 KB · 1d5912a31433
1 file, 11 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at 486ee63More from Astronomer
airflow
This skill uses the `af` CLI to query, manage, and troubleshoot Apache Airflow instances.
Contains scripts
Claude Code, Codex, Cursor +3 · about 3.6K tokens · pinned 7 days ago
airflow-adapter
This skill provides an adapter layer that automatically detects whether an agent is connected to Airflow 2.x or 3.x and routes API calls to the correct…
Claude Code · about 170 tokens · pinned 7 days ago
airflow-hitl
Implements human-in-the-loop workflows in Airflow 3.1+ using deferrable operators that pause DAGs and collect human decisions via the UI or REST API.
Claude Code, Codex, Cursor +4 · about 1.7K tokens · pinned 7 days ago
airflow-plugins
Builds Airflow 3.1+ plugins that embed FastAPI apps, custom UI pages, React components, middleware, macros, and operator links directly into the Airflow UI…
Claude Code, Codex, Cursor +4 · about 5.8K tokens · pinned 7 days ago
airflow-state-store
Helps agents work with Airflow 3.3's task and asset state stores for persisting coordination state across task retries, implementing crash-safe external job…
Claude Code, Codex, Cursor +4 · about 5.9K tokens · pinned 7 days ago
analyzing-data
Queries a data warehouse using SQL to answer business questions about metrics, trends, and aggregations.
Contains scripts
Claude Code, Codex, Cursor +3 · about 1.2K tokens · pinned 7 days ago
Related in Cloud and DevOps
deploying-go-sdk-bundles
This skill builds, packs, and deploys Go SDK bundles as self-contained AFBNDL01 executable artifacts for Airflow's ExecutableCoordinator to run.
by AstronomerOfficial publisher
Claude Code, Codex, Cursor +4 · about 1.7K tokens · pinned 7 days ago
deploying-java-sdk-bundles
This skill teaches how to build Java SDK bundles as JAR files using Gradle or Maven, then deploy them to Airflow workers so the coordinator can execute Java…
by AstronomerOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.6K tokens · pinned 7 days ago
upgrading-mwaa-environments
Upgrades an MWAA environment to a newer Apache Airflow version by computing the optimal version-jump path, selecting a deployment approach (new environment…
by Amazon (AWS)Official publisher
Claude Code, Codex, Cursor +4 · about 7K tokens · pinned 7 days ago
managing-astro-local-env
Manage local Airflow development environments using the Astro CLI in Docker or standalone mode.
by AstronomerOfficial publisher
Claude Code, Codex, Cursor +4 · about 1.9K tokens · pinned 7 days ago
setting-up-astro-project
This skill initializes and configures Astro/Airflow projects using the Astro CLI.
by AstronomerOfficial publisher
Claude Code, Codex, Cursor +4 · about 730 tokens · pinned 7 days ago
debug-openshell-cluster
Diagnoses OpenShell gateway deployment problems across Docker, Podman, Kubernetes, and VM compute platforms.
by NVIDIAOfficial publisher
Claude Code, Codex, Cursor +4 · about 19.1K tokens · pinned 7 days ago