步驟 1:啟用 API

如要使用 Apigee hybrid,您必須 (除非另有說明) 啟用下列 服務 API

工作 說明
Apigee API 提供專案與其他混合服務和 Google Cloud API 之間的通訊。
Apigee Connect API 提供 Apigee 管理層與執行階段層之間的通訊。
Cloud Pub/Sub API 必須提供此值,才能運作 Apigee 配額功能。
Cloud Resource Manager API Hybrid 會使用這項參數驗證服務帳戶。
Kubernetes Engine API 如果您打算使用 Google Kubernetes Engine (GKE) 或 GKE 內部部署 (Anthos) 進行混合式執行階段安裝作業,請啟用這項功能。
Compute Engine API 用於叢集管理 (僅限以 GKE 為基礎的叢集和以 Google Cloud 為基礎的 OpenShift 叢集)。
Google Cloud API 這是 Google Cloud API 的元服務,可提供便利性 (僅適用於 Google Cloud 叢集中的 OpenShift)。
Cloud DNS API Google Cloud DNS 是一項穩固可靠、可擴充的權威網域名稱系統 (DNS) 代管服務,採用與 Google 相同的基礎架構。(僅限 Google Cloud 叢集中的 OpenShift)。
Identity and Access Management (IAM) API 管理 Google Cloud Platform 資源的身分識別和存取權控管功能,包括建立服務帳戶,讓您用來向 Google 驗證身分並進行 API 呼叫。(僅限 Google Cloud 叢集中的 OpenShift)。
IAM Service Account Credentials API 服務帳戶憑證 API 可讓開發人員為 Google Cloud 中的服務帳戶建立短期、權限受限的憑證。(僅限 Google Cloud 叢集中的 OpenShift)。
Service Management API Google 服務管理可讓服務供應者在 Google Cloud Platform 上發布服務,讓服務消費者能夠探索及使用這些服務。(僅限 Google Cloud 叢集中的 OpenShift)。
服務使用情形 API 啟用服務消費者想在 Google Cloud Platform 上使用的服務、列出可用的或已啟用的服務,或是停用服務消費者不再使用的服務。(僅限 Google Cloud 叢集中的 OpenShift)。
Google Cloud Storage JSON API 可讓您儲存及擷取可能很大且無法改變的資料物件 (僅限 Google Cloud 叢集中的 OpenShift)。
Cloud Storage Google Cloud Storage 是符合 REST 樣式的服務,可用於儲存及存取 Google 基礎架構資料。(僅限 Google Cloud 叢集中的 OpenShift)。

請使用 gcloud 啟用必要的 API,如以下步驟所述。如有需要,您可以使用 Cloud 控制台啟用 API。

  1. 完成前置條件,並確認您已在本機殼層安裝 gcloud CLI
    gcloud -h
  2. 建立 PROJECT_ID 環境變數,其中的值為您打算用於 Apigee hybrid 的 Google Cloud 專案 ID。專案 ID 是用於區分 Google Cloud 中所有專案的專屬字串。如有需要,請參閱「找出專案 ID」:
    export PROJECT_ID=YOUR_PROJECT_ID
  3. 選取所需安裝項目的分頁標籤,即可查看啟用 API 的指令:

    GKE

    如果您要在 Google Cloud (GKE) 中執行叢集,請使用下列指令啟用 API:

    gcloud services enable \
        apigee.googleapis.com \
        apigeeconnect.googleapis.com \
        cloudresourcemanager.googleapis.com \
        compute.googleapis.com \
        container.googleapis.com \
        pubsub.googleapis.com --project $PROJECT_ID
    

    Google Cloud 上的 OpenShift

    如果您要在 Google Cloud 的 OpenShift 上執行叢集,請使用下列指令啟用這些 API:

    gcloud services enable \
        apigee.googleapis.com \
        apigeeconnect.googleapis.com \
        cloudapis.googleapis.com \
        cloudresourcemanager.googleapis.com \
        compute.googleapis.com \
        dns.googleapis.com \
        iam.googleapis.com \
        iamcredentials.googleapis.com \
        pubsub.googleapis.com  --project $PROJECT_ID
        servicemanagement.googleapis.com \
        serviceusage.googleapis.com \
        storage-api.googleapis.com \
        storage-component.googleapis.com  --project $PROJECT_ID
    

    其他平台

    如果您要在其他 Kubernetes 平台 (例如

    • GKE On-Prem
    • 裸機中的 Anthos
    • AKS
    • GKE on AWS
    • EKS
    gcloud services enable \
        apigee.googleapis.com \
        apigeeconnect.googleapis.com \
        cloudresourcemanager.googleapis.com \
        pubsub.googleapis.com  --project $PROJECT_ID
  4. 使用下列指令,確認已啟用所有 API:
    gcloud services list --project $PROJECT_ID

    輸出內容應包含您剛啟用的所有 API,如以下範例所示:

    NAME                                 TITLE
    apigee.googleapis.com                Apigee API
    apigeeconnect.googleapis.com         Apigee Connect API
    bigquery.googleapis.com              BigQuery API
    bigquery.googleapis.com              BigQuery API
    bigquerystorage.googleapis.com       BigQuery Storage API
    cloudapis.googleapis.com             Google Cloud APIs
    clouddebugger.googleapis.com         Cloud Debugger API
    cloudresourcemanager.googleapis.com  Cloud Resource Manager API
    cloudtrace.googleapis.com            Cloud Trace API
    compute.googleapis.com               Compute Engine API
    container.googleapis.com             Kubernetes Engine API
    containeranalysis.googleapis.com     Container Analysis API
    containerregistry.googleapis.com     Container Registry API
    datastore.googleapis.com             Cloud Datastore API
    iam.googleapis.com                   Identity and Access Management (IAM) API
    iamcredentials.googleapis.com        IAM Service Account Credentials API
    logging.googleapis.com               Cloud Logging API
    monitoring.googleapis.com            Cloud Monitoring API
    oslogin.googleapis.com               Cloud OS Login API
    pubsub.googleapis.com                Cloud Pub/Sub API
    servicemanagement.googleapis.com     Service Management API
    serviceusage.googleapis.com          Service Usage API
    sql-component.googleapis.com         Cloud SQL
    storage-api.googleapis.com           Google Cloud Storage JSON API
    storage-component.googleapis.com     Cloud Storage

後續步驟

請參閱步驟 2:建立機構