本主題說明如何設定 MART 服務帳戶。
新增 MART 服務帳戶
MART 和 Apigee Connect 需要 Google Cloud 服務帳戶進行驗證。
- 找出
apigee-mart服務帳戶的金鑰檔案。檔案的副檔名應為.json。ls $HYBRID_FILES/service-accounts
- PROD 安裝次數:
apigee-mart.json - 非正式環境安裝:
apigee-non-prod.json
- PROD 安裝次數:
- 如果沒有看到 MART 服務帳戶檔案,請使用
create-service-account公用程式建立並下載該檔案:- 確定您已設定
PROJECT_ID環境變數:echo $PROJECT_ID
視需要定義:
export PROJECT_ID=my-project-id
- 建立 MART 服務帳戶。您可以在下列位置找到
create-service-account工具:- 針對 Helm 資訊套件安裝作業:
APIGEE_HELM_CHARTS_HOME/ └── apigee-operator/ └── etc/ └── tools/ └── create-service-account apigeectl安裝:APIGEECTL_HOME/ └── tools/ └── create-service-account
PROD
create-service-account \ --env prod \ --profile apigee-mart \ --dir PATH_TO_SERVICE_ACCOUNTS_DIR
非正式環境
$HYBRID_FILES/tools/create-service-account \ --env non-prod \ --profile apigee-mart \ --dir PATH_TO_SERVICE_ACCOUNTS_DIR
- 針對 Helm 資訊套件安裝作業:
- 確定您已設定
- 編輯
overrides.yaml檔案,並將金鑰檔案路徑新增至connectAgent和mart.serviceAccountPath屬性:PROD
connectAgent: serviceAccountPath: path_to_apigee-mart.json mart: serviceAccountPath: path_to_apigee-mart.json
非正式環境
connectAgent: serviceAccountPath: path_to_apigee-non-prod.json mart: serviceAccountPath: path_to_apigee-non-prod.json
例如:
Helm
... connectAgent: serviceAccountPath: /apigee/hybrid/helm-charts/apigee-org/apigee-mart.json mart: serviceAccountPath: /apigee/hybrid/helm-charts/apigee-org/apigee-mart.json ...apigeectl... connectAgent: serviceAccountPath: /apigee/hybrid/hybrid-files/service-accounts/apigee-mart.json mart: serviceAccountPath: /apigee/hybrid/hybrid-files/service-accounts/apigee-mart.json ...
- 套用變更:
Helm
helm upgrade ORG_NAME apigee-org/ \ --namespace apigee \ --atomic \ -f OVERRIDES_FILE.yaml
apigeectl$APIGEECTL_HOME/apigeectl apply -f OVERRIDES_FILE.yaml --org