| name | managing-astro-deployments |
| description | Manage Astronomer production deployments with Astro CLI. Use when the user wants to authenticate, switch workspaces, create/update/delete deployments, or deploy code to production. |
Astro Deployment Management
This skill helps you manage production Astronomer deployments using the Astro CLI.
For local development, see the managing-astro-local-env skill.
For production troubleshooting, see the troubleshooting-astro-deployments skill.
Authentication
All deployment operations require authentication:
astro login
Authentication tokens are stored locally for subsequent commands. Run this before any deployment operations.
Workspace Management
Deployments are organized into workspaces:
astro workspace list
astro workspace switch <WORKSPACE_ID>
Workspace context is maintained between sessions. Most deployment commands operate within the current workspace context.
List and Inspect Deployments
astro deployment list
astro deployment list --all
astro deployment inspect <DEPLOYMENT_ID>
astro deployment inspect --deployment-name data-service-stg
What inspect Shows
- Deployment status (HEALTHY, UNHEALTHY)
- Runtime version and Airflow version
- Executor type (CELERY, KUBERNETES, LOCAL)
- Scheduler configuration (size, count)
- Worker queue settings (min/max workers, concurrency, worker type)
- Resource quotas (CPU, memory)
- Environment variables
- Last deployment timestamp and current tag
- Webserver and API URLs
- High availability status
Create Deployments
astro deployment create
astro deployment create --label production --executor celery
astro deployment create --label staging --executor kubernetes
Update Deployments
astro deployment update <DEPLOYMENT_ID> --dag-deploy-enabled
astro deployment update <DEPLOYMENT_ID> --help
Delete Deployments
astro deployment delete <DEPLOYMENT_ID>
Destructive: This cannot be undone. All DAGs, task history, and metadata will be lost.
Deploy Code to Production
Full Deploy
Deploy both DAGs and Docker image (required when dependencies change):
astro deploy <DEPLOYMENT_ID>
Use when:
- Dependencies changed (
requirements.txt, packages.txt, Dockerfile)
- First deployment of new project
- Significant infrastructure changes
DAG-Only Deploy (Recommended for Iteration)
Deploy only DAG files, skip Docker image rebuild:
astro deploy <DEPLOYMENT_ID> --dags
Use when:
- Only DAG files changed (Python files in
dags/ directory)
- Quick iteration during development
- Much faster than full deploy (seconds vs minutes)
Requires: --dag-deploy-enabled flag set on deployment (see Update Deployments)
Image-Only Deploy
Deploy only Docker image, skip DAG sync:
astro deploy <DEPLOYMENT_ID> --image-only
Use when:
- Only dependencies changed
- Dockerfile or requirements updated
- No DAG changes
Force Deploy
Bypass safety checks and deploy:
astro deploy <DEPLOYMENT_ID> --force
Caution: Skips validation that could prevent broken deployments.
Deployment API Tokens
Manage API tokens for programmatic access to deployments:
astro deployment token list --deployment-id <DEPLOYMENT_ID>
astro deployment token create \
--deployment-id <DEPLOYMENT_ID> \
--name "CI/CD Pipeline" \
--role DEPLOYMENT_ADMIN
astro deployment token create \
--deployment-id <DEPLOYMENT_ID> \
--name "Temporary Access" \
--role DEPLOYMENT_ADMIN \
--expiry 30
Roles:
DEPLOYMENT_ADMIN: Full access to deployment
Note: Token value is only shown at creation time. Store it securely.
Common Workflows
First-Time Production Deployment
astro login
astro workspace list
astro workspace switch <PROD_WORKSPACE_ID>
astro deployment create --label production --executor celery
astro deploy <DEPLOYMENT_ID>
Iterative DAG Development
astro deployment update <DEPLOYMENT_ID> --dag-deploy-enabled
astro deploy <DEPLOYMENT_ID> --dags
Promoting Code from Staging to Production
astro workspace switch <STAGING_WORKSPACE_ID>
astro deploy <STAGING_DEPLOYMENT_ID>
astro workspace switch <PROD_WORKSPACE_ID>
astro deploy <PROD_DEPLOYMENT_ID>
Configuration Management
astro config get
astro config set <KEY> <VALUE>
astro version
astro upgrade
Tips
- Use
--dags flag for fast iteration (seconds vs minutes)
- Always test in staging workspace before production
- Use
deployment inspect to verify deployment health before deploying
- Deployment IDs are permanent, names can change
- Most commands work with deployment ID;
inspect also accepts --deployment-name
- Set
--dag-deploy-enabled once per deployment for fast deploys
- Keep workspace context visible with
astro workspace list (shows asterisk for current)
Related Skills
- troubleshooting-astro-deployments: Investigate deployment issues, view logs, manage environment variables
- managing-astro-local-env: Manage local Airflow development environment
- setting-up-astro-project: Initialize and configure Astro projects