Maintaining Microservices
You can use service catalogs to view microservice details and search for target microservices to maintain microservices.
The following information is displayed on the Service Catalog page:
- Application List: displays all applications of the current user. You can search for the target application by application name.
- Microservice List: displays all microservices of the current user. You can search for the target microservice by microservice name, or filter the microservice list by specified application name.
- Instance List: displays all instances of the current user. You can search for the target instance by microservice name, or filter the microservice list by instance list of the specified application and by instance diagnosis result.
Dynamic Configuration
- Log in to ServiceStage and choose Infrastructure > CSE.
- Click Console of a microservice engine and choose Service Catalog.
- Click a microservice.
- Choose Dynamic Configuration. The Dynamic Configuration page is displayed.
- On the Dynamic Configuration page, perform the following operations.
Operation
Procedure
Export configurations.
Select a scope and click Export All to export all configuration items of the current scope.
Import configurations.
- Click Import to select a scope. The formats of the scope are as follows:
- Microservice name@application to which the microservice belongs
- Microservice name@application to which the microservice belongs#version number
- Click ··· to select a configuration item file.
- Click Upload Files to import configuration items in batches.
Create configurations.
- Click Create Configuration and select a configuration scope.
- Enter Configuration Item.
- Enter Configuration Item.
- Click OK to save the settings.
Modify configurations.
- Click Edit in the Operations column corresponding to the target configuration item.
- Enter Value.
- Click OK to save the settings.
Delete configurations.
- Click Delete in the Operations column. The OK dialog is displayed.
- In the Delete Configuration dialog box, click OK to delete the configuration.
- Click Import to select a scope. The formats of the scope are as follows:
Dark Launch
- Log in to ServiceStage and choose Infrastructure > CSE.
- Click Console of a microservice engine and choose Service Catalog.
- On the displayed page, click a microservice. On the page that is displayed, choose Dark Launch.
- Click Add a Launch Rule.
- To add a launch rule by Weight:
- Click Weight.
- On the displayed dialog box, set the following parameters.
Configuration Item
Description
Rule Name
Name of a customized rule.
Scope
Version of the microservice to which the rule applies.
Rule Configuration
Weight of the selected microservice. After this configuration item is configured, the traffic flows to the corresponding microservice based on the preset percentage.
- Click OK to complete the weight rule configuration and dark launch.
- To add a launch rule by Customization:
- Click Customization.
- On the displayed dialog box, set the following parameters.
Configuration Item
Description
Rule Name
Name of a customized rule.
Scope
Version of the microservice to which the rule applies.
Rule Configuration
- Parameter Name
This name is customized according to the key field provided by the service contract. The name contains a maximum of 24 characters, including only letters and digits, and starts with a letter.
This key must exist in the contract. It is possible that the server API is String paramA, but paramB is actually generated after the annotation is added. Therefore, paramB should be set here.
- Rules The value of this parameter maps to the key field provided by the service contract. The value contains 1 to 24 characters, including digits, letters, and the following special characters: @ # $ % & * _ - + : , . ? { } [ ] ( ) \ / |NOTE:
- If ~ is selected from the drop-down list next to Rules, the asterisk (*) and question mark (?) in the Rules value can be used for fuzzy matching. The asterisk (*) indicates that the character length is not limited, and the question mark (?) indicates that only one character is allowed. For example, if the rule value of Name is set to *1000, all Name fields ending with 1000 can be matched.
- If ~ is not selected from the drop-down list next to Rules, the asterisk (*) and question mark (?) in the Rules value cannot be used for fuzzy matching.
- Parameter Name
- Click OK to complete the customization rule configuration and dark launch.
- To add a launch rule by Weight:
Delete a microservice.
- Log in to ServiceStage and choose Infrastructure > CSE.
- Click Console of a microservice engine and choose Service Catalog.
- On the displayed page, select a microservice to be deleted, click Delete, and delete the microservice as prompted.
- If the number of microservice instances is 0, you can directly delete the microservice.
- If the number of microservice instances is not 0, the microservice will be re-registered with the service center after being deleted for a period of time.
- When the microservice has dependencies, it cannot be deleted.
Viewing Microservice Details
- Log in to ServiceStage and choose Infrastructure > CSE.
- Click Console of a microservice engine and choose Service Catalog.
- Click a microservice. The microservice details page is displayed.
On the microservice details page, you can view the instance list, called services, calling services, dynamic configuration, dark launch, and service contract.
Viewing a Service Contract
- Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
- Click Console of a microservice engine and choose Service Catalog.
- Click a microservice. The microservice details page is displayed.
- Click Service Contract to view the service contract.
Adding a Label
- Log in to ServiceStage and choose Infrastructure > CSE.
- Click Console of a microservice engine and choose Service Catalog.
- On the displayed page, click a microservice. On the page that is displayed, and click Label Management next to Label.
- Click Add Label, and enter Key and Value.
- Click OK to save the settings.
Last Article: Configuring Microservices
Next Article: Continuous Delivery
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.