How can I deploy my flow to the API backend?

Prefect 2.0

In order to deploy your flow, you create a deployment, which informs Orion:

The Orion engine pulls the flow from the specified location and executes it on the infrastructure you defined in your FlowRunner configuration (e.g., a DockerFlowRunner deploys your flow as a Docker container). This tutorial shows how to specify and create a deployment.

Prefect 1.0

There are two components that need to be set on your flow in order to deploy it:

  1. Storage - tells Prefect from where to pull the flow definition,
  2. Run Configuration - tells Prefect how and where to deploy a flow run. By using labels, you can associate flows with specific agents.

Once that’s defined, you register your flow to the backend while specifying the flow path and the project name.


:point_right: Note: You can think of Prefect 2.0 flow_runner as a replacement to Prefect 1.0 run_config.


See also: