Crie uma conta de serviço do Google Cloud e adicione o papel Administrador da organização da Apigee
a ela. Essa conta de serviço será usada para autenticar uma chamada de API que você fará
em uma etapa posterior. Uma maneira fácil de criar a conta de serviço é por meio do console do GCP.
Para instruções, consulte
Como criar e gerenciar contas de serviço na documentação do GCP.
Por exemplo, os comandos gcloud a seguir criarão a conta de serviço e
atribuirão o Administrador da organização do Apigee a ela:
Crie a conta:
gcloud iam service-accounts create apigee-org-admin \
--display-name="apigee-org-admin"
Em que apigee-org-admin é o nome da conta de serviço que você está criando.
"apigee-org-admin" é recomendado para este tutorial.
Atribua o papel Administrador da organização da Apigee à conta de serviço:
apigee-org-admin é o nome da conta de serviço que você acabou de criar.
roles/apigee.admin é o papel de roles/apigee.admin.
Faça o download da chave de conta de serviço no seu sistema. Use o seguinte comando para fazer o download
da chave no seu diretório service-accounts/. Para mais informações, consulte as instruções em
Como criar chaves de conta de serviço na documentação do GCP.
Verifique se você está no diretório /hybrid-base-directory/hybrid-files/.
Faça o download da chave:
gcloud iam service-accounts keys create ./service-accounts/$PROJECT_ID-apigee-org-admin.json \
--iam-account apigee-org-admin@$PROJECT_ID.iam.gserviceaccount.com
A resposta será semelhante a esta:
created key [a0b1c2d3e4f5a0b1c2d3e4f5a0b1c2d3e4f5a0b1] of type [json] as [./service-accounts/hybrid-
example-apigee-org-admin.json] for [apigee-org-admin@my-hybrid.iam.gserviceaccount.com]
$
Verifique o caminho para a chave da conta de serviço do administrador da organização da Apigee com o seguinte comando:
Siga estas etapas para instalar a Apigee híbrida no cluster:
Verifique se você está no diretório hybrid-base-directory/hybrid-files.
Verifique se kubectl está definido para o contexto correto usando o seguinte comando.
O contexto atual será definido como o cluster ao qual você está implantando a Apigee híbrida.
kubectl config get-contexts
Apenas para as plataformas AWS on GKE, EKS e GKE on prem, verifique
se o campo KUBECONFIG é definida usando o seguinte comando.
echo $KUBECONFIG
Faça uma inicialização de simulação. Execute o comando init com a
sinalização --dry-run. Uma simulação permite verificar se há erros antes de qualquer
alteração no cluster.
Na versão 1.4.4 da versão híbrida, a sintaxe da sinalização --dry-run depende da
versão de kubectl que você está executando. Verifique a versão de kubectl com
o seguinte comando:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-28 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."]]