Modifying a Dark Launch Policy
If the component is upgraded through dark launch, you can modify the dark launch policy after the first batch of dark launch is complete.
Prerequisites
- The component has been upgraded through dark launch. For details, see Dark Launch.
- The component is in the Releasing state. For details about how to check the component status, see Viewing Component Details.
- For a dark launch component, the microservice engine instances bound to this component cannot be deleted. Otherwise, the operation fails. For an ELB dark launch component, the ELB instances bound to this component cannot be deleted. Otherwise, the operation fails.
Procedure
- Log in to ServiceStage.
- Use either of the following methods to go to the Deployment Records page.
- On the Application Management page, click the application to which the component belongs, and click the target component in Component List. In the left navigation pane, choose Deployment Records.
- On the Component Management page, click the target component. In the left navigation pane, choose Deployment Records.
- In the Deployment Records list, select the target deployment record of the Dark Launch type.
- Click Modify Dark Launch Policy and modify the dark launch configuration by referring to the following table.
Parameter
Description
Stack
The value is fixed to the configuration of the selected historical version and cannot be changed.
*Software Package/Image
The value is fixed to the configuration of the selected historical version and cannot be changed.
*Upload Method
The value is fixed to the configuration of the selected historical version and cannot be changed.
*Command
This parameter is mandatory if the component source is Source code repository, the component is deployed in the Kubernetes environment, and the selected technology stack type is Java, Tomcat, Node.js, Python, or PHP.
- Default command or script: preferentially executes build.sh in the root directory. If build.sh does not exist, the code will be compiled using the common method of the selected language. Example: mvn clean package for Java.
- Custom command: Commands are customized using the selected language. Alternatively, the default command or script is used after build.sh is modified.NOTICE:
- If Custom command is selected, exercise caution when inputting sensitive information in the echo, cat, or debug command, or encrypt sensitive information to avoid information leakage.
- To run the compilation command in the project subdirectory, you need to go to the project subdirectory and then run other script commands. For example:
cd ./weather/
mvn clean package
*Dockerfile Address
This parameter is mandatory if the component source is Source code repository, the component is deployed in the Kubernetes environment, and the selected technology stack type is Java, Tomcat, Node.js, Python, or PHP.
Dockerfile Address is the directory where the Dockerfile is located relative to the root directory (./) of the project. The Dockerfile is used to build an image.
If Dockerfile Address is not specified, the system searches for the Dockerfile in the root directory of the project by default. If the Dockerfile does not exist in the root directory, the system automatically generates the Dockerfile based on the selected operating environment.
*Component Version
The value is fixed and cannot be changed.
Resources
The value is fixed to the configuration of the selected historical version and cannot be changed.
JVM Parameters
The value is fixed to the configuration of the selected historical version and cannot be changed.
This parameter is available when the technology stack type is Java or Tomcat. It configures the memory size during Java code running.
Tomcat
The value is fixed to the configuration of the selected historical version and cannot be changed.
This parameter is available when the technology stack type is Tomcat. It configures parameters such as the request path and port number of Tomcat.
Advanced Settings
The value is fixed to the configuration of the selected historical version and cannot be changed.
*Deployment Architecture
The value is fixed to the configuration of the selected historical version and cannot be changed.
Dark Launch Policy
Select a dark lunch policy.
- Traffic ratio-based: Flexibly and dynamically adjust the traffic ratio of different versions.
- Content-based: Control the version to which the request is sent according to the request.
Traffic Ratio
When Dark Launch Policy is set to Traffic ratio-based, set the traffic ratio.
- Traffic Ratio: percentage of traffic directed to the new version.
- Current Traffic Ratio: percentage of traffic directed to the current version.
*Takes effect
When Dark Launch Policy is set to Content-based, set the effective mode of the dark launch policy.
- With single criterion: The dark launch policy takes effect when any matching rule is met.
- With full criteria: The dark launch policy takes effect when all matching rules are met.
*Matching Rule
When Dark Launch Policy is set to Content-based, set the matching rule for the dark launch policy to take effect.
Click Add Match Condition and set Matching Type, Parameter Name, Condition Type, and Condition Value.
*Instances for Dark Launch
The value is fixed to the configuration of the selected historical version and cannot be changed.
*First Batch of Dark Launch Instances
Set this parameter when Instances for Dark Launch is set to Canary (increase, then decrease) or Canary (decrease, then increase).
The value range is [1, Total number of instances – 1]. Total number of instances refers to the number of running instances of the component.
For example, if there are 6 component instances and First Batch of Dark Launch Instances is set to 1, 1 instance will be upgraded in the first batch.
*Deployment Batch with Remaining Instances
Set this parameter when Instances for Dark Launch is set to Canary (increase, then decrease) or Canary (decrease, then increase). That is, the number of batches whose remaining instances will be upgraded.
For example, if there are 6 component instances, First Batch of Dark Launch Instances is set to 1, and Deployment Batch with Remaining Instances is set to 3, there are 5 instances remaining to be deployed in 3 batches, and these 5 instances will be upgraded in the sequence 2:2:1.
*Graceful Time Window
The value is fixed to the configuration of the selected historical version and cannot be changed.
This parameter is used to save important data before a component instance stops. The value ranges from 0 to 9999, in seconds. The default value is 30.
For example, if an application has two instances and only one instance will be kept after the scale-in operation, you can still perform certain operations on the instance to be stopped in the specified time window.
- Click Modify Dark Launch Policy and wait until the dark launch is complete.
- Prerequisites
- Procedure