Skip to content

Commit 8e5ad91

Browse files
committed
Add GCP doc
1 parent 13c4875 commit 8e5ad91

File tree

1 file changed

+58
-3
lines changed

1 file changed

+58
-3
lines changed

docs/providers/gcp.md

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,65 @@ description: Defang will allow you to easily create and manage full, scalable ap
44
sidebar_position: 3000
55
---
66

7-
# GCP
7+
# Google Cloud Platform (GCP)
88

99
:::info
10-
Google Cloud Platform (GCP) support is coming soon to Defang. Stay tuned for updates!
10+
This feature is available for Public Preview as of December 2024. This page will be updated when it is GA.
1111
:::
1212

13-
This page will be updated soon. In the meantime, you can learn more about other cloud [providers](/docs/category/providers/).
13+
Why should you use Defang with Google Cloud Platform (GCP)? Defang enables you to effortlessly create and manage full, scalable applications with GCP. It is designed to simplify deploying your services to the cloud. As one of the leading cloud providers globally, GCP offers powerful tools and resources, and with Defang, you can bypass the complexities and challenges of the GCP platform. Let Defang handle the heavy lifting so you can focus on what matters most to you!
14+
15+
## Getting Started
16+
To get started with the Defang BYOC GCP Provider, first [install the latest version of the Defang CLI](../getting-started#authenticate-with-defang). Next make sure you have signed up for a [Google Cloud Platform](https://cloud.google.com/).
17+
18+
After signing up for your GCP account, select an existing project or [create a new project](https://developers.google.com/workspace/guides/create-project), make sure [billing is enabled](https://cloud.google.com/billing/docs/how-to/modify-project) and note down the project ID and set it as environment variable `GCP_PROJECT_ID`.
19+
20+
```bash
21+
export GCP_PROJECT_ID=<your-project-id>
22+
```
23+
24+
Next step is to [authenticate your local environment with GCP](https://cloud.google.com/docs/authentication), our preferred method is to setup [Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc) with the google cloud CLI. Once the [google cloud CLI is installed](https://cloud.google.com/sdk/docs/install), run the following command to authenticate:
25+
26+
```bash
27+
gcloud init
28+
gcloud auth application-default login
29+
```
30+
31+
The Defang CLI will automatically check if they are set before running. Once you are ready to go, add the `--provider=gcp` to your command to tell the Defang CLI to use the GCP provider.
32+
33+
```bash
34+
$ defang up --provider=gcp
35+
# or
36+
$ export DEFANG_PROVIDER=gcp
37+
```
38+
39+
## Location
40+
41+
The Defang BYOC GCP Provider will use the location specified in the `GCP_LOCATION` environment variable. For a list of locations available in GCP, see the [location documentation](https://cloud.google.com/about/locations). If the `GCP_LOCATION` environment variable is not set, the default location `us-central1` (Iowa) will be used.
42+
43+
## Architecture
44+
45+
Defang uses GCP cloud run to build, deploy and run your services. The following describes the current state of Defang's support for GCP, the specific resources that Defang uses, and the roadmap for future support.
46+
47+
### Deployment
48+
49+
To deploy your services, the Defang CLI will setup some basic resources needed, including enabled required APIs in the project, create service accounts used to build and deploy your service with required permissions, and a [Google Cloud Storage](https://cloud.google.com/storage) bucket where Defang CLI packages your code and uploads it to. The CLI then deploys a Cloud Run Job that uses Pulumi to build your container image and run your services.
50+
51+
### Runtime
52+
53+
The Provider build and deploy your services using the [Google Cloud Run](https://cloud.google.com/run) jobs, and runs your workloads using the [Google Cloud Run](https://cloud.google.com/run) service.
54+
55+
### Secrets
56+
57+
The GCP provider does not currently support storing sensitive config values.
58+
59+
### Future Improvements
60+
61+
THe following features are in active development for GCP:
62+
- [Configuration and management of secrets](/docs/concepts//configuration.md)
63+
- [Networking and Load Balancing](/docs/concepts//networking.mdx)
64+
- [Custom Domains](/docs/concepts//domains.mdx)
65+
- [Managed Redis](/docs/concepts//managed-storage/managed-redis.md)
66+
- [Managed Postgres](/docs/concepts/managed-storage/managed-postgres.md)
67+
68+
Stayed tuned for future updates!

0 commit comments

Comments
 (0)