With the General Availability release of Prefect 2.0, we modified the approach to creating deployments.
This approach is:
- more intuitive - you can create your deployments from the UI and CLI,
- compatible with CI/CD frameworks,
- and more comprehensive, allowing you to use storage blocks not only for the flow code, but also for your custom modules and files, such as Python modules, configuration files, SQL scripts and dbt models!
For a detailed description, see the documentation.
How do Deployments work?
A deployment consists of:
- storage file system block
- infrastructure block
- deployment manifest
How do those components work together?
- Storage file system block defines the configuration required to store your flow code and related project dependencies in a local or remote file system.
- Infrastructure block determines where to run your flow created from this deployment
- Deployment manifest determines how and (optionally) when to run flows created from this deployment
How to create Deployments using the new syntax?
Since the definition may vary depending on the system you use, here are Discourse topics that will provide more guidance depending on the file system and infrastructure blocks you would like to use.
AWS S3
https://discourse.prefect.io/t/how-to-deploy-prefect-2-0-flows-to-aws/1252
GCP GCS
https://discourse.prefect.io/t/how-to-deploy-prefect-2-0-flows-to-gcp/1251
Azure Blob Storage
https://discourse.prefect.io/t/how-to-deploy-prefect-2-0-flows-to-azure/1312