Application Deployment

更新时间:
复制 MD 格式

Classic Application Service provides features for publishing and rolling back applications. For an application that you want to publish, you can edit dependencies, adjust server groups, and select deployment policies.

Prerequisites

  • The application is attached to a server, and the server has been initialized.

  • A deployment package exists for the application.

  • The grayscale traffic shifting feature requires that the application is attached to an SLB instance or added to a vServer group under an SLB instance.

  • The notification feature requires that a DingTalk group is configured to receive messages in Settings > Notification in the navigation pane on the left.

Create and run a deployment ticket

On the Deployment page, click Create to start the creation process. The process has three steps: Edit Basic Information, Edit Advanced Information, and Preview and Submit.

  1. Edit the following basic information.

    • Title: Enter a custom title for the deployment.

    • Type: Select a deployment method.

      Note

      Blue-green deployment is supported only in workspaces with two data centers.

    • Group policy: Select a rule to group all application servers in this deployment ticket. The supported strategies are Quick Grouping, Group by Deployment Unit, One Server per Group, and All in One Group.

    • Group by beta: When you enable this option, a special Beta group is created for the server groups during deployment. The system selects one server from each data center and adds it to the Beta group. The Beta group is deployed before the first group (Group 1).

      After the Beta group is deployed, the system automatically pauses the application deployment. The system owner or PE must confirm the deployment status of the application. If the application is deployed as expected, click Confirm Beta Group to continue the deployment by group. The Beta group can be used with all grouping strategies. When you create a new deployment request, Use Beta Group is enabled by default. All applications in the same deployment ticket will have a Beta group. If you do not need a Beta group, clear this option.

    • Use grey traffic migration: If this option is enabled for a deployment ticket, the system does not perform the SLB traffic shifting operation after the group deployment is complete. You can manually adjust the SLB traffic weight of the servers. All server groups in the deployment ticket have the characteristics of a Beta group. You must click Confirm after a group is deployed to complete the deployment process for that group.

      Important

      You can adjust the SLB traffic weight only for servers that are successfully deployed. For server instances that are not in a successful state, you can only view their SLB traffic weight data but cannot modify it. During application deployment, the option to adjust traffic weight is available for all machine groups that have been deployed. This option is disabled after the entire application deployment is complete.

    • Set SLB ratio: After the deployment is complete, the system uses the currently set weight for traffic shifting instead of the snapshot weight.

    • Enable DingTalk: To track the deployment ticket in real time, enable this option to subscribe to deployment status updates for the application and the Beta group. Before you subscribe, you must register a DingTalk Robot account and configure it by choosing Settings > Notification in the navigation pane on the left. Otherwise, this feature will not work.

    • Deployment unit: Select the deployment units where the service instances will be published. Select at least one deployment unit.

    • Service list: In the list, select the applications you need and click Add to move them to the Selected App services list.

      Note

      Only applications with a deployment package are available for selection. To remove a selected application, select it in the Selected App services list and click Delete.

      If you do not need to edit the deployment policy, deployment parameters, or dependencies between multiple applications, click Quick Create to publish the application.

  2. Edit advanced information.

    • Install buildpack from cache: Select whether to install the technology stack from the cache.

      Note

      This feature is supported only for applications that use Technology Stack 2.0.

    • Upgrade/downgrade buildpack: If you enable this feature, you can change the version of the technology stack, but not the technology stack itself.

    • Deployment parameters: Parameters can be added in the following ways:

      • Add to all: Adds the same parameters to all applications.

      • Add in batch: Supports adding parameters in the [Parameter Name]=[Parameter Value] format. Parameter names can contain only the following characters: A-Z, a-z, 0-9, _, -, .. Separate multiple parameters with spaces or line breaks, for example, k1=v1 k2=v2.

    • Dependency: If you select two or more applications, you may need to specify the dependencies between them. If there are no dependencies, skip this step.

      Dependencies can be added in the following ways:

      • Add One by One: In the Depend On column, enter the names of the applications that a specific application depends on. You can select multiple applications. For example, if application `tmp` depends on application `testapp`, enter `testapp` in the Depends On column for `tmp`. The same applies if an application depends on multiple applications.

      • Quick Add: Not recommended. You can edit application dependencies using an expression such as app_name1 > app_name2,app_name3 > app_name4.

        Note

        Application names in the expression cannot be repeated. The application on the left of the > symbol depends on the application on the right. Do not add spaces around the > symbol. Use a comma (,) to separate multiple expressions.

        Applications cannot have circular dependencies. For example, Application A cannot depend on Application B if Application B depends on Application A. If a circular dependency exists, an error message A circular dependency exists. Please edit the dependencies again. is displayed when you click Next.

      Click Next to go to the Preview and Submit page.

  3. Preview and submit.

    On the Preview page, you can confirm all the information for the deployment request.

    If you added dependencies in the Edit Advanced Information step, the system automatically groups the applications based on these dependencies. Applications that do not depend on any other applications are placed in group A1. Applications that depend on those in group A1 are placed in group A2, and so on. During deployment, the system first deploys the applications in group A1, then group A2, and so on.

    To change the deployment order, click Previous to return to the dependency editing step. If all information is correct, click Create to create the deployment ticket. The system automatically navigates to the deployment ticket details page.