Crea un account di servizio Google Cloud e aggiungi il ruolo Amministratore dell'organizzazione Apigee. Questo account di servizio verrร utilizzato per autenticare una chiamata API che effettuerai in un passaggio successivo. Un modo semplice per creare l'account di servizio รจ tramite la console Google Cloud.
Per le istruzioni, vedi
Creare e gestire gli account di servizio nella documentazione di Google Cloud.
Ad esempio, i seguenti comandi gcloud creano l'account di servizio e lo astraggono al ruolo Amministratore dell'organizzazione Apigee:
Crea l'account:
gcloud iam service-accounts create apigee-org-admin \
--display-name="apigee-org-admin"
dove apigee-org-admin รจ il nome dell'account di servizio che stai creando.
Per questo tutorial รจ consigliato l'utilizzo di "apigee-org-admin".
Assegna il ruolo Amministratore dell'organizzazione Apigee all'account di servizio:
apigee-org-admin รจ il nome dell'account di servizio che hai appena creato.
roles/apigee.admin รจ il ruolo Apigee Org Admin.
Scarica la chiave dell'account di servizio sul tuo sistema. Utilizza il seguente comando per scaricare la chiave nella directory service-accounts/. Per saperne di piรน, consulta le istruzioni in
Creare chiavi dell'account di servizio nella documentazione di Google Cloud.
Assicurati di trovarti nella directory /hybrid-base-directory/hybrid-files/.
Scarica la chiave:
gcloud iam service-accounts keys create ./service-accounts/$PROJECT_ID-apigee-org-admin.json \
--iam-account apigee-org-admin@$PROJECT_ID.iam.gserviceaccount.com
L'output dovrebbe essere simile al seguente:
created key [a0b1c2d3e4f5a0b1c2d3e4f5a0b1c2d3e4f5a0b1] of type [json] as [./service-accounts/hybrid-
example-apigee-org-admin.json] for [apigee-org-admin@my-hybrid.iam.gserviceaccount.com]
$
Verifica il percorso della chiave dell'account di servizio Apigee Org Admin con il seguente comando:
apigee-synchronizer$ORG_NAME.iam.gserviceaccount.com: l'indirizzo email dell'account di servizio apigee-syncnronizer.
Per verificare che l'account di servizio sia stato impostato, utilizza il seguente comando per chiamare l'API e ottenere un elenco di account di servizio:
Assicurati di trovarti nella directory hybrid-base-directory/hybrid-files.
Verifica che kubectl sia impostato sul contesto corretto utilizzando il seguente comando.
Il contesto corrente deve essere impostato sul cluster in cui esegui il deployment di Apigee hybrid.
kubectl config get-contexts
Solo per le piattaforme AWS su GKE, EKS e GKE on-prem, verifica
che la variabile KUBECONFIG sia impostata utilizzando il seguente comando.
echo $KUBECONFIG
Esegui un'inizializzazione di simulazione. Esegui il comando init con il
flag --dry-run. Eseguire una prova simulata ti consente di verificare la presenza di eventuali errori prima che vengano apportate modifiche al cluster.
Nella versione ibrida 1.4.4, la sintassi del flag --dry-run
dipende dalla versione di kubectl in esecuzione. Controlla la versione di
kubectl con il seguente comando:
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema รจ stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-03 UTC."],[[["\u003cp\u003eThis documentation is for Apigee hybrid version 1.4, which is end-of-life, and users should upgrade to a newer version.\u003c/p\u003e\n"],["\u003cp\u003eEnabling synchronizer access requires creating a Google Cloud service account with the Apigee Organization Admin role.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves downloading the service account key and using \u003ccode\u003egcloud\u003c/code\u003e commands to manage the key and set necessary permissions.\u003c/p\u003e\n"],["\u003cp\u003eInstalling Apigee hybrid in a cluster includes using the \u003ccode\u003eapigeectl\u003c/code\u003e command for initialization and application, with dry-run options to check for errors.\u003c/p\u003e\n"],["\u003cp\u003eUsers should verify the \u003ccode\u003ekubectl\u003c/code\u003e context, \u003ccode\u003eKUBECONFIG\u003c/code\u003e variable (if applicable), and check pod statuses throughout the hybrid deployment process.\u003c/p\u003e\n"]]],[],null,["# Step 7: Install hybrid runtime\n\n| You are currently viewing version 1.4 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\nEnable synchronizer access\n--------------------------\n\n\nTo enable synchronizer access:\n\n1. Create a Google Cloud service account and add the **Apigee Organization Admin** role to it. This service account will be used to authenticate an API call that you will make in a later step. An easy way to create the service account is through the GCP console. For instructions, see [Creating and managing service accounts](https://cloud.google.com/iam/docs/creating-managing-service-accounts#iam-service-accounts-create-gcloud) in the GCP documentation.\n\n\n For example, the following `gcloud` commands will create the service account and\n assign the **Apigee Organization Admin** to it:\n 1. Create the account: \n\n ```\n gcloud iam service-accounts create apigee-org-admin \\\n --display-name=\"apigee-org-admin\"\n ```\n\n\n Where \u003cvar translate=\"no\"\u003eapigee-org-admin\u003c/var\u003e is the name of the service account you are creating.\n \"`apigee-org-admin`\" is recommended for this tutorial.\n 2. Assign the **Apigee Org Admin** role to the service account: \n\n ```\n gcloud projects add-iam-policy-binding $PROJECT_ID \\\n --member=\"serviceAccount:apigee-org-admin@$PROJECT_ID.iam.gserviceaccount.com\" \\\n --role=\"roles/apigee.admin\"\n ```\n\n\n Where:\n - \u003cvar translate=\"no\"\u003e$PROJECT_ID\u003c/var\u003e is the name of your Google Cloud project that you created in [Step 2: Create a Google Cloud project](/apigee/docs/hybrid/v1.4/precog-gcpproject).\n - \u003cvar translate=\"no\"\u003eapigee-org-admin\u003c/var\u003e is the name of the service account you just created.\n - **roles/apigee.admin** is the **Apigee Org Admin** role.\n2. Download the service account key to your system. Use the following command to make download the key into your `service-accounts/` directory. For more information see the instructions in [Creating service account keys](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#iam-service-account-keys-create-gcloud) in the GCP documentation.\n 1. Make sure you are in the \u003cvar translate=\"no\"\u003e/hybrid-base-directory\u003c/var\u003e`/hybrid-files/` directory.\n 2. Download the key: \n\n ```\n gcloud iam service-accounts keys create ./service-accounts/$PROJECT_ID-apigee-org-admin.json \\\n --iam-account apigee-org-admin@$PROJECT_ID.iam.gserviceaccount.com\n ```\n\n\n The output should look something like: \n\n ```\n created key [a0b1c2d3e4f5a0b1c2d3e4f5a0b1c2d3e4f5a0b1] of type [json] as [./service-accounts/hybrid-\n example-apigee-org-admin.json] for [apigee-org-admin@my-hybrid.iam.gserviceaccount.com]\n $ \n ```\n3. Verify the path to the Apigee Org Admin service account key with the following command: \n\n ```\n ls service-accounts/*admin*\n ```\n\n The result should look something like the following: \n\n ```\n service-accounts/hybrid-example-apigee-org-admin.json\n ```\n4. Create an **ORG_ADMIN_ACCOUNT** environment variable with the name of the key file. For example: \n\n ```\n export ORG_ADMIN_ACCOUNT=\"hybrid-example-apigee-org-admin.json\"\n ```\n5. Execute the following commands to get a token: \n\n export GOOGLE_APPLICATION_CREDENTIALS=./service-accounts/$ORG_ADMIN_ACCOUNT\n export TOKEN=$(gcloud auth application-default print-access-token)\n\n6. Get the email address for your `apigee-synchronizer` service account with the following command: \n\n ```\n gcloud iam service-accounts list --filter \"apigee-synchronizer\"\n ```\n\n\n If it matches the pattern `apigee-synchronizer`**$ORG_NAME**`.iam.gserviceaccount.com`, you\n can use that pattern in the next step.\n7. Call the [setSyncAuthorization](/apigee/docs/reference/apis/apigee/rest/v1/organizations/setSyncAuthorization) API to enable the required permissions for Synchronizer using the following command: \n\n ```\n curl -X POST -H \"Authorization: Bearer $TOKEN\" \\\n -H \"Content-Type:application/json\" \\\n \"https://apigee.googleapis.com/v1/organizations/$ORG_NAME:setSyncAuthorization\" \\\n -d '{\"identities\":[\"'\"serviceAccount:apigee-synchronizer@$ORG_NAME.iam.gserviceaccount.com\"'\"]}'\n ```\n\n\n Where:\n - **`$ORG_NAME`**: The name of your hybrid organization.\n - **`apigee-synchronizer$ORG_NAME.iam.gserviceaccount.com`**: The email address of the apigee-syncnronizer service account.\n8. To verify that the service account was set, use the following command to call the API to get a list of service accounts: \n\n ```\n curl -X POST -H \"Authorization: Bearer $TOKEN\" \\\n -H \"Content-Type:application/json\" \\\n \"https://apigee.googleapis.com/v1/organizations/$ORG_NAME:getSyncAuthorization\" \\\n -d ''\n ```\n\n\n The output looks similar to the following: \n\n ```\n {\n \"identities\":[\n \"serviceAccount:my-synchronizer-manager-service_account@my_project_id.iam.gserviceaccount.com\"\n ],\n \"etag\":\"BwWJgyS8I4w=\"\n }\n ```\n\nApply the configuration to the cluster\n--------------------------------------\n\n\nUse the following steps to install Apigee hybrid into your cluster:\n\n1. Be sure that you are in the \u003cvar translate=\"no\"\u003ehybrid-base-directory\u003c/var\u003e`/hybrid-files` directory.\n2. Verify that `kubectl` is set to the correct context using the following command. The current context should be set to the cluster to which you are deploying Apigee hybrid. \n\n ```\n kubectl config get-contexts\n ```\n3. *For **AWS on GKE** , **EKS** , and **GKE on prem** platforms only* , Verify that the `KUBECONFIG` variable is set using the following command. \n\n ```\n echo $KUBECONFIG\n ```\n4. Do a *dry run* initialization. Execute the `init` command with the `--dry-run` flag. Doing a dry run lets you check for any errors before any changes are made to the cluster.\n\n\n In hybrid version 1.4.4, the syntax of the `--dry-run`\n flag depends on the version of `kubectl` you are running. Check the version of\n `kubectl` with the following command: \n\n ```\n kubectl version\n ```\n\n\n `kubectl` version 1.17 and older: \n\n ```\n $APIGEECTL_HOME/apigeectl init -f overrides/overrides.yaml --dry-run=true\n ```\n\n\n `kubectl` version 1.18 and newer: \n\n ```\n $APIGEECTL_HOME/apigeectl init -f overrides/overrides.yaml --dry-run=client\n ```\n5. If there are no errors, execute the `init` command as follows: \n\n ```\n $APIGEECTL_HOME/apigeectl init -f overrides/overrides.yaml\n ```\n\n The `init` command installs the [Apigee deployment\n services](/apigee/docs/hybrid/v1.4/apigee-deployment-services) Apigee Deployment Controller and Apigee Admission Webhook.\n6. To check the status of the deployment, you can use the following commands: \n\n $APIGEECTL_HOME/apigeectl check-ready -f overrides/\u003cvar translate=\"no\"\u003eoverrides\u003c/var\u003e.yaml\n kubectl get pods -n apigee-system\n kubectl get pods -n istio-system\n\n\n When the pods are ready, go to the next step.\n7. Do a *dry run* install. Execute the `apply` command with the `--dry-run` flag.\n\n\n `kubectl` version 1.17 and older: \n\n ```\n $APIGEECTL_HOME/apigeectl apply -f overrides/overrides.yaml --dry-run=true\n ```\n\n\n `kubectl` version 1.18 and newer: \n\n ```\n $APIGEECTL_HOME/apigeectl apply -f overrides/overrides.yaml --dry-run=client\n ```\n8. If there are no errors, you can apply the [Apigee-specific runtime components](/apigee/docs/hybrid/v1.4/what-is-hybrid#about-the-runtime-plane) to the cluster with the following command: \n\n ```\n $APIGEECTL_HOME/apigeectl apply -f overrides/overrides.yaml\n ```\n9. To check the status of the deployment, run the following command: \n\n ```\n $APIGEECTL_HOME/apigeectl check-ready -f overrides/overrides.yaml\n ```\n\n\n Repeat this step until the pods are all ready. The pods may take several minutes to start up.\n\n| **Congratulations!**\n|\n| You've successfully installed Apigee hybrid. You are now ready to test\n| it."]]