Deploy code to Astro
To run your code on Astro, you need to deploy it to a Deployment. You can deploy part or all of an Astro project to an Astro Deployment.
There are several options for deploying code to a Deployment:
- Project deploys: Run
astro deploy
to build every non-DAG file in your Astro project as a Docker image and deploy the image to all Airflow components in a Deployment. This includes yourDockerfile
, plugins, and all Python and OS-level packages. DAGs are deployed separately to each Airflow component through a sidecar container. See Deploy a project image. - DAG-only deploys: Run
astro deploy --dags
to deploy only your DAG files to Astro. If you only need to deploy DAG changes, running this command is faster than runningastro deploy
since it does not require installing dependencies. See Deploy DAGS. - Image-only deploys: Run
astro deploy --image
to build and deploy your Astro project configurations as a Docker image without deploying your DAGs. This is useful you have a multi-repo CI/CD strategy, and you want to deploy your DAGs and project configurations from different repositories or storage buckets. See Image-only deploys - dbt deploys: Run
astro deploy --dbt
to deploy only a dbt project to Astro. See Deploy dbt projects to Astro. You must use this command to deploy dbt projects to Astro. - GitHub integration deploys: The Astronomer GitHub integration allows you to map a branch from your GitHub repository to directly deploy to Astro after you merge pull requests to the mapped branch. See Deploy code with the Astro GitHub integration.
For each deploy option, you can either trigger the deploy manually or through CI/CD. CI/CD pipelines can include both image deploys and DAG-only deploys, and they can deploy to multiple different Deployments based on different branches in your git repository. See CI/CD overview.
If multiple deploys are triggered simultaneously or additional deploys are triggered while a deploy is still processing, whether manually or through CI/CD, the first deploy is processed and then the subsequent deploys are completed. This behavior is different from how Astro processes simultaneous code deploys with the GitHub integration, which cancels the first deploy, and applies the most recent.