Deployments are now simpler and declarative

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! :tada:

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?

  1. Storage file system block defines the configuration required to store your flow code and related project dependencies in a local or remote file system.
  2. Infrastructure block determines where to run your flow created from this deployment
  3. 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

Local process, Docker container, Kubernetes job

https://discourse.prefect.io/t/how-to-deploy-prefect-2-0-flows-to-run-as-a-local-process-docker-container-or-a-kubernetes-job/1246

3 Likes