Créez un compte de service Google Cloud et attribuez-lui le rôle Administrateur de l'organisation Apigee. Ce compte de service sera utilisé pour authentifier un appel d'API que vous effectuerez ultérieurement. La console GCP permet de créer facilement le compte de service.
Pour obtenir des instructions, consultez Créer et gérer des comptes de service dans la documentation de GCP.
Par exemple, les commandes gcloud suivantes créent le compte de service et lui attribuent le rôle Administrateur de l'organisation Apigee :
Créez le compte :
gcloud iam service-accounts create apigee-org-admin \
--display-name="apigee-org-admin"
Où apigee-org-admin est le nom du compte de service que vous créez.
"apigee-org-admin" est recommandé pour ce tutoriel.
Attribuez le rôle Administrateur de l'organisation Apigee au compte de service :
apigee-org-admin est le nom du compte de service que vous venez de créer.
roles/apigee.admin correspond au rôle Administrateur de l'organisation Apigee.
Téléchargez la clé du compte de service sur votre système. Utilisez la commande suivante pour télécharger la clé dans votre répertoire service-accounts/. Pour en savoir plus, consultez les instructions de la section Créer des clés de compte de service de la documentation de GCP.
Assurez-vous que vous vous trouvez dans le répertoire /hybrid-base-directory/hybrid-files/.
Téléchargez la clé :
gcloud iam service-accounts keys create ./service-accounts/$PROJECT_ID-apigee-org-admin.json \
--iam-account apigee-org-admin@$PROJECT_ID.iam.gserviceaccount.com
Le résultat devrait ressembler à ceci :
created key [a0b1c2d3e4f5a0b1c2d3e4f5a0b1c2d3e4f5a0b1] of type [json] as [./service-accounts/hybrid-
example-apigee-org-admin.json] for [apigee-org-admin@my-hybrid.iam.gserviceaccount.com]
$
Vérifiez le chemin d'accès à la clé de compte de service Administrateur de l'organisation Apigee à l'aide de la commande suivante :
Suivez les étapes ci-dessous pour installer Apigee hybrid sur votre cluster :
Vérifiez que vous êtes bien dans le répertoire hybrid-base-directory/hybrid-files.
Vérifiez que kubectl est défini sur le bon contexte à l'aide de la commande suivante.
Le contexte actuel doit être défini sur le cluster dans lequel vous déployez Apigee hybrid.
kubectl config get-contexts
Pour les plates-formes AWS sur GKE, EKS et GKE On-Prem uniquement, vérifiez que la variable KUBECONFIG est définie à l'aide de la commande suivante :
echo $KUBECONFIG
Effectuez un test à blanc (dry run) d'initialisation. Exécutez la commande init avec l'option --dry-run. L'exécution d'un dry run vous permet de rechercher les erreurs éventuelles avant que des modifications ne soient apportées au cluster.
Dans la version 1.4.4 d'Apigee hybrid, la syntaxe de l'option --dry-run dépend de la version de kubectl que vous exécutez. Vérifiez la version de kubectl à l'aide de la commande suivante :
Répétez cette étape jusqu'à ce que tous les pods soient prêts. Le démarrage des pods peut prendre plusieurs minutes.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/05 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/05 (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."]]