
In modern software development, configuration management is critical for the successful deployment and operation of applications. Facing challenges such as multi-environment, multi-component, and security, inconsistent configurations can lead to system failures and security risks, increasing maintenance difficulties. The integration of configuration management with continuous integration tools provides automation and consistency, effectively addressing these challenges.
Zadig simplifies the process of delivering consistent configurations across different environments through deep integration with Nacos, enhancing system stability, reducing maintenance costs, and optimizing development and deployment workflows.
Next, we will demonstrate through practical cases how Zadig effectively addresses the complexity and consistency of configuration management, improving development efficiency.
# Administrator Configuration
Administrators can integrate the Nacos configuration management system in Zadig and configure the "Nacos Configuration Change" task in the workflow to achieve automated configuration changes and help engineers easily maintain configuration consistency.
# Step 1: Integrate Nacos
Access Zadig System Settings > System Integration > Configuration Management > Add Nacos Configuration Management System

# Step 2: Configure Workflow Tasks
Orchestrate the Nacos configuration change task into the workflow to achieve one-click automated configuration changes using Zadig workflows. Specific operations: Edit workflow > Add configuration change task > Select Nacos Configuration Change > Fill in the relevant parameters and save.

To control the use and change permissions for multiple environments, for example, allowing only developers to change the configuration of the development environment and preventing changes to other environments, you can set the namespace field of the Nacos configuration change task to a specific value and select the configuration scope that developers are allowed to update. This ensures orderly control over developers' configuration modification permissions, thereby maintaining the stability of the system environment.

Configure three workflows, with specific settings as follows:
| Example Workflow Name | Workflow Usage | Workflow Step Configuration |
|---|---|---|
| demo-workflow-dev | Daily Updates to the Development Environment | Build > dev Environment Nacos Configuration Change > Deploy dev Environment |
| demo-workflow-sit | Updates to the Integration Test Environment | Build > sit Environment Nacos Configuration Change > Deploy sit Environment > Automated Testing > IM Notification |
| demo-workflow-prod | Production Release | SRE Approval > prod Environment Nacos Configuration Change > Deploy prod Environment > Regression Testing |

# Step 3: Configure Collaboration Mode [Optional]
Configure the collaboration mode to set workflow permissions for R&D, testing, and release engineers. For specific configuration, refer to the following:
| Collaboration Mode Name Example | Collaborative Members | Workflow Permission Configuration |
|---|---|---|
| dev-mode | Development Engineer | Share demo-workflow-dev workflow |
| qa-mode | Test Engineer | Share demo-workflow-qa workflow |
| sre-mode | Release Engineer | Share demo-workflow-prod workflow |

# Engineer Usage
Below, we will detail how to achieve Nacos configuration consistency changes on Zadig during the development, testing, and production release stages.
# Scenario 1: Development Engineer Self-Test and Joint Commissioning - Update Configuration Based on Actual Business Changes
Build > Nacos Configuration Change > Deployment to achieve automated changes in the development environment's business and configuration.
When a development engineer needs to self-test and joint debug after code implementation, execute the demo-workflow-dev workflow, select the service that needs to be updated, choose the configuration to be changed in the Nacos configuration change task, and modify the configuration content.

After the configuration change is successful, the deployment task will be automatically executed to update the development environment, achieving one-click changes in business code and configuration in the development environment, and enabling quick self-testing and joint debugging.

# Scenario 2: Test Engineer Integration Testing - Reuse Configuration Changes from Development
Build > Nacos Configuration Change > Deploy > Automated Testing > IM Notification, to Achieve Automated and Efficient Changes in Test Environment Business and Configuration.
When a test engineer performs integration testing, execute the demo-workflow-sit workflow, select the service that needs to be updated, and choose the corresponding configuration changes.
As shown in the figure below, click "Compare Configuration" and select the service configuration from the development environment to obtain the configuration differences between the development and test environments. After copying the different configurations, make the necessary modifications in the test environment's service configuration. By comparing the configurations before and after the change, you can clearly understand the changes. Finally, click "Execute Workflow" to complete the automated changes to the test environment configuration.

# Scenario 3: Release Engineer Production Release - Approve Configuration Changes
SRE Approval > Nacos Configuration Change > Deploy to Prod Environment > Automated Testing, to Achieve Business and Configuration Automation and Safe Go-Live.
The release engineer executes the demo-workflow-prod workflow for production release, selects the Nacos configuration to be changed, and modifies the content.
Similar to the test engineer's operation, select the configuration from the test environment to obtain the differences between the test and production environments. After copying the different configurations, make the necessary changes to the production environment.

Additionally, given the seriousness of production releases, relevant responsible persons usually need to approve the release content. Approval personnel can review the specific changes of the task through Zadig workflow task information to ensure the correctness and reliability of the release content.

# Scenario 4: Release Engineer Rolls Back Configuration
If issues arise during a production release, the configuration can be directly rolled back through the workflow.
The release engineer locates the task requiring a rollback, clicks the "Rollback" button, selects the target configuration for rollback, and confirms by clicking the "Confirm" button to execute the rollback.

# Summary
Zadig workflows support the orchestration of Nacos configuration change tasks, enabling automated and efficient changes in business and configuration. They support capabilities such as multi-environment configuration comparison and single-environment changes before and after comparison, helping to ensure consistent transmission of configurations in development, testing, and production releases, and providing stable, safe, and reliable guarantees for the production release process.





