Deployment overview

When you make a change to an API proxy, you can save it as a new revision and deploy it to your cluster.

About deployment

The deployment lifecycle of an API proxy revision on Apigee is shown in the following figure.

Apigee API proxy deployment lifecycle showing management plane, runtime plane, and stackdriver.

API proxy revisions limitations

The following limitations apply to API proxy revisions:

  • If you make any changes to an API proxy, you must deploy it as a new revision.
  • After you deploy an API proxy, the revision is read-only. You cannot change an API proxy revision (such as to make incremental changes); the only way to change a revision is to create a new revision and deploy it.
  • MPs can deploy a proxy bundle only in its entirety. If you make changes to individual fragments or policies, the MPs will still deploy the entire proxy bundle.

Zero-downtime deployment

All successful API proxy deployments to Apigee, are zero-downtime deployments. API proxy deployments happen in this order:

  1. Revision 1 of the API proxy /hello is deployed and handling traffic.
  2. Revision 2 of /hello is deployed.
  3. Revision 2 is deployed to the Message Processors in the runtime plane.
  4. Revision 1 is undeployed.

The API proxy revision deployment is now complete with no downtime.

Viewing deployment status

MPs communicate the status of API proxies to the Apigee Watcher, which then sends that status to Google Cloud and the management plane.

Deploying an API proxy on Apigee does not make it immediately available. It takes time for the API 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.

View the deployment status of an API proxy.

Apigee UI

Within the Apigee UI, there are several views that provide the deployment status of your API proxies:

Apigee UI View Steps & Description
Proxies
  1. Select Develop > API Proxies:

    Shows one-fish API proxy with status as currently deployed (green dot icon)

The Apigee UI uses the following icons to give a quick status for each API proxy:

Gray dot icon indicates API proxy is not deployed to selected environment Indicates that the API proxy has not been deployed to the selected environment.
Green dot icon indicates API proxy deployed without errors or warnings in selected environment Indicates that there are no errors or warnings for that proxy in the selected environment.
Yellow triange icon indicates that some routing did not update due to base path conflicts Indicates that some routing did not update due to base path conflicts.
Red box icon indicates there was an error during deployment Indicates that there was an error deploying the API proxy.

To view the status icon, click the Develop tab; the Details link is displayed next to the Deploy to button:

Develop tab

Alternatively, you can select Develop > API Proxies and click an API proxy

Deployments
  1. Select Develop > API Proxies.
  2. Click an APi proxy.
  3. Under Deployments, hold the pointer over the Details link.

    The following example shows the results of a successful deployment:

    Deployments section of the API proxy details page showing successful deployment for Revision 1 in the test environemnt

    In the event that there are issues encountered during the deployment, the following information is provided, including information about the cause of the issues:

    • Deployment of the API proxy failed due to base path conflicts. For example:

      Status showing that Revision 18 is fully deployed, but the yellow triangle
icon is displyed indicating that there were some routing errors due to basepath conflicts.

    • There were errors during deployment of the API proxy revision. For example:

      Status showing that Revision 18 is partially deployed, but the red box icon
indicates that there were deployment errors.

Alternatively, you can click the Develop tab and hold the pointer over the Details link to view more details about deployment issues:

Details link in UI

Apigee API

To view the deployment status of your API proxy revision in an environment, use the following API call:

curl "https://apigee.googleapis.com/v1/organizations/$ORG/environments/$ENV/apis/$API/revisions/$REV/deployments" \
  -X GET \
  -H "Authorization: Bearer $TOKEN"

Where $TOKEN is set to your OAuth 2.0 access token, as described in Obtaining an OAuth 2.0 access token. For information about the curl options used in this example, see Using curl. For a description of the environment variables used, see Setting environment variables for Apigee API requests.

The following provides an example of the response. This examples shows deployment status for revision 1 of the helloworld API proxy that is deployed in the test environment:

{
  "environment": "test",
  "apiProxy": "helloworld",
  "revision": "1",
  "deployStartTime": "1559149080457",
  "pods": [
    {
      "podName": "apigee-runtime-myorg-test-f8bdf9d-2s72w",
      "deploymentStatus": "deployed",
      "statusCodeDetails": "Deployment Success",
      "podStatus": "active",
      "podStatusTime": "1595357668001"
    }
  ],
  "state": "READY"
}

For more information, see the API proxy revision environment deployments API.

gcloud

To view the deployment status of your API proxy revision in an environment, use the following gcloud command:

gcloud alpha apigee deployments describe --api=$API --environment=$ENV

For more information and a description of the environment variables used in the examples, see Getting started using gcloud with Apigee.

The following provides an example of the response. This examples shows deployment status for revision 1 of the helloworld API proxy that is deployed in the test environment:

Using Apigee organization `my-org`
Using deployed revision `1`
apiProxy: helloworld
deployStartTime: '1598032332802'
environment: test
pods:
- deploymentStatus: deployed
  podName: apigee-runtime-myorg-test-f8bdf9d-2s72w
  podStatus: active
  podStatusTime: '1598302128087'
  statusCodeDetails: Deployment Success
revision: '1'
state: READY

For more information, see Describe deployments CLI.

Changing the default deployment environment in the UI

The Apigee 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:

Arrows point to Currently deployed revision in the UI

Arrows point to Currently deployed revision in the UI

You can change the default environment to any environment in the Apigee organization.

To change the default environment:

  1. 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:

    Deployment drop-down enabling you to deploy or undeploy the current revision to each environment

  2. Click on a different environment's row—anywhere except the Undeploy or Deploy buttons.

    For example, to change the default environment to the test-env-42 environment:

    Shows where to not click to change the default environment

    The Apigee 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.

Next steps

 

Learn how to deploy:

Deploying an API Proxy

 

 

Learn how to undeploy:

Undeploying an API Proxy