Deploy an application in a single batch

更新时间:
复制 MD 格式

If your application is small or has a simple service architecture, such as a single application instance, you can deploy a new version after completing development and testing. This topic describes how to deploy an application in a single batch in the SAE console.

Prerequisites

The application must be running.

Procedure

Warning

When you redeploy an application, the application restarts. To prevent service interruptions and other unexpected issues, we recommend deploying during off-peak hours.

  1. In the SAE application list, select the target region and namespace from the top navigation bar, and then click the target application ID to open the application details page.

  2. On the Basic Information page of the target application, click Deploy Application.

  3. Configure the deployment parameters.

    Note

    The deployment method is determined by how the application was initially deployed. Configure the parameters based on the required deployment method.

    • WAR package deployment: Re-upload a WAR package or enter the URL of a new WAR package, and then configure the relevant environment and parameters.

    • JAR package deployment: Re-upload a JAR package or enter the URL of a new JAR package, and then configure the relevant environment and parameters.

    • ZIP package deployment: Re-upload a ZIP package or enter the URL of a new ZIP package, and then configure the relevant environment and parameters.

    • Image: In the Configure Image section, click Modify Image. In the Modify Image panel, reselect the image repository or image version.

  4. In the Release policy settings section, set the minimum available instances. Set Release Policy to Phased Release and Release Batch to 1. You can set the minimum available instances by number or by ratio. You can select Use System Recommended Value. To ensure service continuity, we recommend setting the minimum number of available instances to 1 or greater. If you set this parameter to 0, your application becomes unavailable during the update.

    • By Number: Enter the minimum number of available instances.

    • By Ratio: Enter a percentage. You can also select Use System Recommended Value.

    Note
    • To ensure service continuity, we recommend setting the minimum number of available instances to 1 or greater for each rolling deployment. If you set the value to 0, your application becomes unavailable during the update.

    • If you set the value as a percentage, the result is rounded up. For example, if you have five instances and set the ratio to 25%, the minimum number of available instances is 2.

  5. Optional:Configure the following advanced settings as needed.

    Java

    Advanced settings

    References

    Startup command settings

    Configure startup commands

    Java Tomcat settings

    Configure Java Tomcat parameters

    Note

    You can configure Tomcat only when the Application Deployment Method is set to WAR Package Deployment.

    Environment variable settings

    Configure environment variables

    Service registration and discovery

    Hosts binding settings

    Configure hosts binding

    Application health check settings

    Configure a health check

    Application public network access settings

    Application lifecycle management settings

    Configure application lifecycle management

    Log collection service

    persistent storage

    Persistent storage

    configuration management

    Inject configuration information

    microservice graceful start and shutdown

    Note

    If you select WAR Package Deployment or JAR Package Deployment and set Application Runtime Environment to EDAS-Container-XXX, you cannot configure microservice graceful start and shutdown.

    PHP

    Advanced settings

    References

    PHP application monitoring settings

    • Image-based deployment: Configure PHP application monitoring.

    • ZIP package-based deployment: None. The Mount Directory text box is grayed out. You cannot change the ARMS monitoring directory, but you can turn on the Enable Application Monitoring Basic Edition For Free switch.

    php.ini configuration file modification

    Configure PHP application configuration files

    Startup command settings

    Configure startup commands

    Environment variable settings

    Configure environment variables

    Service registration and discovery

    Hosts binding settings

    Configure hosts binding

    Application health check settings

    Configure a health check

    Application public network access settings

    Application lifecycle management settings

    Configure application lifecycle management

    Log collection service

    persistent storage

    Persistent storage

    configuration management

    Inject configuration information

  6. After you complete the configuration, click OK.

  7. To verify that the changes took effect, use one of the following methods:

    • Method 1:

      In the left-side navigation pane of the Basic Information page, click Change History. On the Change History page, view the application change details. If Execution Successful is displayed, the application is successfully deployed.

    • Method 2:

      On the Basic Information page, click the Instance List tab and view the Status of the instances. If the Status is Running, the application is successfully deployed.

Abort a change

To abort a change that is in progress, click Abort Change on the Change Details page.

Important

Aborting a change may result in multiple versions of your application running at the same time:

  • Deployed instances: These instances continue to run in their current state. No rollback is triggered.

  • Instances being deployed: These instances will complete the current deployment and then run the new version.

  • Undeployed instances: These instances continue to run in their current state. The new version is not released to them.

  • New instances from auto scaling: New instances will use the new version.

After aborting a change, redeploy the application or roll back to a previous version as soon as possible to ensure that all application instances run the same version.

More information

After deploying an application in SAE, you can perform the following operations:

Actions

References

Application lifecycle management operations, such as updating, scaling, starting, stopping, and deleting applications.

Manage the application lifecycle

Operations to improve application performance, such as auto scaling, CLB binding, and batch start and stop.

Operations related to application status, such as log management, monitoring management, and viewing application events and change records.