新しいデータ パイプラインを使用するようにハイブリッドを構成する

概要

バージョン 1.13.1 から、新しく作成された Apigee ハイブリッド組織は、新しいデータ パイプラインを使用してランタイム コンポーネントからコントロール プレーンにデータを直接書き込みます。以前は、署名付き URL を生成する UDCA コンポーネントを介して Google Cloud サービスにデータを書き込んでいました。新しいパイプラインでは、Google Cloud サービスにアップロードされるデータを処理する UDCA などの関連コンポーネントは必要ありません。

構成

次の手順に沿って、個々のコンポーネントに新しいデータ パイプラインを使用するようハイブリッドを構成できます。

認可フローを設定する

新しいパイプラインを操作してコントロール プレーンにデータを push する権限をランタイム サービス アカウントに設定します。デバッグ セッションとアナリティクスで新しいパイプラインを操作するには、この手順を実施する必要があります。

curl -X  PATCH -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "Content-Type:application/json" \
  "https://CONTROL_PLANE_LOCATION-apigee.googleapis.com/v1/organizations/ORG_NAME/controlPlaneAccess?update_mask=analytics_publisher_identities" \
  -d '{ "analytics_publisher_identities": ["serviceAccount:apigee-runtime@ORG_NAME.iam.gserviceaccount.com"]}'

レスポンスは次のようになります。

{
  "name": "organizations/newpipeline-hybrid-org/operations/8316aa78-c137-4733-92ec-cc0d2d92fd29",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata",
    "operationType": "UPDATE",
    "targetResourceName": "organizations/newpipeline-hybrid-org/controlPlaneAccess",
    "state": "IN_PROGRESS"
  }
}

更新レスポンスの name パラメータを使用して、オペレーションの状態を確認します。

データ所在地を使用しない場合

curl -X GET -H "Authorization: Bearer $(gcloud auth print-access-token)"  \
  -H "Content-Type:application/json"  \
  "https://apigee.googleapis.com/v1/organizations/ORG_NAME/operations/8316aa78-c137-4733-92ec-cc0d2d92fd29"

データ所在地

curl -X GET -H "Authorization: Bearer $(gcloud auth print-access-token)"  \
  -H "Content-Type:application/json"  \
  "https://CONTROL_PLANE_LOCATION-apigee.googleapis.com/v1/organizations/ORG_NAME/operations/8316aa78-c137-4733-92ec-cc0d2d92fd29"

レスポンスは次のようになります。

{
  "name": "organizations/newpipeline-hybrid-org/operations/8316aa78-c137-4733-92ec-cc0d2d92fd29",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata",
    "operationType": "UPDATE",
    "targetResourceName": "organizations/newpipeline-hybrid-org/controlPlaneAccess",
    "state": "FINISHED"
  },
  "done": true,
  "response": {
    "@type": "type.googleapis.com/google.cloud.apigee.v1.ControlPlaneAccess",
    "name": "organizations/newpipeline-hybrid-org/controlPlaneAccess"
  }
}

組織の ControlPlaneAccess 構成を確認します。

データ所在地を使用しない場合

curl "https://apigee.googleapis.com/v1/organizations/ORG_NAME/controlPlaneAccess" \
-H "Authorization: Bearer $(gcloud auth print-access-token)"

データ所在地

curl "https://CONTROL_PLANE_LOCATION-apigee.googleapis.com/v1/organizations/ORG_NAME/controlPlaneAccess" \
-H "Authorization: Bearer $(gcloud auth print-access-token)"

レスポンスは次のようになります。

{
  "synchronizerIdentities": [
    "serviceAccount:apigee-synchronizer@newpipeline-hybrid-org.iam.gserviceaccount.com"
  ],
  "analyticsPublisherIdentities": [
    "serviceAccount:apigee-runtime@newpipeline-hybrid-org.iam.gserviceaccount.com"
  ]
}

デバッグおよびアナリティクス データ所在地の新旧パイプラインを切り替える

サービス アカウントに適切な認可が付与されたら、Apigee インスタンスを切り替えて新しいパイプラインを使用できます。

新しいパイプラインに切り替えるには、overrides.yaml ファイルで newDataPipeline.debugSession: truenewDataPipeline.analytics: true を設定します。

新しいパイプラインの使用を停止するには、overrides.yaml ファイルで newDataPipeline.debugSession: falsenewDataPipeline.analytics: false を設定します。

例:

... rest of the overrides.yaml ...
gcp:
  projectID: PROJECT_ID
  region: ANALYTICS_REGION  # Specifies the analytics region for the hybrid org. This attribute is
                               # the regional endpoint used to push analytics and debug data to the
                               # control plane. For example: us-central1

newDataPipeline:
  debugSession: true  # this flag enables debug session to use the new data pipeline
  analytics: true     # this flag enables analytics to use the new data pipeline

k8sCluster:
  name: CLUSTER_NAME
  region: CLUSTER_LOCATION # Must be the closest Google Cloud region to your cluster. For example, us-west1
org: ORG_NAME

... rest of the overrides.yaml ...

helm upgrade コマンドを使用して、変更を適用します。一度に 1 つずつ環境をアップグレードします。--set env=ENV_NAME で環境を指定します。

helm upgrade ENV_RELEASE_NAME apigee-env/ \
  --install \
  --namespace APIGEE_NAMESPACE \
  --set env=ENV_NAME \
  -f OVERRIDES_FILE
  • ENV_RELEASE_NAME は、以前に apigee-env チャートをインストールしたときに使用した名前です。
  • ENV_NAME はアップグレードする環境の名前です。