Docs: Update GCP Deployment (#4358)

This commit is contained in:
Mendon Kissling 2024-11-02 12:18:03 -04:00 committed by GitHub
commit 9de37248be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 25 deletions

View file

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24">
<polygon points="20.39 18.24 20.39 8 11.52 2.89 11.52 7.55 16.37 10.32 16.35 15.91 20.39 18.24" style="fill:#4285f4"/>
<polygon points="14.79 19.86 14.79 11.23 7.33 6.92 7.33 10.94 11.34 13.23 11.32 17.85 14.79 19.86" style="fill:#669df6"/>
<polygon points="9.76 21.15 9.76 14.14 3.69 10.64 3.69 14 6.86 15.81 6.84 19.47 9.76 21.15" style="fill:#aecbfa"/>
</svg>

After

Width:  |  Height:  |  Size: 462 B

View file

@ -4,43 +4,37 @@ sidebar_position: 3
slug: /deployment-gcp
---
:::info
# Deploy on Google Cloud Platform
This page may contain outdated information. It will be updated as soon as possible.
To deploy Langflow on Google Cloud Platform using Cloud Shell, use the below script.
The script will guide you through setting up a Debian-based VM with the Langflow package, Nginx, and the necessary configurations to run the Langflow dev environment in GCP.
:::
## Prerequisites
## Deploy on Google Cloud Platform {#4ee01cda736c4f7396936409f23cdb52}
* A GCP account with the necessary permissions to create resources
* A project on GCP where you want to deploy Langflow
---
## Deploy Langflow in GCP
### Run Langflow from a New Google Cloud Project {#ce729796d7404ccdb627bee47d6a4399}
1. Click below to launch Cloud Shell.
This guide will help you set up a Langflow development VM in a Google Cloud Platform project using Google Cloud Shell.
[![GCP Deploy](./cloud_deploy.svg) Deploy to Google Cloud](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/langflow-ai/langflow&working_dir=scripts/gcp&shellonly=true&tutorial=walkthroughtutorial.md)
2. Click **Trust repo**. Some gcloud commands might not run in an ephemeral Cloud Shell environment.
3. Click **Start** and follow the tutorial to deploy Langflow.
## Spot/Preemptible Instance
When running a [spot (preemptible) instance](https://cloud.google.com/compute/docs/instances/preemptible), the code and VM will behave the same way as in a regular instance, executing the startup script to configure the environment, install necessary dependencies, and run the Langflow application. However, **due to the nature of spot instances, the VM may be terminated at any time if Google Cloud needs to reclaim the resources**. This makes spot instances suitable for fault-tolerant, stateless, or interruptible workloads that can handle unexpected terminations and restarts.
## Pricing (approximate)
:::info
When Cloud Shell opens, be sure to select Trust repo. Some gcloud commands might not run in an ephemeral Cloud Shell environment.
For more information, see the [GCP Pricing Calculator](https://cloud.google.com/products/calculator?hl=en).
:::
### Standard VM {#245b47b450dd4159a5c56a5124bab84f}
[![GCP Deploy](https://camo.githubusercontent.com/c1a4a499c1d93d7038fd7af8c4f3fce222050f3bbdf4275dafbfde2491e4b8c4/68747470733a2f2f677374617469632e636f6d2f636c6f75647373682f696d616765732f6f70656e2d62746e2e737667)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/langflow-ai/langflow&working_dir=scripts/gcp&shellonly=true&tutorial=walkthroughtutorial.md)
This script sets up a Debian-based VM with the Langflow package, Nginx, and the necessary configurations to run the Langflow Dev environment.
---
## Spot/Preemptible Instance {#de9b8f7c71284cbb98e8137a3c44553d}
When running as a [spot (preemptible) instance](https://cloud.google.com/compute/docs/instances/preemptible), the code and VM will behave the same way as in a regular instance, executing the startup script to configure the environment, install necessary dependencies, and run the Langflow application. However, **due to the nature of spot instances, the VM may be terminated at any time if Google Cloud needs to reclaim the resources**. This makes spot instances suitable for fault-tolerant, stateless, or interruptible workloads that can handle unexpected terminations and restarts.
---
## Pricing (approximate) {#2289f4ba9f544e6e9d4b915ef5aacd24}
> For a more accurate breakdown of costs, please use the GCP Pricing Calculator
| Component | Regular Cost (Hourly) | Regular Cost (Monthly) | Spot/Preemptible Cost (Hourly) | Spot/Preemptible Cost (Monthly) | Notes |
| ------------------ | --------------------- | ---------------------- | ------------------------------ | ------------------------------- | -------------------------------------------------------------------------- |