google-cloud-recipe-onboarding
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOnboarding to Google Cloud
Google Cloud 入门指南
This skill provides a streamlined "happy path" for a singleton developer to get
started with Google Cloud. It covers everything
from initial account setup to deploying your first cloud resource.
本技能为独立开发者提供了一条顺畅的Google Cloud入门“便捷路径”,内容涵盖从初始账户设置到部署首个云资源的所有步骤。
Overview
概述
For an individual developer, onboarding to Google Cloud involves establishing a
personal identity, setting up a billing method, and creating a workspace
(Project)
where resources can be managed. Google Cloud offers a Free Tier and Free Trial
for multiple products. Learn more
here.
Clarifying Questions
确认问题
Before proceeding, the agent should clarify the user's current status:
- Do you already have a Google Account (Gmail or Google Workspace)?
- Are you looking to set up a personal account for learning/experimentation, or are you part of an organization with existing infrastructure?
- Are you an IT admin within a larger enterprise, setting up Google Cloud for your organization?
- What is the first type of resource or application you are interested in building (e.g., a website, a data pipeline, a virtual machine)?
- Do you prefer to use the command line (CLI), an IDE (e.g. VSCode, Antigravity), or do you prefer using the web-based Google Cloud console?
开始操作前,Agent应先确认用户当前状态:
- 您是否已有Google Account(Gmail或Google Workspace)?
- 您是想要创建个人账户用于学习/实验,还是隶属于已有基础设施的组织?
- 您是否是大型企业的IT管理员,要为所在组织搭建Google Cloud?
- 您感兴趣构建的首个资源或应用类型是什么(例如网站、数据管道、虚拟机)?
- 您偏好使用命令行(CLI)、IDE(如VSCode、Antigravity),还是基于网页的Google Cloud console?
Prerequisites
前置条件
- A Google Account (e.g., @gmail.com).
- A valid payment method (credit card or bank account) for billing verification (even for the free trial).
- 一个Google Account(例如@gmail.com邮箱)。
- 有效的支付方式(信用卡或银行账户)用于账单验证(即使是免费试用也需要)。
Steps
步骤
1. Sign Up and Activate Free Credit
1. 注册并激活免费额度
- Go to the Google Cloud Console.
- Sign in with your Google Account. This will "Activate" your $300 free credit.
- 访问Google Cloud Console。
- 使用您的Google Account登录,这将激活300美元免费额度。
2. Create Your First Google Cloud Project
2. 创建首个Google Cloud项目
Google Cloud resources are organized into
Projects.
- In the Google Cloud console, click the project picker dropdown at the top of the page.
- Click New Project.
- Enter a Project Name (e.g., ).
my-first-gcp-project - Note the generated Project ID; you will use this for CLI and API interactions.
- Click Create.
Google Cloud资源通过**Projects**进行组织。
- 在Google Cloud控制台中,点击页面顶部的项目选择器下拉菜单。
- 点击New Project。
- 输入Project Name(例如)。
my-first-gcp-project - 记录生成的Project ID;您将在CLI和API交互中用到它。
- 点击Create。
3. Set Up Billing
3. 设置账单
Ensure your project is linked to your Free Trial Cloud
Billing
account.
- Go to the Billing section in the console.
- Confirm that your new project is listed under "Projects linked to this billing account."
确保您的项目已关联到免费试用的Cloud Billing账户。
- 进入控制台的Billing板块。
- 确认您的新项目已列在“关联到此账单账户的项目”下。
4. Install and Initialize the Google Cloud CLI
4. 安装并初始化Google Cloud CLI
The Google Cloud CLI
( CLI) is the primary tool for interacting with Google Cloud from your
local machine.
gcloud- Download and install the Google Cloud CLI.
- Open your terminal and run:
gcloud init - Follow the prompts to log in and select your project.
Google Cloud CLI( CLI)是从本地机器与Google Cloud交互的主要工具。
gcloud- 下载并安装Google Cloud CLI。
- 打开终端并运行:
gcloud init - 按照提示登录并选择您的项目。
5. Enable Necessary APIs
5. 启用必要的API
6. Deploy Your First Resource
6. 部署首个资源
Choose a simple entry point based on your needs: -
Cloud Run (Recommended for Apps):
Deploy a containerized "Hello World" app. -
Compute Engine: Create a small
Linux VM (e.g., which is part of the Always Free tier in certain
regions). - Cloud Storage:
Create a bucket to store files.
e2-microExample (Cloud Run):
bash
gcloud run deploy hello-world \
--image=gcr.io/cloudrun/hello \ --platform=managed \ --region=us-central1 \
--allow-unauthenticatedThis command will output a public URL, that you can reach in a web browser.
Congrats - you just deployed your first Google Cloud resource!
根据您的需求选择一个简单的入门方式:-
**Cloud Run(应用推荐):**部署一个容器化的“Hello World”应用。-
**Compute Engine:**创建一个小型Linux虚拟机(例如,在部分地区属于永久免费层级)。- **Cloud Storage:**创建一个存储桶用于存储文件。
e2-micro示例(Cloud Run):
bash
gcloud run deploy hello-world \
--image=gcr.io/cloudrun/hello \ --platform=managed \ --region=us-central1 \
--allow-unauthenticated该命令会输出一个公共URL,您可以在浏览器中访问它。恭喜您——您刚刚部署了首个Google Cloud资源!
7. Next Steps
7. 后续步骤
- Explore the Google Cloud Free Program to see what else you can do with your free credit.
- Read the Google Cloud Overview
- See the full list of 150+ Google Cloud products
- Explore the Enterprise Setup Guide for information on setting up Google Cloud for a team or organization.
- Compare AWS and Azure products to Google Cloud
- 探索Google Cloud免费计划,了解免费额度还能用于哪些操作。
- 阅读Google Cloud概述
- 查看150+款Google Cloud产品完整列表
- 探索企业设置指南,了解如何为团队或组织搭建Google Cloud。
- 对比AWS、Azure与Google Cloud的产品
Validation Logic
验证逻辑
Use this logic to determine if the user has successfully completed the Google
Cloud onboarding process:
- Project Created: Does the user have a Project ID?
- Billing Linked: Is the project associated with a billing account (check
via )?
gcloud beta billing projects describe PROJECT_ID - CLI Authenticated: Does show the correct account and project?
gcloud config list - Resource Verified: Can the user access the URL or IP of the deployed resource?
使用以下逻辑判断用户是否已完成Google Cloud入门流程:
- **项目已创建:**用户是否拥有Project ID?
- **账单已关联:**项目是否已关联到账单账户(可通过检查)?
gcloud beta billing projects describe PROJECT_ID - CLI已认证:是否显示正确的账户和项目?
gcloud config list - **资源已验证:**用户能否访问已部署资源的URL或IP?