GCP and Prefect Cloud — from Docker Container to Cloud VM on Google Compute Engine
Repository template with GitHub Actions will deploy your first Python dataflows to Google Cloud in minutes
Google Compute Engine allows running virtual machines (VMs) on GCP. It’s a scalable platform for running a wide range of workloads, including custom (Python) applications, data processing, and machine learning — an ideal execution layer for Prefect flows. This post will help you get started with Prefect and Google Cloud by leveraging the prefect-cloud-gcp repository template.
Create a new repository
First, create a new repository from the prefect-cloud-gcp template. Then, inspect the repository structure. It consists of the following:
flows
— example flows to get started with Prefect, both executing workflows locally from your machine, as well as remotely on GCPprefect_utils
module as a placeholder for any custom business logic and reusable codesetup.py
andrequirements.txt
are used to packageprefect_utils
and other dependencies for both local and remote executionDockerfile
combines your flow code, custom logic, and external dependencies into a portable…