Help Center/ ServiceStage/ User Guide/ Component Management/ Upgrading Components in Batches
Updated on 2024-12-16 GMT+08:00

Upgrading Components in Batches

After components are created and deployed, you can reconfigure and deploy multiple Running and Not ready components of the same application in rolling release mode. In rolling release mode, only one or more instances are upgraded at a time and then added to the production environment. This process repeats until all old instances are upgraded. Services will not be interrupted during the upgrade.

For details about how to upgrade a single component, see Upgrading a Single Component.

Prerequisites

  • The component status is Running, Not ready, Abnormal or Stopped. For details about how to check the component status, see Viewing Component Details.
  • If a component is deployed based on a container and the selected technology stack is Docker, multi-container deployment must be disabled.

If the component is deployed based on a container, it is recommended that the total number of component instances to be upgraded in batches be less than or equal to 30. Otherwise, CCE will limit the traffic and the upgrade will take a long time.

Upgrading Components in Batches

  1. Log in to ServiceStage.
  2. Choose Application Management.
  3. Click the application where the target components are located. The Overview page of the application is displayed.
  4. Select the components to be upgraded in batches in Component List and click Bulk Upgrade.
  5. Set the version configuration information of the components to be upgraded by referring to the following table.

    Parameter

    Description

    Component Version

    Target version of the upgraded component.

    • By default, the version number is the time when you start to upgrade the component. The format is yyyy.mmdd.hhmms, where s is the ones place of the second in the timestamp. For example, if the timestamp is 2022.0803.104321, the version number is 2022.0803.10431.
    • You can also customize the version number in the format of A.B.C, or A.B.C.D. A. B, C, and D are natural numbers, for example, 1.0.0 or 1.0.0.0.
      NOTICE:

      The customized version number must be unique and cannot be the same as any historical version number of the component. Otherwise, the current deployment record will overwrite the historical deployment record of the same version.

    Image Package

    Click , and select the component source again. For details, see Component Source.

    • If you select an image package for a container-deployed component:
      • You can customize the container name. The name contains 1 to 63 characters, including lowercase letters, digits, and hyphens (-), and must start with a lowercase letter and end with a lowercase letter or digit.
      • Click in the upper right corner of the selected image package to change the image package source.
    • If you select a software package for a container-deployed component, you can customize the container name. The name contains 1 to 63 characters, including lowercase letters, digits, and hyphens (-), and must start with a lowercase letter and end with a lowercase letter or digit.
    • If the component source is software package and Custom file address is selected, perform the following operations:
      1. Enter the custom HTTP/HTTPS file download address of the software package.
      2. Determine whether to enable authentication.

        If authentication is disabled, any user can download the software package in the custom file address by default.

        Click to enable authentication. Only authenticated users can download the software package in the custom file address. Authentication mode can be User name and password authentication or User-defined Header Authentication. The authentication mode and the corresponding authentication parameters are determined by the authentication mode supported by the server where the custom file directory is located.

    • For container-deployed components, you can set Image Access Credential. You can select up to 16 image access credentials. Click Create Secret to create an image access credential. Secret Type must be kubernetes.io/dockerconfigjson. For details, see Creating a Secret.

    Deployment Batch

    Number of batches in which component instances are upgraded. The value range is [1, Total number of instances]. Total number of instances refers to the number of running instances of the component.

    For example, if there are 4 component instances and Deployment Batch is set to 2, these component instances are upgraded in two batches, and each batch involves two component instances.

    After setting this parameter for container-deployed components, you can reset it in 6 in Configuring a Component Upgrade Policy.

  6. Click Advanced Settings in the Operation column to configure advanced settings.

  7. (Optional) Click Pre-check Advanced Settings to check whether the advanced settings of each component are correct.

    For example, if the component has been bound to a specified microservice engine, distributed cache, or cloud database instance but the specified instance is not bound to the environment to which the component belongs, an error is reported during advanced settings pre-check. Perform the following operations to reconfigure the parameters and then continue:

    1. In the displayed dialog box, confirm the information and click OK.
    2. Click Advanced Settings in the Operation column of the abnormal component and set the parameter by referring to 6.

  8. Click Complete and Execute. The system automatically checks whether the advanced settings of each component are correct.

    • If no, reset the advanced settings of the component based on the error information by referring to 6.
    • If yes, wait until the component status changes from Upgrading/Rolling back the component to Running, indicating that the component version configuration is successfully upgraded. On the Deployment Records page, view the deployment logs.
      • For container-deployed components, if "Querying the Status of a Workload Instance" is displayed, click View Event to view details.
      • For VM-deployed components, if "Creation of the VM application instance failure", "Query of the VM task status failure", or "Query of the VM application instance status failure" is displayed, click View Event to view details in the event list.

Follow-up Operations

Operation

Description

Rolling Back a Component

After the version configuration of all component instances is upgraded to the new version, if you need to roll back the component to the source version, see Rolling Back a Component.

Redeploying a Component

You can select a historical version configuration from the deployment record list and use the version configuration as a template to redeploy components. For details, see Redeploying a Component.