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

GCP GCS

Azure Blob Storage

Local process, Docker container, Kubernetes job

3 Likes