百度智能云

All Product Document

          Cloud-Native Application Platform CNAP

          Release in Batches

          This article shows how to use the batch release strategy for multi-batch update instances when the deployment group changes.

          Release in batches: According to a certain batch, only a part of the instances in the deployment group are upgraded each time. Suspend after each batch of upgrades, and the user can manually verify the newly upgraded instances, and then perform subsequent batches of instance upgrades after confirmation.

          Use Restriction

          CCE cluster

          The CCE cluster version is greater than or equal to 1.13.10.

          Operation Steps

          Add batch release components

          To update the deployment group using batch release, you need to deploy the batch release component in the cluster where the deployment group is located.

          1. Enter the Cloud Native Application Platform console, select "Component Center> Component List", click "Add Component" to enter the "Add Component Page".
          2. Select the "ReleaseStrategy" component, click "Next", enter the "Component Information" page, enter the "Component Name" and select the "Cluster" where you will deploy the component. Click "OK" to start deploying the components.

          image.png

          1. Go to "Component Center>Component List" and wait for the status of the newly-built batch release component to be "Running", and the batch release component deployment is completed.

          Set up a batch release strategy

          Users can set the release strategy when creating the deployment group, or modify the batch release strategy after creating the deployment group.

          Create a new deployment group and set a batch release strategy

          1. Click the "Create Application" or "Create Deployment Group" button. Enter the "Create Deployment Group" details page. If you want to use the batch release strategy, select the "cluster" where the batch release component is deployed, expand the "Advanced Configuration", and set the "Release Strategy".
          • Rolling update: Rolling update instance. MaxSurge and MaxUnavailable can use the default values. For setting, please refer to the official Kubernetes documentation [Rolling Update](https://kubernetes.io/zh/docs/concepts/workloads/controllers/deployment/#rolling update-deployment).
          • Update in batches: Update instances in batches.

            • Processing method

              • Manually continue: After each batch of instances is updated, the user manually clicks to confirm to execute the next batch of instance updates.
              • Automatically continue: After each batch of instances is updated, the next batch of instance updates will be automatically executed after the batch interval.

                • Batch interval: The interval between execution of each batch, the default unit: Minute.
            • Update batch: Set the total batches of instance updates of the deployment group, supporting 2~15 batches.
            • Assignment: The designated method for updating the number of instances in each batch.

              • Equally assign: The system automatically assigns the number of update instances in each batch according to the number of deployment group copies and update batches. E.g.: 1. The number of copies of the deployment group is set to 10, and the update batch is 2, and the update instance sequence is [5; 5], that is, 5 instances are updated in the first batch, and 5 instances are updated in the second batch. 2. If the number of copies of the deployment group is set to 10 and the update batch is 3, the order of the update instances is [3; 3; 4].
              • Custom assigned: Manually specify the number of updates per batch, which supports numbers and percentages. E.g.: 1. The number of copies of the deployment group is set to 10, the update batch is 2, and the update setting for each batch is specified as [3; remaining instances]. 2. The number of copies of the deployment group is set to 10, the update batch is 4 batches, and each batch of updates is set to [1; 20%; 30%; remaining instances], that is, 1 instance is updated in the first batch, and the total number of instances in the second batch is updated 20% of the total number of instances, that is, 2 instances, the third batch updates 30% of the total number of instances, that is, 3 instances, and the last batch updates the remaining 4 instances.

          Modify the deployment group batch release strategy

          "Application Hosting>Application>{click the application name to enter the application details}>Deployment group management>{click the deployment group name to enter the deployment group details}>Basic information>Advanced configuration", click "Edit" at the "Update Policy" to modify the update policy.

          image.png

          Change deployment group

          The deployment group can be changed in the following two ways.

          1. After setting the deployment group update policy, update the deployment configuration and operation configuration of the deployment group on the "Deployment Group" details page.
          2. After setting the deployment group update policy, go to the "Application Hosting>Application>{click the application name to enter the application details}>Change Management" page to initiate an online order to change the deployment group image and configuration.

          image.png

          After the above two change operations are performed, a new change record will be generated on the "Application Hosting> Application> {click the application name to enter the application details}> Change Management" list page.

          Click "View Details" in the change history list to view the details of the change history. In the "Execution Status" column, the execution status of the current phase will be displayed, including change execution records, instance list links, rolling update details and release sequence. The "Release Order" shows the release strategy and current update progress of this release.

          image.png

          Stage operation

          • Quick rollback: The deployment group at the current phase has released some batches. When the user manually verifies and finds that there is a problem with this change, click the "Quick Rollback" button to quickly roll back the changes to the deployment group at this phase.
          • Skip: The deployment group at the current phase has released some batches. Click the "Skip" button to skip the remaining batch updates in this phase. The instances of the released batches are updated to the new version, and the instances of the batches that have not been started keep the old version.

          Perform batch release

          1. "Application Hosting>Application>{click the application name to enter the application details}>Change Management", click the "View Details" button corresponding to the change management record, and you can view the details of this change. In the "Release Order" of the "Execution Status", click the "Next Batch" button to continue the next batch of release. The current batch displays the status of "Completed". You can click the "View Current Phase Instance" button to view the current updated instance to check whether the released instance meets expectations.
          2. "Application Hosting>Application>{click the application name to enter the application details}>Deployment Group Management>Deployment group>{click the deployment group name to enter the deployment group details}>Basic Information>Advanced Configuration", click "View Details" at the upgrade policy to view the current release details. Click "Next Batch" to update and release the next batch of instances.

          Note:Automatically confirmed batch release. After the current batch is released, wait for the batch interval, and the next batch will be released automatically, or you can manually click the next batch to manually release.

          Previous
          Change Management
          Next
          Event Query