When you make a change to an API proxy, you can save it as a new revision and deploy it to your runtime plane so that the change is propagated to your cluster.
Apigee hybrid propagates new revisions of your API proxies via the MP. In Apigee hybrid, MPs act independently of one another and any given MP can be in a different state than the other MPs (such as active or disabled).
MPs poll the cluster's file system to determine when a new API proxy bundle is available. When an MP detects a new bundle is available, it pulls the bundle down from the file system and deploys it. Each MP does this independently of all other MPs in the cluster. This is known as an "eventually consistent deployment model" for API proxies.
The following image shows the deployment lifecycle of a new API proxy on hybrid:
About proxy revisions
After you deploy an API proxy, the revision is read-only. You cannot change an API proxy revision; the only way to “change” a revision is to create a new revision and deploy it.
You can only deploy a proxy bundle in its entirety. If you make changes to individual fragments or policies, you must deploy the entire proxy bundle.
All API proxy deployments to Apigee hybrid, are zero-downtime deployments. This means that the deployment happens in this order:
- Revision 1 of the proxy
/hellois deployed and handling traffic.
- Revision 2 of
/hellois saved and deployed.
- Revision 2 is added to the message processors in the runtime plane.
- If the Revision 2 "add" succeeds, Revision 1 is deleted.
The new revision is deployed, and once the deployment is complete, the already deployed revision is undeployed. The proxy revision deployment is now complete with no downtime.
View deployment status
Deploying an API proxy on Apigee hybrid does not make it immediately available. It takes time for the proxy to be synchronized across all MPs in the runtime plane. However, Apigee provides tools that can give you some information about the status of your API proxy revisions.
You can get the deployment status of an API proxy in one of the following ways:
Within the hybrid UI, there are several views that provide the deployment status of your API proxies:
Hybrid UI View Steps & Description Proxies
- Select Develop > API Proxies:
The hybrid UI uses the following icons to give a quick status for each proxy:
indicates that the proxy has not been deployed to the selected environment.
indicates that there are no errors or warnings for that proxy in the selected environment.
indicates that there are one or more pods in the selected environment that require your attention.
indicates that there is an error with one or more pods in the selected environment that require your attention.
To view the status icon, click the Develop tab; the icon is displayed next to the Deploy to button:
Alternatively, you can select Develop > API Proxies and click a proxy.
- Select Develop > API Proxies.
- Click a proxy.
- Under Deployments, hover over the Details link:
- n pods in sync: The number of MP pods that have reported the most recently deployed revision.
- n pods reported errors: The number of MPs that reported an error during the latest synchronization process.
- n pods in unknown status: The number of MPs that hybrid has determined are active (within the last 5 minutes), but have not reported a status that is specific to the latest deployment (either success or failure). Because of the asynchronous nature of the deployment process, hybrid does not currently know which revision is deployed on these pods.
When you first load the Deployments view, hybrid polls all MP pods to get their current status. Hybrid will poll the MPs for 5 minutes, hoping to get 100% of pods to report their status, which UI then updates in this view. After 5 minutes, you can instruct hybrid to begin polling again by refreshing this view.
Alternatively, you can click the Develop tab and hover over the Details link:
During deployment, the UI displays a pod synchronization status bar. Next to this bar, the UI also displays pod status messages.
The pod synchronization status bar also shows the percentage of pods that have reported a status (any status) related to that revision within the last 5 minutes.
If you hover over the Pod synchronization status bar, the UI also displays the Runtime pods popup.
Change default deployment environment
The UI has a number of helpful indicators on the Develop tab that show the revision and status of the default environment. The following images highlight these indicators:
You can change the default environment to any environment in the hybrid organization.
To change the default environment:
- On the Develop tab, click the Deploy to drop-down list.
The drop-down list expands. Each row shows an environment, the revision that is deployed to that environment, and an Undeploy button.
The following example shows three environments with the default environment listed first:
- Click on a different environment’s row—anywhere except the Undeploy or
For example, to change the default environment to the “test-env-42” environment:
The hybrid UI updates to now display the status of the new default environment. In addition, the default environment in the Deploy to drop-down list is the newly selected environment.
- Select Develop > API Proxies: