Configuration Management (Applicable to Microservice Engine 2.x)
CSE defines a configuration mechanism that is irrelevant to development frameworks. A configuration item consists of a key, label, and value. The label is used to identify whether a configuration item belongs to global configuration or microservice configuration. The label can also indicate the value type.
Operation |
Description |
---|---|
Associates the new configuration with an application, and adds the application name and environment label. |
|
Associates the new configuration with a microservice, and adds the microservice name, application name, and environment. |
|
If application-level and microservice-level configurations cannot meet service requirements, you can customize configuration files. |
|
Imports the local configuration file. |
|
Exports the selected configuration file to the local host. |
|
Compares differences between historical versions. |
|
Rolls back to the selected historical version. |
|
Displays configurations of different historical versions. |
|
Edits a configuration item. |
|
Disables a configuration item. |
|
Deletes a configuration item. |
When the configuration item quota specified by the engine specifications is about to be used up, the engine allows new configuration items that exceed the remaining quota to be created at the same time to ensure availability. Expand the capacity of the engine as soon as possible to prevent configuration creation failures.
Creating an Application-Level Configuration
- Log in to ServiceStage and choose Cloud Service Engine > Engines.
- Select the microservice engine where the application has been deployed but is to be governed from the Microservice Engine drop-down list in the upper part of the page.
- Click Configuration Management.
- In the displayed Security Authentication dialog box, enter the account name and password, and click OK.
- If you connect to the microservice engine for the first time, enter the account name root and the password entered when creating the microservice engine.
- For details about how to create an account, see Adding an Account.
- Click Create Configuration Item and set parameters based on the following table. Parameters marked with an asterisk (*) are mandatory.
Parameter
Description
*Configuration Item
Enter a configuration item.
The configuration item is the global ID of the configuration. In the coding phase, the configuration item is used to index and operate the configuration. You are advised to use the Java package naming rule (for example, cse.service.registry.address) to ensure the readability and uniqueness of the configuration.
Configuration Range
Select Application-level.
*Application
- Select or enter an application name.
- Select an environment.
Configuration Format
Select a configuration format.
*Configuration Content
Enter the configuration content.
Enable Configuration
Determine whether to enable the configuration item.
- Enable now: The configuration item takes effect immediately once created.
- Not Enabled: The configuration item does not take effect.
- Click Create Now to enable the configuration item.
Creating a Microservice-Level Configuration
- Log in to ServiceStage and choose Cloud Service Engine > Engines.
- Select the microservice engine where the microservice has been deployed but is to be governed from the Microservice Engine drop-down list in the upper part of the page.
- Click Configuration Management.
- In the displayed Security Authentication dialog box, enter the account name and password, and click OK.
- If you connect to the microservice engine for the first time, enter the account name root and the password entered when creating the microservice engine.
- For details about how to create an account, see Adding an Account.
- Click Create Configuration Item and set parameters based on the following table. Parameters marked with an asterisk (*) are mandatory.
Parameter
Description
*Configuration Item
Enter a configuration item.
The configuration item is the global ID of the configuration. In the coding phase, the configuration item is used to index and operate the configuration. You are advised to use the Java package naming rule (for example, cse.service.registry.address) to ensure the readability and uniqueness of the configuration.
Configuration Range
Select Microservice-level.
*Microservice
- Select or enter a microservice name.
- Select or enter an application name.
- Select an environment.
Configuration Format
Select a configuration format.
*Configuration Content
Enter the configuration content.
Enable Configuration
Determine whether to enable the configuration item.
- Enable now: The configuration item takes effect immediately once created.
- Not Enabled: The configuration item does not take effect.
- Click Create Now to enable the configuration item.
Creating a Customized Configuration Item
- Log in to ServiceStage and choose Cloud Service Engine > Engines.
- Select the target microservice engine from the Microservice Engine drop-down list in the upper part of the page.
- Click Configuration Management.
- In the displayed Security Authentication dialog box, enter the account name and password, and click OK.
- If you connect to the microservice engine for the first time, enter the account name root and the password entered when creating the microservice engine.
- For details about how to create an account, see Adding an Account.
- Click Create Configuration Item and set parameters based on the following table. Parameters marked with an asterisk (*) are mandatory.
Parameter
Description
*Configuration Item
Enter a configuration item.
The configuration item is the global ID of the configuration. In the coding phase, the configuration item is used to index and operate the configuration. You are advised to use the Java package naming rule (for example, cse.service.registry.address) to ensure the readability and uniqueness of the configuration.
Configuration Range
Select Customize.
*Labels
If application-level and microservice-level configurations cannot meet service requirements, you can use labels to customize configurations.
Configuration Format
Select a configuration format.
*Configuration Content
Enter the configuration content.
Enable Configuration
Determine whether to enable the configuration item.
- Enable now: The configuration item takes effect immediately once created.
- Not Enabled: The configuration item does not take effect.
- Click Create Now to enable the configuration item.
Importing Configurations
- Log in to ServiceStage and choose Cloud Service Engine > Engines.
- Select the target microservice engine from the Microservice Engine drop-down list in the upper part of the page.
- Click Configuration Management.
- In the displayed Security Authentication dialog box, enter the account name and password, and click OK.
- If you connect to the microservice engine for the first time, enter the account name root and the password entered when creating the microservice engine.
- For details about how to create an account, see Adding an Account.
- Click Import in the upper right corner and set parameters by referring to the following table.
Parameter
Description
Import to a specific environment
- Disabled: The imported configuration does not change the environment label.
- Enabled: Importing the configuration to a specific environment will change the environment label.
Same Configuration
- Terminate: If a configuration is the same as that in the system, the import terminates.
- Skip: During import, if a configuration is the same as that in the system, the configuration is skipped and other configurations are imported.
- Overwrite: During import, if a configuration is the same as that in the system, the value of the configuration will be replaced.
Configuration File
Click Import and select the target file.
NOTE:The file size cannot exceed 2 MB.
- Click Close.
Exporting Configurations
- Log in to ServiceStage and choose Cloud Service Engine > Engines.
- Select the target microservice engine from the Microservice Engine drop-down list in the upper part of the page.
- Click Configuration Management.
- In the displayed Security Authentication dialog box, enter the account name and password, and click OK.
- If you connect to the microservice engine for the first time, enter the account name root and the password entered when creating the microservice engine.
- For details about how to create an account, see Adding an Account.
Comparing Configuration Versions
- Log in to ServiceStage and choose Cloud Service Engine > Engines.
- Select the target microservice engine from the Microservice Engine drop-down list in the upper part of the page.
- Click Configuration Management.
- In the displayed Security Authentication dialog box, enter the account name and password, and click OK.
- If you connect to the microservice engine for the first time, enter the account name root and the password entered when creating the microservice engine.
- For details about how to create an account, see Adding an Account.
Rolling Back a Version
- Log in to ServiceStage and choose Cloud Service Engine > Engines.
- Select the target microservice engine from the Microservice Engine drop-down list in the upper part of the page.
- Click Configuration Management.
- In the displayed Security Authentication dialog box, enter the account name and password, and click OK.
- If you connect to the microservice engine for the first time, enter the account name root and the password entered when creating the microservice engine.
- For details about how to create an account, see Adding an Account.
Viewing Historical Versions
- Log in to ServiceStage and choose Cloud Service Engine > Engines.
- Select the target microservice engine from the Microservice Engine drop-down list in the upper part of the page.
- Click Configuration Management.
- In the displayed Security Authentication dialog box, enter the account name and password, and click OK.
- If you connect to the microservice engine for the first time, enter the account name root and the password entered when creating the microservice engine.
- For details about how to create an account, see Adding an Account.
Editing a Configuration Item
- Log in to ServiceStage and choose Cloud Service Engine > Engines.
- Select the target microservice engine from the Microservice Engine drop-down list in the upper part of the page.
- Click Configuration Management.
- In the displayed Security Authentication dialog box, enter the account name and password, and click OK.
- If you connect to the microservice engine for the first time, enter the account name root and the password entered when creating the microservice engine.
- For details about how to create an account, see Adding an Account.
Disabling a Configuration Item
- Log in to ServiceStage and choose Cloud Service Engine > Engines.
- Select the target microservice engine from the Microservice Engine drop-down list in the upper part of the page.
- Click Configuration Management.
- In the displayed Security Authentication dialog box, enter the account name and password, and click OK.
- If you connect to the microservice engine for the first time, enter the account name root and the password entered when creating the microservice engine.
- For details about how to create an account, see Adding an Account.
Deleting a Configuration Item
- Log in to ServiceStage and choose Cloud Service Engine > Engines.
- Select the target microservice engine from the Microservice Engine drop-down list in the upper part of the page.
- Click Configuration Management.
- In the displayed Security Authentication dialog box, enter the account name and password, and click OK.
- If you connect to the microservice engine for the first time, enter the account name root and the password entered when creating the microservice engine.
- For details about how to create an account, see Adding an Account.
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