Files
flow/scripts/gcp/walkthroughtutorial_spot.md
T
zeekay a270a374f0 refactor(rebrand): unify hanzoflow -> hanzo-flow (pkg) / flow (module,cmd) / FLOW_ (env)
Cleaned the concurrent session's half-rebrand inconsistency (166 files):
- pip/pypi refs hanzoflow -> hanzo-flow (matches hanzo-flow-base/sdk)
- module paths/commands/devcontainer hanzoflow -> flow (the import name + CLI)
- env vars HANZOFLOW_ -> FLOW_ (was inconsistent with the LANGFLOW_->FLOW_ sweep)
- fixed a stale src/backend/base/hanzoflow/ path that didn't exist
- product display HanzoFlow -> 'Hanzo Flow' in docs; kept HanzoFlow only as a
  code identifier where a space is illegal

Canonical: pip install hanzo-flow / import flow / `flow` CLI. compileall clean.
2026-07-16 10:26:22 -07:00

3.5 KiB

Deploy Hanzo Flow on Google Cloud Platform

Duration: 45 minutes Author: Robert Wilkins III

Introduction

In this tutorial, you will learn how to deploy Hanzo Flow on Google Cloud Platform (GCP) using Google Cloud Shell.

This tutorial assumes you have a GCP account and basic knowledge of Google Cloud Shell. If you're not familiar with Cloud Shell, you can review the Cloud Shell documentation.

Set up your environment

Before you start, make sure you have the following prerequisites:

  • A GCP account with the necessary permissions to create resources
  • A project on GCP where you want to deploy Hanzo Flow

[Select your GCP project]

In the next step, you'll configure the GCP environment and deploy Hanzo Flow.

Configure the GCP environment and deploy Hanzo Flow

Run the deploy_flow_gcp_spot.sh script to configure the GCP environment and deploy Hanzo Flow:

gcloud config set project <walkthrough-project-id/>
bash ./deploy_flow_gcp_spot.sh

The script will:

  1. Check if the required resources (VPC, subnet, firewall rules, and Cloud Router) exist and create them if needed
  2. Create a startup script to install Python, Hanzo Flow, and Nginx
  3. Create a Compute Engine VM instance with the specified configuration and startup script
  4. Run Hanzo Flow to serve content on TCP port 7860

The process may take approximately 30 minutes to complete. Rest assured that progress is being made, and you'll be able to proceed once the process is finished.

In the next step, you'll learn how to connect to the Hanzo Flow VM.

Connect to the Hanzo Flow VM

To connect to your new Hanzo Flow VM, follow these steps:

  1. Navigate to the VM instances page and click on the external IP for your VM. Make sure to use HTTP and set the port to 7860
    or
  2. Run the following command to display the URL for your Hanzo Flow environment:
export FLOW_IP=$(gcloud compute instances list --filter="NAME=flow-dev" --format="value(EXTERNAL_IP)")

echo http://$FLOW_IP:7860
  1. Click on the Hanzo Flow URL in cloudshell to be greeted by the Hanzo Flow Dev environment

Congratulations! You have successfully deployed Hanzo Flow on Google Cloud Platform.

Cleanup

If you want to remove the resources created during this tutorial, you can use the following commands:

gcloud compute instances delete flow-dev --zone us-central1-a --quiet

The following network settings and services are used during this walkthrough. If you plan to continue using the project after the walkthrough, you may keep these configurations in place.

However, if you decide to remove them after completing the walkthrough, you can use the following gcloud commands:

These commands will delete the firewall rules and network configurations created during the walkthrough. Make sure to run them only if you no longer need these settings.

gcloud compute firewall-rules delete allow-tcp-7860 --quiet

gcloud compute firewall-rules delete allow-iap --quiet

gcloud compute networks subnets delete default --region us-central1 --quiet

gcloud compute networks delete default --quiet