快速入門導覽課程:將範例工作站集區部署至 Cloud Run

本頁說明如何部署範例工作站集區容器。部署後,工作站集區會持續寫入記錄訊息。

事前準備

  1. 登入 Google Cloud 帳戶。如果您是 Google Cloud新手,歡迎 建立帳戶,親自評估產品在實際工作環境中的成效。新客戶還能獲得價值 $300 美元的免費抵免額,可用於執行、測試及部署工作負載。
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.

  4. Verify that billing is enabled for your Google Cloud project.

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  6. If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.

  7. Verify that billing is enabled for your Google Cloud project.

  8. 查看 Cloud Run 定價,或使用 Pricing Calculator 估算費用。

必要的角色

如要取得完成本快速入門導覽課程所需的權限,請要求管理員授予您下列 IAM 角色:

如要進一步瞭解如何授予角色,請參閱「管理專案、資料夾和組織的存取權」。

您或許也能透過自訂角色或其他預先定義的角色,取得必要權限。

部署工作站集區

如要部署範例工作站集區容器,請按照下列步驟操作:

  1. 前往 Google Cloud 控制台的 Cloud Run:

    前往 Cloud Run

  2. 從選單中選取「工作站集區」,然後按一下「部署容器」,顯示「建立工作站集區」表單。

  3. 按一下「Test with a sample container」(使用範例容器進行測試)

  4. 按一下「建立」,將映像檔部署到 Cloud Run。等待部署作業完成。

  5. 按一下「Logs」(記錄) 分頁標籤,即可查看工作站集區寫入的記錄。 工作站集區會持續寫入記錄訊息 Cloud Run Worker Pool instance is running!

清除所用資源

為避免系統向您的 Google Cloud 帳戶收取額外費用,請刪除您透過本快速入門導覽課程部署的所有資源。

刪除存放區

將容器映像檔儲存在 Artifact Registry 中可能會產生費用。如要刪除 Artifact Registry 存放區,請按照 Artifact Registry 說明文件中的「刪除存放區」一節操作。

刪除工作站集區

範例工作站集區會持續寫入記錄。如要停止記錄,請按照下列任一方法刪除工作站集區:

  1. 前往 Google Cloud 控制台的 Cloud Run:

    前往 Cloud Run

  2. 從選單中選取「工作站集區」,然後選取要刪除的工作站集區。

  3. 點選「刪除」。

刪除測試專案

刪除 Google Cloud 專案後,系統就會停止對該專案中的所有資源收取費用。如要釋出專案中的所有 Google Cloud 資源,請按照下列步驟操作:

  1. 前往 Google Cloud 控制台的「Manage resources」(管理資源) 頁面。

    前往「Manage resources」(管理資源)

  2. 在專案清單中選取要刪除的專案,然後點選「Delete」(刪除)
  3. 在對話方塊中輸入專案 ID,然後按一下 [Shut down] (關閉) 以刪除專案。

後續步驟

如要進一步瞭解工作站集區,請參閱: