Upgrade or downgrade an API app

The following section describes the procedure to upgrade an API application to a new revision of the same major version. It is only possible to use a single revision for an application at a time. Two revisions of the same application cannot be used simultaneously. You can upgrade or downgrade to any revision of an API application.

For example, the application "machinecontrol" has different revisions: "machinecontrol v1.1.0", "machinecontrol v1.2.0", "machinecontrol v1.3.0".

Consider that the revision "machinecontrol v1.2.0" is in use, you can upgrade or downgrade the application to "machinecontrol v1.1.0" or "machinecontrol v1.3.0".

Revision upgrade or downgrade of an API application is possible in two ways:

  1. Upgrade an API application with downtime.

  2. Upgrade an API application without downtime.

NOTE

Upgrade or downgrade for an API application is only possible between the revisions of the same major versions. Major version applications will be handled independently apps.

Versions screen

The following screen is used to update an application to a new revision. The screen shows all the available versions of an application and also the version that is currently in use.

If the application is CF hosted, then the "Versions" screen is as below:

132558839563.png

If the application is self-hosted, then the "Versions" screen is as below:

132558877963.png

Upgrade an API application with downtime

The procedure to upgrade or downgrade an API application is similar for CF and self-hosted applications.

To upgrade an application, proceed with the following steps:

  1. In the "My Applications" screen, select the application that you want to upgrade.

  2. Click the "Registration" tab and click "De-Register". In the confirmation dialog, choose "Yes (Deregister and undeploy)" and click "Continue".

    125266652171.png

    For more information on deregistering an application. For information to deregister the application, refer to to "Register or deregister an API app".

  3. In the "My Applications" screen, select the new revision of the same application that you want to upgrade.

    NOTE

    Before deploying a new revision of an application, ensure the following:

    • Delete the components in the previous revision of the application.

    • During manual deployment, append "-green" to all the components in the new revision of the application.

    • Before proceeding with the downtime revision upgrade for CF hosted applications, make sure that only one revision of an application is deployed in Cloud Foundry during deployment.

  4. For CF hosted application, click the "Deployment" tab and proceed with manual or auto deployment. For more information, refer to "Download and deploy an API app".

  5. Click the "Registration" tab and register the application. For more information on registering an application, refer to "Register or deregister an API app".

    The application is upgraded to the new version.

Upgrade an API application without downtime

The procedure to upgrade or downgrade an API application is similar for CF and self-hosted applications.

To upgrade an application, proceed with the following steps:

  1. In the "My Applications" screen, select the new revision of an application available for upgrade.

  2. For CF hosted application, click "Deployment" tab and deploy the application. For information on deploying the application, refer to the chapter "Download and deploy an API app".

  3. Click the "Versions" tab and click "Register to Test".

    A new revision of an application needs to be tested before it is made available. Once you ensure that the application revision is working fine, you can start using the new revision of the application.

    The status of the registration can also be viewed in the "Versions" screen.

    123385783563.png
  4. To confirm the update, click "Confirm Update". In the confirmation dialog, click "Yes" to proceed.
    If you do not wish to proceed with the upgrade, click "Cancel Update" after which you will be able to view the deregistration stages.

    132558711563.png

    NOTE

    For downgrading an application, click the "Confirm Reactivate" button available next to the previous revisions.

    After confirming the update, you can view the status of each stage of the update in the "Versions" screen.

    132559005963.png