diff --git a/docs/tutorials/setting_up_your_gcp_account.md b/docs/tutorials/setting_up_your_gcp_account.md new file mode 100644 index 000000000..643a3b406 --- /dev/null +++ b/docs/tutorials/setting_up_your_gcp_account.md @@ -0,0 +1,105 @@ +--- +title: Setting Up Your GCP Account +sidebar_position: 0 +description: Follow these steps to set up your Google Cloud Platform (GCP) account for deploying applications with Defang. +--- + +# Setting Up Your GCP Account + + Follow these steps to set up your Google Cloud Platform (GCP) account for deploying applications with Defang. + +--- + +### Step 1: Create Your GCP Account + +Start by creating a Google Cloud account using the [GCP account creation flow](https://cloud.google.com/). + +--- + +### Step 2: Create a GCP Project + +To deploy apps using Defang, you need a GCP project. Projects help organize related resources such as services, IAM policies, quotas, and billing. + +If you already have a project, skip to [Step 3](#step-3-create-your-billing-account). + +To create a new project: + +1. Visit the [GCP Console](https://console.cloud.google.com/). +2. Click the project selector button (it may say **"Select a project"** or display a previous project name). +
+ GCP console with the project select button highlighted +
Select project button to open the project dialog
+
+ +3. Follow the prompts to create a new project. + +:::info +Take note of your **Project ID** — you’ll need it later when setting the `GCP_PROJECT_ID` environment variable. +::: + +
+ GCP project creation dialog +
Create a new project in the dialog
+
+ +--- + +### Step 3: Create Your Billing Account + +Billing accounts let Google allocate costs to specific entities or users. You’ll need one to deploy services. + +1. In the [GCP Console](https://console.cloud.google.com/), open the navigation menu. +2. Select **Billing**. + +
+ Billing option in GCP menu +
Billing menu option
+
+ +3. In the billing side panel, select **Manage billing accounts**, then click **Create account**. +4. Follow the steps to create a billing account. A credit card is required. + +
+ Create billing account page +
Billing management page
+
+ +--- + +### Step 4: Link Your Project to the Billing Account + +Once your project and billing account are created, link them together: + +1. In the GCP Console, select your project from the project selector. +2. Open the **Billing** section again from the left sidebar. +3. Click **Link a billing account**. + +
+ Link billing account dialog +
Link billing account dialog
+
+ +4. Choose the billing account to link. + +
+ Billing account selection dialog +
Select a billing account to link
+
+ +--- + +### Step 5: Set Up Your GCP CLI + +To complete your setup, install the **gcloud CLI** by following the [installation guide](https://cloud.google.com/sdk/docs/install). + +After installation, authenticate with: + +``` +gcloud auth application-default login +``` + +This will generate your **application default credentials** used during deployment. + +--- + +Now you're ready to deploy! See the [Deploy to GCP tutorial](/docs/tutorials/deploy-to-gcp.mdx) for next steps. diff --git a/static/img/setting-up-your-gcp-account/billing-menu-option.png b/static/img/setting-up-your-gcp-account/billing-menu-option.png new file mode 100644 index 000000000..15d4568cd Binary files /dev/null and b/static/img/setting-up-your-gcp-account/billing-menu-option.png differ diff --git a/static/img/setting-up-your-gcp-account/create-billing-account.png b/static/img/setting-up-your-gcp-account/create-billing-account.png new file mode 100644 index 000000000..e2c269d27 Binary files /dev/null and b/static/img/setting-up-your-gcp-account/create-billing-account.png differ diff --git a/static/img/setting-up-your-gcp-account/link-billing-account.png b/static/img/setting-up-your-gcp-account/link-billing-account.png new file mode 100644 index 000000000..89ac21ef8 Binary files /dev/null and b/static/img/setting-up-your-gcp-account/link-billing-account.png differ diff --git a/static/img/setting-up-your-gcp-account/link-billing-select-account-dialog.png b/static/img/setting-up-your-gcp-account/link-billing-select-account-dialog.png new file mode 100644 index 000000000..235e20dbc Binary files /dev/null and b/static/img/setting-up-your-gcp-account/link-billing-select-account-dialog.png differ diff --git a/static/img/setting-up-your-gcp-account/manage-billing-accounts.png b/static/img/setting-up-your-gcp-account/manage-billing-accounts.png new file mode 100644 index 000000000..3b3563c0b Binary files /dev/null and b/static/img/setting-up-your-gcp-account/manage-billing-accounts.png differ diff --git a/static/img/setting-up-your-gcp-account/manage-billings-dialog.png b/static/img/setting-up-your-gcp-account/manage-billings-dialog.png new file mode 100644 index 000000000..f7c1a048c Binary files /dev/null and b/static/img/setting-up-your-gcp-account/manage-billings-dialog.png differ diff --git a/static/img/setting-up-your-gcp-account/new-project.png b/static/img/setting-up-your-gcp-account/new-project.png new file mode 100644 index 000000000..9c91ed132 Binary files /dev/null and b/static/img/setting-up-your-gcp-account/new-project.png differ diff --git a/static/img/setting-up-your-gcp-account/select-project.png b/static/img/setting-up-your-gcp-account/select-project.png new file mode 100644 index 000000000..1946551ad Binary files /dev/null and b/static/img/setting-up-your-gcp-account/select-project.png differ