How to deploy Prefect 2.0 flows to GCP

Create a GCS block

First, go to the Prefect UI and create a GCS block:

Create a deployment from CLI

This will assume that you want to run your flow in a local process, i.e. using a Process block. To use a different type of infrastructure, check recipes for Docker and Kubernetes.

prefect deployment build flows/ -n dev -q dev -sb gcs/dev -a

You should now see the entire project copied into your GCS bucket :tada:

Start an agent

prefect agent start -q dev

You should see that your agent picked up the run:

You’re all set! :rocket:

1 Like