Application Design Center 和 App Lifecycle Manager 可讓您標準化及擴充多租戶 SaaS 交付作業,不必為每位客戶手動設定基礎架構。您可以在 App Design Center 將可重複使用的 Terraform 模組組合成複合應用程式範本,然後在 App Lifecycle Manager 將這些範本封裝成代管 SaaS 產品。
在本教學課程中,您將佈建獨立的租戶環境,並自動執行漸進式更新和推出作業。這個工作流程專為平台工程師、企業架構師和 DevOps 營運人員設計。
目標
- 準備含有 Cloud Run 和 Cloud Storage Terraform 模組的 GitHub 存放區。
- 使用 Developer Connect 將 GitHub 存放區連結至 Google Cloud 。
- 匯入 Terraform 模組,在 App Design Center 建立元件範本並編入目錄。
- 設計包含元件範本的複合式應用程式範本。
- 在 App Lifecycle Manager 中封裝範本並部署客戶環境。
- 在客戶環境中自動逐步推出。
費用
在本文件中,您會使用下列 Google Cloud計費元件:
您可以使用 Pricing Calculator,根據預測用量估算費用。
完成本文所述工作後,您可以刪除建立的資源,避免繼續計費,詳情請參閱「清除所用資源」。
事前準備
-
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 theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Developer Connect, Secret Manager, App Lifecycle Manager, Infrastructure Manager, and Cloud Run APIs, if any are not already enabled.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.-
確認您在專案中具備下列 Identity and Access Management (IAM) 角色:
- Application Design Center 管理員 (
roles/designcenter.admin) 和服務使用情形管理員 (roles/serviceusage.serviceUsageAdmin) 角色,才能執行設定。 - SaaS Service Management 管理員 (
roles/saasservicemgmt.admin) - Developer Connect 管理員 (
roles/developerconnect.admin) - 專案 IAM 管理員 (
roles/resourcemanager.projectIamAdmin) 或安全管理員 (roles/iam.securityAdmin),可建立服務帳戶並授予 IAM 角色。 - Cloud Run 管理員 (
roles/run.admin) - 儲存空間管理員 (
roles/storage.admin) - 服務帳戶管理員 (
roles/iam.serviceAccountAdmin)
- Application Design Center 管理員 (
-
安裝 Google Cloud CLI,然後初始化:
確認您已安裝gcloud init
beta元件:gcloud components install beta
-
使用單一專案應用程式管理邊界,完成專案的 Application Design Center 設定。設定完成後,系統會啟用應用程式管理功能、為 Terraform 佈建儲存空間 bucket,並建立
default-space空間和default-catalog目錄。 - 在本機電腦上安裝 Git。
- 確認您擁有 GitHub 帳戶,且有權建立存放區及產生個人存取權杖。
設定環境和來源存放區
如要為本教學課程設定環境,請指定變數值並設定 GitHub 存放區。
指定教學課程變數
在本教學課程和指令終端機中設定變數。
設定下列變數,更新本教學課程中的指令:
變數 說明 值 PROJECT_ID您的 Google Cloud 專案 ID PROJECT_IDREGIONApp Design Center 資源、Developer Connect、App Lifecycle Manager 產品和租戶基礎架構的部署區域 us-central1在指令終端機中,設定有效的 Google Cloud 專案:
gcloud config set project PROJECT_ID擷取 Google Cloud 專案編號,並儲存至環境變數:
PROJECT_NUM=$(gcloud projects describe PROJECT_ID --format="value(projectNumber)")
建立 Terraform 設定檔
為 Cloud Run 和 Cloud Storage 建立模組化 Terraform 定義。稍後您會將這些模組匯入 App Design Center,封裝成可重複使用的架構元件。
為 Terraform 模組建立本機目錄結構:
mkdir -p adc-alm-starter/infra/cloud-run mkdir -p adc-alm-starter/infra/cloud-storage cd adc-alm-starter在
infra/cloud-run/main.tf中,建立 Cloud Run 模組定義:terraform { required_version = ">= 1.5.0" required_providers { google = { source = "hashicorp/google" version = ">= 5.0.0" } } } variable "project_id" { type = string description = "The Google Cloud project ID." } variable "region" { type = string description = "The deployment region." default = "us-central1" } variable "service_name" { type = string description = "Name of the Cloud Run service." default = "sample-app" } variable "bucket_name" { type = string description = "Name of the Cloud Storage bucket to connect." default = "" } resource "google_service_account" "app_sa" { account_id = "${var.service_name}-sa" display_name = "Service Account for ${var.service_name}" project = var.project_id } resource "google_cloud_run_v2_service" "app_service" { name = var.service_name location = var.region project = var.project_id deletion_protection = false template { service_account = google_service_account.app_sa.email containers { image = "us-docker.pkg.dev/cloudrun/container/hello" env { name = "STORAGE_BUCKET" value = var.bucket_name } resources { limits = { cpu = "1" memory = "512Mi" } } } } } output "service_url" { description = "URL of the deployed Cloud Run service." value = google_cloud_run_v2_service.app_service.uri } output "service_account_email" { description = "Email of the Cloud Run service account." value = google_service_account.app_sa.email }在
infra/cloud-run/metadata.yaml中,建立模組中繼資料定義:apiVersion: blueprints.cloud.google.com/v1alpha1 kind: BlueprintMetadata metadata: name: cloud-run-component spec: info: title: Cloud Run Component version: 0.1.0 actuationTool: flavor: Terraform version: ">= 1.5.0" interfaces: variables: - name: project_id description: The Google Cloud project ID. varType: string required: true - name: region description: The deployment region. varType: string defaultValue: us-central1 - name: service_name description: Name of the Cloud Run service. varType: string defaultValue: sample-app - name: bucket_name description: Name of the Cloud Storage bucket to connect. varType: string defaultValue: "" outputs: - name: service_url description: URL of the deployed Cloud Run service. - name: service_account_email description: Email of the Cloud Run service account.在
infra/cloud-storage/main.tf中,建立 Cloud Storage 模組定義:terraform { required_version = ">= 1.5.0" required_providers { google = { source = "hashicorp/google" version = ">= 5.0.0" } random = { source = "hashicorp/random" version = ">= 3.5.0" } } } variable "project_id" { type = string description = "The Google Cloud project ID." } variable "region" { type = string description = "The deployment region." default = "us-central1" } variable "bucket_name_prefix" { type = string description = "Prefix for the Cloud Storage bucket." default = "app-data" } variable "writer_service_account" { type = string description = "Service account email granted objectAdmin permissions." default = "" } resource "random_id" "bucket_suffix" { byte_length = 4 } resource "google_storage_bucket" "bucket" { name = "${var.bucket_name_prefix}-${random_id.bucket_suffix.hex}" location = var.region project = var.project_id uniform_bucket_level_access = true force_destroy = true } resource "google_storage_bucket_iam_member" "writer_grant" { count = var.writer_service_account != "" ? 1 : 0 bucket = google_storage_bucket.bucket.name role = "roles/storage.objectAdmin" member = "serviceAccount:${var.writer_service_account}" } output "bucket_name" { description = "Name of the created storage bucket." value = google_storage_bucket.bucket.name }在
infra/cloud-storage/metadata.yaml中,建立模組中繼資料定義:apiVersion: blueprints.cloud.google.com/v1alpha1 kind: BlueprintMetadata metadata: name: cloud-storage-component spec: info: title: Cloud Storage Component version: 0.1.0 actuationTool: flavor: Terraform version: ">= 1.5.0" interfaces: variables: - name: project_id description: The Google Cloud project ID. varType: string required: true - name: region description: The deployment region. varType: string defaultValue: us-central1 - name: bucket_name_prefix description: Prefix for the Cloud Storage bucket. varType: string defaultValue: app-data - name: writer_service_account description: Service account email granted objectAdmin permissions. varType: string defaultValue: "" outputs: - name: bucket_name description: Name of the created storage bucket.
將 Terraform 推送至 GitHub
將 Terraform 設定提交至 GitHub 存放區,並透過 Developer Connect 將存放區連結至 Google Cloud 。建立連線後,App Design Center 就能安全存取,直接從原始碼控管匯入基礎架構修訂版本。
在網路瀏覽器中,建立名為
adc-alm-starter的新 GitHub 存放區。在 GitHub 中建立精細的個人存取權杖,驗證
git push指令。選取adc-alm-starter存放區,並授予「Contents: Read and write」權限。在指令終端機中,於
adc-alm-starter目錄初始化 Git、修訂檔案,並推送至 GitHub:cd adc-alm-starter git init git add infra/ git commit -m "feat: initialize Cloud Run and Cloud Storage modules" git branch -M main git remote add origin https://github.com/GITHUB_USER_OR_ORG/adc-alm-starter.git git push -u origin main系統提示您驗證時,請輸入 GitHub 使用者名稱和個人存取權杖。
前往 Google Cloud 控制台的「Developer Connect」頁面:
在
us-central1區域為 GitHub 帳戶建立連線,並連結存放區。如需詳細操作說明,請參閱「連線至 GitHub」。找出連結存放區的連線 ID 和 Git 存放區連結 ID,並更新下列變數:
CONNECTION_ID:Developer Connect 連線 ID。GIT_REPO_LINK_ID:連結的 Git 存放區 ID。
在 App Design Center 建立範本
如要設計 Google Cloud 基礎架構,請將 Terraform 模組匯入 App Design Center,做為元件範本。接著建立包含這些元件的複合應用程式範本。
驗證空間和目錄
如果您已在 Google Cloud 控制台完成 App Design Center 設定,系統會自動建立預設空間和目錄。
如果您是使用 gcloud CLI 完成設定,請按照下列步驟操作:
確認您所在區域有
default-space:gcloud design-center spaces describe "default-space" \ --location="us-central1"將
default-space替換為 App Design Center 空間 ID。如果空間不存在,請建立空間和目錄:
gcloud design-center spaces create "default-space" \ --location="us-central1" \ --display-name="Default Space" gcloud design-center spaces catalogs create "default-catalog" \ --space="default-space" \ --location="us-central1" \ --display-name="Default Catalog"將
default-catalog替換為目錄 ID。
建立元件範本
元件範本會將個別 Terraform 模組轉換為建構模塊,可新增至多服務應用程式範本。
根據 Git 存放區中的 Terraform 模組建立元件範本:
為 Cloud Run 建立目錄範本:
gcloud design-center spaces catalogs templates create "cloud-run-component" \ --space="default-space" \ --catalog="default-catalog" \ --location="us-central1" \ --display-name="Cloud Run Component" \ --template-category=component-template將
cloud-run-component替換為 Cloud Run 元件範本的 ID。為 Cloud Storage 建立目錄範本:
gcloud design-center spaces catalogs templates create "cloud-storage-component" \ --space="default-space" \ --catalog="default-catalog" \ --location="us-central1" \ --display-name="Cloud Storage Component" \ --template-category=component-template將
cloud-storage-component替換為 Cloud Storage 元件範本 ID。從 Git 存放區匯入 Cloud Run Terraform 模組,建立範本修訂版本:
gcloud design-center spaces catalogs templates revisions create r-1 \ --template="cloud-run-component" \ --catalog="default-catalog" \ --space="default-space" \ --location="us-central1" \ --developer-connect-repo="projects/PROJECT_ID/locations/us-central1/connections/CONNECTION_ID/gitRepositoryLinks/GIT_REPO_LINK_ID" \ --developer-connect-repo-dir="infra/cloud-run" \ --developer-connect-repo-ref="refs/heads/main"更改下列內容:
CONNECTION_ID:Developer Connect 連線 ID。GIT_REPO_LINK_ID:連結的 Git 存放區連結 ID。
從 Git 存放區匯入 Cloud Storage Terraform 模組,建立範本修訂版本:
gcloud design-center spaces catalogs templates revisions create r-1 \ --template="cloud-storage-component" \ --catalog="default-catalog" \ --space="default-space" \ --location="us-central1" \ --developer-connect-repo="projects/PROJECT_ID/locations/us-central1/connections/CONNECTION_ID/gitRepositoryLinks/GIT_REPO_LINK_ID" \ --developer-connect-repo-dir="infra/cloud-storage" \ --developer-connect-repo-ref="refs/heads/main"更改下列內容:
CONNECTION_ID:Developer Connect 連線 ID。GIT_REPO_LINK_ID:連結的 Git 存放區連結 ID。
列出工作區中的共用範本,擷取共用範本 ID:
gcloud design-center spaces shared-templates list \ --space="default-space" \ --location="us-central1"在指令輸出內容中,記下
cloud-run-component和cloud-storage-component的name欄位 (projects/PROJECT_ID/locations/us-central1/spaces/default-space/sharedTemplates/SHARED_TEMPLATE_ID) 中的SHARED_TEMPLATE_ID區段。
建立複合式應用程式範本
將元件範本合併為複合式應用程式範本,並設定參數連結。App Lifecycle Manager 會使用複合範本,將應用程式拓撲做為 SaaS 產品管理。您會指定輸出和輸入內容,確保 Cloud Run 服務自動接收 bucket 名稱和必要的 IAM 權限,以便存取 Cloud Storage。
建立複合式應用程式範本:
gcloud design-center spaces application-templates create "run-storage-app" \ --space="default-space" \ --location="us-central1" \ --display-name="Cloud Run and Storage Multi-Tenant Application" \ --composition-type=composite將
run-storage-app替換為複合應用程式範本 ID。將 Cloud Run 元件新增至應用程式範本:
gcloud design-center spaces application-templates components create cloud-run-comp \ --application-template="run-storage-app" \ --space="default-space" \ --location="us-central1" \ --shared-template-revision-uri="projects/PROJECT_ID/locations/us-central1/spaces/default-space/sharedTemplates/RUN_SHARED_TEMPLATE_ID/revisions/r-1"將
RUN_SHARED_TEMPLATE_ID替換為您擷取的cloud-run-component共用範本 ID。將 Cloud Storage 元件新增至應用程式範本:
gcloud design-center spaces application-templates components create cloud-storage-comp \ --application-template="run-storage-app" \ --space="default-space" \ --location="us-central1" \ --shared-template-revision-uri="projects/PROJECT_ID/locations/us-central1/spaces/default-space/sharedTemplates/STORAGE_SHARED_TEMPLATE_ID/revisions/r-1"將
STORAGE_SHARED_TEMPLATE_ID替換為您擷取的cloud-storage-component共用範本 ID。建立從 Cloud Run 服務到 Cloud Storage bucket 的連線。這會將 bucket 輸出內容連結至服務環境變數,並授予服務帳戶 IAM 存取權:
gcloud design-center spaces application-templates components connections create run-to-storage \ --component=cloud-run-comp \ --application-template="run-storage-app" \ --space="default-space" \ --location="us-central1" \ --destination-component-uri="projects/PROJECT_ID/locations/us-central1/spaces/default-space/applicationTemplates/run-storage-app/components/cloud-storage-comp" \ --source-component-parameters='[{"key": "bucket_name", "value": "module.cloud-storage-comp.bucket_name"}]' \ --destination-component-parameters='[{"key": "writer_service_account", "value": "module.cloud-run-comp.service_account_email"}]'修訂應用程式範本,產生不可變更的範本修訂版本:
gcloud design-center spaces application-templates commit "run-storage-app" \ --space="default-space" \ --location="us-central1"指令輸出會確認產生的修訂版本 ID (例如
r-1),您在 App Lifecycle Manager 中建立 SaaS 產品時,會參照這個 ID。
使用 App Lifecycle Manager 部署客戶環境
使用 App Lifecycle Manager 將應用程式範本轉換為可部署的產品,並為每位客戶佈建專屬環境。
建立應用程式範本套件
向 App Lifecycle Manager 註冊範本修訂版本,建立可部署的 SaaS 產品:
在
us-central1中建立 SaaS 產品:gcloud beta app-lifecycle-manager saas create "saas-run-storage" \ --location="us-central1" \ --locations=name="us-central1" \ --application-template="projects/PROJECT_ID/locations/us-central1/spaces/default-space/applicationTemplates/run-storage-app" \ --application-template-revision="projects/PROJECT_ID/locations/us-central1/spaces/default-space/applicationTemplates/run-storage-app/revisions/r-1"將
saas-run-storage替換為 SaaS 產品 ID。列出產生的版本,擷取發行品 ID、單元 kind 和輸入變數:
gcloud beta app-lifecycle-manager releases list \ --location="us-central1"App Lifecycle Manager 會以非同步方式建構及封裝複合範本的藍圖。如果清單空白,請稍候幾分鐘,然後重新執行指令。
指令會輸出下列資訊:
name欄位 (例如projects/PROJECT_ID/locations/us-central1/releases/r-r-1-06c6a0)。結尾部分是RELEASE_ID(例如r-r-1-06c6a0)。unitKind欄位 (例如projects/PROJECT_ID/locations/us-central1/unitKinds/u-native-components-e97e0c)。結尾部分是UNIT_KIND_ID(例如u-native-components-e97e0c)。
建立部署作業服務帳戶
建立服務帳戶,授予 App Lifecycle Manager 代您佈建資源的權限:
建立啟動用服務帳戶:
gcloud iam service-accounts create "tenant-actuation-sa" \ --display-name="Tenant Actuation Service Account"將
tenant-actuation-sa替換為啟動服務帳戶的名稱。建構服務帳戶電子郵件,並擷取 App Lifecycle Manager 服務代理身分:
ACTUATION_SA="tenant-actuation-sa@PROJECT_ID." ALM_P4SA="service-${PROJECT_NUM}@gcp-sa-saasservicemgmt." INFRA_MANAGER_P4SA="service-${PROJECT_NUM}@gcp-sa-config."將必要角色授予啟動服務帳戶,以便建立及管理租戶基礎架構:
gcloud projects add-iam-policy-binding "PROJECT_ID" \ --member="serviceAccount:${ACTUATION_SA}" \ --role="roles/run.admin" \ --condition=None gcloud projects add-iam-policy-binding "PROJECT_ID" \ --member="serviceAccount:${ACTUATION_SA}" \ --role="roles/storage.admin" \ --condition=None gcloud projects add-iam-policy-binding "PROJECT_ID" \ --member="serviceAccount:${ACTUATION_SA}" \ --role="roles/iam.serviceAccountAdmin" \ --condition=None gcloud projects add-iam-policy-binding "PROJECT_ID" \ --member="serviceAccount:${ACTUATION_SA}" \ --role="roles/iam.serviceAccountUser" \ --condition=None gcloud projects add-iam-policy-binding "PROJECT_ID" \ --member="serviceAccount:${ACTUATION_SA}" \ --role="roles/config.admin" \ --condition=None授予 App Lifecycle Manager 和 Infra Manager 服務代理權限,模擬啟動用服務帳戶:
gcloud iam service-accounts add-iam-policy-binding "${ACTUATION_SA}" \ --member="serviceAccount:${ALM_P4SA}" \ --role="roles/iam.serviceAccountUser" \ --condition=None gcloud iam service-accounts add-iam-policy-binding "${ACTUATION_SA}" \ --member="serviceAccount:${ALM_P4SA}" \ --role="roles/iam.serviceAccountTokenCreator" \ --condition=None gcloud iam service-accounts add-iam-policy-binding "${ACTUATION_SA}" \ --member="serviceAccount:${INFRA_MANAGER_P4SA}" \ --role="roles/iam.serviceAccountUser" \ --condition=None
為客戶部署環境
建立客戶環境,並觸發專屬基礎架構的部署作業:
使用產生的單元 kind,建立代表獨立客戶租戶的環境
Unit:gcloud beta app-lifecycle-manager units create "tenant-1" \ --location="us-central1" \ --unit-kind="UNIT_KIND_ID"將
tenant-1替換為您的獨立租用環境識別碼。觸發單元作業,佈建租戶基礎架構:
gcloud beta app-lifecycle-manager unit-operations create provision-tenant-1 \ --location="us-central1" \ --unit="projects/PROJECT_ID/locations/us-central1/units/tenant-1" \ --provision \ --provision-release="RELEASE_ID" \ --provision-input-variables=variable=project_id,value="PROJECT_ID",type=string \ --provision-input-variables=variable=project_number,value="${PROJECT_NUM}",type=string \ --provision-input-variables=variable=actuation_sa,value="${ACTUATION_SA}",type=string \ --provision-input-variables=variable=cloud-run-comp_project_id,value="PROJECT_ID",type=string \ --provision-input-variables=variable=cloud-run-comp_region,value="us-central1",type=string \ --provision-input-variables=variable=cloud-storage-comp_project_id,value="PROJECT_ID",type=string \ --provision-input-variables=variable=cloud-storage-comp_region,value="us-central1",type=string說明監控佈建狀態的單位作業,直到達到
SUCCEEDED為止:gcloud beta app-lifecycle-manager unit-operations describe provision-tenant-1 \ --location="us-central1"
自動更新客戶環境
使用推出功能,在所有客戶環境中安全部署應用程式更新。
選擇更新策略
定義更新如何傳遞至客戶環境,例如一次部署所有更新或分階段部署:
建立
RolloutKind,定義單元的自動調度管理策略:gcloud beta app-lifecycle-manager rollout-kinds create "progressive-rollout" \ --location="us-central1" \ --unit-kind="projects/PROJECT_ID/locations/us-central1/unitKinds/UNIT_KIND_ID" \ --rollout-orchestration-strategy="Google.Cloud.Simple.AllAtOnce"將
progressive-rollout替換為推出種類 ID。
部署及追蹤更新
開始推出並監控進度,直到部署完成:
觸發推出作業,將版本部署至符合條件的獨立租用環境:
gcloud beta app-lifecycle-manager rollouts create "rollout-v1" \ --location="us-central1" \ --rollout-kind="projects/PROJECT_ID/locations/us-central1/rolloutKinds/progressive-rollout" \ --release="projects/PROJECT_ID/locations/us-central1/releases/RELEASE_ID"將
rollout-v1替換為推出作業的 ID。說明推出作業,檢查執行中的作業,並確認狀態達到
SUCCEEDED:gcloud beta app-lifecycle-manager rollouts describe "rollout-v1" \ --location="us-central1"推出作業輸出內容會確認獨立租用環境已更新為目標範本修訂版本。
清除所用資源
為避免因為本教學課程所用資源,導致系統向 Google Cloud 收取費用,請刪除含有相關資源的專案,或者保留專案但刪除個別資源。
刪除專案
刪除 Google Cloud 專案:
gcloud projects delete PROJECT_ID
刪除個別資源
如果您將教學課程資源部署至現有專案,請按照依附元件的反向順序刪除個別資源,以免產生非預期的費用:
取消佈建客戶環境基礎架構,並等待作業完成:
gcloud beta app-lifecycle-manager unit-operations create deprovision-tenant-1 \ --location="us-central1" \ --unit="projects/PROJECT_ID/locations/us-central1/units/tenant-1" \ --deprovision gcloud beta app-lifecycle-manager unit-operations describe deprovision-tenant-1 \ --location="us-central1"刪除 App Lifecycle Manager 客戶環境:
gcloud beta app-lifecycle-manager units delete "tenant-1" \ --location="us-central1" \ --quiet按照依附元件的反向順序,刪除 App Lifecycle Manager 推出作業和發布資源:
gcloud beta app-lifecycle-manager rollouts delete "rollout-v1" \ --location="us-central1" \ --quiet gcloud beta app-lifecycle-manager rollout-kinds delete "progressive-rollout" \ --location="us-central1" \ --quiet gcloud beta app-lifecycle-manager releases delete "RELEASE_ID" \ --location="us-central1" \ --quiet gcloud beta app-lifecycle-manager unit-kinds delete "UNIT_KIND_ID" \ --location="us-central1" \ --quiet gcloud beta app-lifecycle-manager saas delete "saas-run-storage" \ --location="us-central1" \ --quiet刪除 App Design Center 應用程式範本、目錄項目和工作區:
gcloud design-center spaces application-templates delete "run-storage-app" \ --space="default-space" \ --location="us-central1" \ --force \ --quiet gcloud design-center spaces catalogs templates delete "cloud-run-component" \ --space="default-space" \ --catalog="default-catalog" \ --location="us-central1" \ --force \ --quiet gcloud design-center spaces catalogs templates delete "cloud-storage-component" \ --space="default-space" \ --catalog="default-catalog" \ --location="us-central1" \ --force \ --quiet gcloud design-center spaces delete "default-space" \ --location="us-central1" \ --force \ --quiet刪除 Developer Connect Git 存放區連結和連線:
gcloud developer-connect connections git-repository-links delete "GIT_REPO_LINK_ID" \ --connection="CONNECTION_ID" \ --location="us-central1" \ --quiet gcloud developer-connect connections delete "CONNECTION_ID" \ --location="us-central1" \ --quiet刪除啟動用服務帳戶:
gcloud iam service-accounts delete "${ACTUATION_SA}" \ --quiet
後續步驟
- 進一步瞭解如何在 App Design Center 設計複合應用程式範本。
- 進一步瞭解 App Lifecycle Manager 的推出自動化調度管理策略。
- 查看 Google Cloud 的參考架構、圖表和最佳做法。歡迎瀏覽 Cloud Architecture Center。