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, or filter applications by environment.
- Microservice List: displays all microservices of the current user. You can search for the target microservice by microservice name, or filter microservices by environment and application.
- Instance List: displays all instances of the current user. You can search for the target instance by microservice name, or filter instances by environment or application.
Dynamic Configuration
- Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
- Click Console of a microservice engine.
- Choose Service Catalog.
- Click a microservice.
- Choose Dynamic Configuration. The Dynamic Configuration page is displayed. On the Dynamic Configuration tab, perform the following operations.
Configuration items are stored in plaintext. Do not include sensitive data.
Operation
Procedure
Export configurations.
Select a scope from the All drop-down list and click Export to export the JSON configuration file of the current scope.
The scope format is as follows:- Microservice name@Application to which the microservice belongs
- Microservice name@Application to which the microservice belongs#Version number
Import configurations.
- Click Import and select a scope.
The scope format is 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 to import configuration items in batches.
- Click Close.
Create configurations.
- Click Create Configuration and select a scope.
- Enter Configuration Item.
- Enter Value.
- Click OK to save the settings.
Modify configurations.
- Click Edit in the Operation column corresponding to the target configuration item.
- Enter a new value in the Value text box.
- Click OK to save the settings.
Delete configurations.
- Click Delete in the Operation column corresponding to the target configuration item.
- Click OK to delete the configuration.
Dark Launch
- Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
- Click Console of a microservice engine.
- Choose Service Catalog.
- Click a microservice. On the displayed page, click Dark Launch.
- Click Add Launch Rule.
- To add a launch rule by weight:
- Click Weight.
- Set the following parameters.
Configuration Item
Description
Rule Name
Name of a customized rule.
Scope
- Version of the microservice to which the rule applies.
- Add custom version: adds a new version as prompted.
Rule Configuration
Traffic allocation rate for the selected version. Traffic is evenly allocated to the selected service versions based on the configured value.
- Click OK to complete the weight rule configuration and dark launch.
- To customize a launch rule:
- Click Customize.
- Set the following parameters.
Configuration Item
Description
Rule Name
Name of a customized rule.
Scope
- Version of the microservice to which the rule applies.
- Add custom version: adds a new version as prompted.
Rule Configuration
- Parameter Name
This name is customized according to the key field provided by the service contract.
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
Value corresponding to the key of a contract.NOTE:
- If ~ is selected from the drop-down list next to Rules, the asterisk (*) and question mark (?) can be used for fuzzy matching when you specify the value of Rules. The asterisk (*) represents an unlimited number of characters, and the question mark (?) represents only one character. 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 (?) cannot be used for fuzzy matching.
- Click OK to complete the customized rule configuration and dark launch.
- To add a launch rule by weight:
Delete a microservice.
- Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
- Click Console of a microservice engine.
- Choose Service Catalog.
- Select the 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.
Viewing Microservice Details
- Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
- Click Console of a microservice engine.
- 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.
- 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 > Cloud Service Engines.
- Click Console of a microservice engine.
- Choose Service Catalog.
- Click a microservice. On the displayed page, click Manage Tag next to Label.
- Click Add Label, and enter Key and Value.
- Click OK to save the settings.
Modifying Microservice Instance Status
Status indicates the status of a microservice instance. The following table describes the microservice instance statuses.
Status |
Description |
---|---|
Online |
The instance is running and can provide services. |
Offline |
Before the instance process ends, the instance is marked as not providing services externally. |
Out of Service |
The instance has been registered with the microservice engine and does not provide services. |
Test |
The instance is in the internal joint commissioning state and does not provide services. |
- Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
- Click Console of a microservice engine.
- Go to the microservice console.
- Choose Service Catalog > Instance List.
- Select the target instance and change the microservice instance status.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot