Skip to content

Commit 288a6f1

Browse files
write the GCP tutorial
1 parent 6f3649f commit 288a6f1

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

docs/tutorials/deploy-to-gcp.mdx

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,39 @@ sidebar_position: 11
66

77
# Deploying to Google Cloud Platform (GCP) With Defang
88

9-
This tutorial is coming soon.
9+
This tutorial will show you how to deploy your services to your own AWS account using Defang.
1010

11-
---
11+
## Pre-requisites
12+
* [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/)
13+
* [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/)
14+
* [A Defang Account](/docs/concepts/authentication)
15+
* [The Defang CLI](/docs/getting-started#install-the-defang-cli)
16+
* [GCP Account Credentials](https://cloud.google.com/docs/authentication)
1217

13-
For a deeper discussion of the Defang GCP Architecture, see our [GCP docs](/docs/providers/gcp).
18+
## Step 1 - Navigate to your project directory
19+
Head to the folder where your project is located.
20+
```bash
21+
$ cd path/to/your/project
22+
```
23+
24+
## Step 2 - Authenticate Defang to use your GCP Account
25+
26+
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). Then, note down the project ID and set it as environment variable `GCP_PROJECT_ID`.
27+
28+
## Step 3 - Deploy
29+
30+
Invoke the `defang up` CLI command with the `--provider=gcp` flag or set the `DEFANG_PROVIDER=gcp` environment variable.
1431

32+
For example:
33+
34+
```bash
35+
$ defang up --provider=gcp
36+
```
37+
38+
## Step 4 - Inspect your deployment
39+
40+
Defang will provision resources in your GCP account and deploy your services. You can inspect the resources created in your GCP dashboard.
41+
42+
***
43+
44+
For a deeper discussion of the Defang GCP Architecture, see our [GCP docs](/docs/providers/gcp).

0 commit comments

Comments
 (0)