Synchronize configurations

更新时间:
复制 MD 格式

When you deploy microservices across multiple environments (development, staging) or regions, you need to keep configurations consistent. You can create multiple microservices namespaces, create a configuration in one namespace, and then synchronize the configuration to other namespaces. Enterprise Distributed Application Service (EDAS) supports two synchronization methods:

Clone configurations between namespaces in the same region

  1. Log on to the MSE console, and select a region in the top navigation bar.

  2. In the left-side navigation pane, choose Microservices Registry > Instances.

  3. On the Instances page, click the name of the instance.

  4. In the left-side navigation pane, choose Configuration Management > Configurations.

  5. Optional. In the upper part of the Configurations page, select a namespace to filter configurations. You can also query configurations by group, data ID, application, or tag.

  6. On the Configurations page, select the target configuration, and then click Clone at the bottom left of the list.

  7. In the Clone Configuration dialog box, select a Destination Namespace and click Start Clone.

  8. Optional: If a configuration with the same name exists in the destination namespace, the Configuration Conflicts dialog appears. To proceed, select the configurations to overwrite, click OK, and then click Start Clone.

    To review the differences between the Source Namespace and Destination Namespace, click View Diff on the right. The Configuration Content Comparison dialog box opens, displaying a side-by-side diff view. Red indicates content to be replaced, and green indicates new content.

Export and import configurations across regions

  1. Log on to the MSE console, and select a region in the top navigation bar.

  2. In the left-side navigation pane, choose Microservices Registry > Instances.

  3. On the Instances page, click the name of the instance.

  4. In the left-side navigation pane, choose Configuration Management > Configurations.

  5. Optional. In the upper part of the Configurations page, select a namespace to filter configurations. You can also query configurations by group, data ID, application, or tag.

  6. On the Configurations page, select one or more target configurations. Click Export at the bottom of the list. In the dialog that opens, confirm the details and click Start Export. The configuration files are downloaded to your computer as a single ZIP file.

  7. At the top of the Configurations page, select the destination namespace, and then click Import Configuration. In the dialog box, upload the configuration file and click OK.

    Note

    The import feature is compatible with configuration ZIP files exported from both new and legacy versions of open-source Nacos. The export feature, however, only creates ZIP files that are compatible with new versions.

    Parameter

    Description

    Destination Namespace

    The namespace to which the configurations will be imported. By default, this is the namespace selected on the Configurations page.

    Same Configurations

    Specifies the action to take when a configuration has the same Data ID and Group as an existing one.

    • Stop Import: Cancels the entire import operation. None of the selected configurations are synchronized to the destination namespace.

    • Skip: Skips the duplicate configurations and continues to import the remaining ones.

    • Overwrite: Replaces the existing configurations in the destination namespace with the ones being imported.

    Configuration File

    Click Upload File to select and upload the previously exported configuration file.

    Important

    If you need to modify the configurations, do not edit the exported ZIP file directly, as this may cause the import to fail. Import the configurations first, and then modify them in the destination namespace.