Gray scale policy synchronization system and synchronization method based on puppet server and client

By using the Puppet architecture's canary release synchronization system, which generates policies through a web console, verifies them on the Nginx proxy side, and stores them on the Redis side, the problem of synchronization interruption in high-concurrency scenarios for canary releases is solved. This enables dynamic adjustment and fine-grained control of policies in multi-datacenter environments, improving system stability and response speed.

CN121193752BActive Publication Date: 2026-11-24ICLOUDSHIELD SECURITY TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511204914.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2026-11-24
Estimated Expiration
2045-08-27

AI Technical Summary

Technical Problem

Existing canary release strategies pose a risk of synchronization interruption in high-concurrency scenarios and cannot adapt to the differentiated needs of multiple directories and multiple data centers.

Method used

The canary-scale synchronization system, which adopts the Puppet architecture, generates synchronization policies through a web console, uses an Nginx proxy for policy verification and interception, and combines Redis policy storage to achieve dynamic adjustment and fine-grained control, thereby improving policy execution speed and security.

Benefits of technology

It achieves millisecond-level policy response in high-concurrency scenarios, adapts to the differentiated needs of multiple directories and multiple data centers, and improves the stability and efficiency of gray-scale policy synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121193752B_ABST
    Figure CN121193752B_ABST
Patent Text Reader

Abstract

This application relates to the field of operation and maintenance technology, specifically to a canary policy synchronization system and a synchronization method based on Puppet server and client. The system includes a Puppet server and a Puppet client. The Puppet server deploys a web console, an Nginx proxy, and a Redis policy client. The web console's front-end user interface includes policy modes and multi-dimensional control dimensions. The Nginx proxy is used to obtain synchronization policies and write them to the preset Redis policy client, as well as forward received synchronization requests to the Puppet server. The Puppet server, upon receiving a synchronization request, distributes a pre-generated MD5 checksum and synchronization file to the Puppet client according to the synchronization policy. This solves the problems of synchronization interruption risk in high-concurrency scenarios and inability to adapt to differentiated needs across multiple directories and data centers in canary policy synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of operation and maintenance technology, and in particular to a gray-scale policy synchronization system and a synchronization method based on Puppet server and client. Background Technology

[0002] Canary release refers to the gradual introduction of a new version to a subset of users or user groups during software or system updates for testing and verification. This aims to reduce risks and ensure system stability and performance. Current canary release strategies rely on full synchronization via configuration files. Therefore, in CDN multi-datacenter environments facing surges in malicious traffic, existing canary release strategies suffer from synchronization interruption risks in high-concurrency scenarios. Furthermore, they are unable to adapt to the diverse needs of multiple directories and datacenters. Summary of the Invention

[0003] In view of this, one of the technical problems solved by the embodiments of this application is to provide a gray-scale synchronization method, apparatus, device and medium based on the Puppet architecture, which solves the problem of synchronization interruption risk in high-concurrency scenarios and inability to adapt to the differentiated needs of multiple directories and multiple data centers in gray-scale strategy synchronization.

[0004] According to a first aspect of the embodiments of this application, a gray-scale policy synchronization system is provided. The system includes a Puppet server and a Puppet client. The Puppet server is deployed with a web console, an Nginx proxy, and a Redis policy endpoint. The web console is used to obtain a synchronization configuration generated based on a front-end user interface, verify and convert the synchronization configuration to obtain a synchronization policy. The front-end user interface includes policy modes and control dimensions, and the control dimensions include directories, files, nodes, and hosts. The Nginx proxy is used to obtain the synchronization policy and write it to a preset Redis policy endpoint. It receives synchronization requests sent by the Puppet client and forwards them to the Puppet server after the synchronization request passes verification. The Puppet server is used to send a pre-generated MD5 checksum and a synchronization file to the Puppet client according to the synchronization policy after receiving the synchronization request.

[0005] A second aspect of this application discloses a method for synchronizing a canary deployment strategy based on a Puppet server, the method comprising:

[0006] Obtain the synchronization policy sent by the Web console. The synchronization policy is a synchronization configuration generated by the Web console based on the front-end user interface, and the synchronization configuration is converted. The front-end user interface includes at least the data center, directory and node identifiers and the policy mode.

[0007] The synchronization strategy is obtained using the first interface of the Nginx proxy and written to the Redis strategy side.

[0008] A third aspect of this application discloses a method for synchronizing a canary policy based on a Puppet client, the method comprising:

[0009] When the MD5 checksum and synchronized file update are detected by the Puppet server, the pre-configured checksum script is loaded.

[0010] The verification script performs verification processing on the MD5 checklist and the synchronized file, and generates corresponding synchronization logs based on the matching results.

[0011] A fourth aspect of this application discloses an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.

[0012] A fifth aspect of this application discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.

[0013] This application embodiment provides four-dimensional control configuration items, including directories, files, nodes, and hosts, through the front-end user interface of the Web console. It transforms policy control from static code compilation to a policy injection method based on the front-end interface, simplifies the gray-scale policy synchronization steps, achieves fine-grained control of gray-scale policy synchronization, and realizes the purpose of dynamically adjusting the fine-grained nature of the policy. The Nginx proxy can intercept illegal clients on the one hand, and speed up policy execution on the other hand, achieving millisecond-level response for policy execution. Attached Figure Description

[0014] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0015] Figure 1 A block diagram of a grayscale strategy synchronization system provided in one embodiment of this application;

[0016] Figure 2 A schematic diagram of an embodiment of the front-end user interface of the Web console in a grayscale policy synchronization system provided in this application;

[0017] Figure 3 A flowchart illustrating a gray-scale strategy synchronization method based on a Puppet server provided in one embodiment of this application;

[0018] Figure 4 This is a flowchart illustrating a gray-scale policy synchronization method based on a Puppet client, provided as an embodiment of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0020] It should be noted that although functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0022] According to one embodiment of this application, a grayscale strategy synchronization system is provided, such as... Figure 1 As shown, the system includes a Puppet server 10 and a Puppet client 20. The Puppet server 10 is equipped with a Web console 101, an Nginx proxy 102, and a Redis policy client 103. The Web console is used to obtain the synchronization configuration generated based on the front-end user interface, verify and convert the synchronization configuration to obtain the synchronization policy. The front-end user interface includes at least the data center, directory, node identifier, and policy mode. The Nginx proxy is used to obtain the synchronization policy and write it to the preset Redis policy client, as well as to receive synchronization requests sent by the Puppet client and forward them to the Puppet server after the synchronization request passes verification. The Puppet server, upon receiving a synchronization request, distributes a pre-generated MD5 checksum and synchronization file to the Puppet client according to the synchronization policy.

[0023] This application embodiment provides four-dimensional control configuration items, including directories, files, nodes, and hosts, through the front-end user interface of the Web console. It transforms policy control from static code compilation to a policy injection method based on the front-end interface, simplifies the gray-scale policy synchronization steps, achieves fine-grained control of gray-scale policy synchronization, and realizes the purpose of dynamically adjusting the fine-grained nature of the policy. The Nginx proxy can intercept illegal clients on the one hand, and speed up policy execution on the other hand, achieving millisecond-level response for policy execution.

[0024] Specifically, the web console provides a visualized, multi-dimensional synchronization rule distribution function through a front-end user interface and back-end logic. The front-end user interface provides the following dimensions: schema, directory, file, node, and host. For example... Figure 2As shown, the mode configuration item provides global switches for "Allow Synchronization" and "Disable Synchronization"; the directory configuration item supports multi-level directory tree selection, allowing users to select parent directories or subdirectories (such as / data1 / init_gray), and supports online addition or deletion of synchronization directories; the node configuration item allows pre-setting the node loading hierarchy using the node selector. Specifically, the node hierarchy can include a first level, a second level, and a third level. The first level is used to select all nodes, the second level is used to select by data center group, and the third level is used to select hosts within the data center group. In other words, the node configuration item supports selecting all, filtering by data center group, or a single hostname. For example, selecting "all" selects all nodes; another example is selecting the next level of the "czt" node and the host configuration item "s2.yunwei.czt.cn", indicating that the node with the hostname "s2.yunwei.czt.cn" under the "czt" data center group is selected. When applying this, the administrator... Figure 2 When selecting a Field in the front-end user interface, such as selecting / data1 / init_gray, it indicates that the corresponding file / directory path in the server's source directory needs to be synchronized. Administrators can select all nodes or all hosts in an entire data center group (e.g., the czt data center group) for synchronization, or they can select a specific host within a data center group (e.g., a host named s2.yunwei.czt.cn in the czt data center group). The web console generates a corresponding synchronization policy based on the administrator's selections in the front-end user interface, which can be based on the nodes selected by the administrator. For example, assuming the administrator only selected s2.yunwei.czt.cn in the czt data center group, the web console receives the administrator's selections in the front-end user interface, performs policy verification, and converts the configuration corresponding to the selections into JSON format data, such as {"action":"allow","dir":" / init","nodes":["node1","node2"]}.

[0025] In this embodiment, the web console retrieves a list of hosts under the selected node level (e.g., data center group czt) from the backend in real time based on the node level selected by the administrator in the frontend user interface, and renders it on the frontend user interface (e.g., as a checkbox list). This not only facilitates the administrator's hierarchical display in large cluster management but also effectively improves selection efficiency. During application, data can be retrieved from the backend via AJAX requests, and the frontend framework (Vue / React) dynamically generates DOM elements based on the returned data.

[0026] In some embodiments, the Nginx proxy's verification of synchronization requests includes: parsing the synchronization request to obtain the IP address and node identifier; and forwarding the synchronization request to the Puppet server if the IP address matches a preset whitelist and the node identifier has allowed synchronization permissions.

[0027] Specifically, the Nginx proxy uses preset ACL access control rules to determine whether the IP address of the client sending the synchronization request is within the allowed IP range.

[0028] Specifically, the synchronization request sent by the Puppet client includes certificate information, the IP address of the Nginx proxy resolver, and the node identifier extracted from the certificate information. This node identifier is then used to search the ACL access control rules. If the resolved IP address is within the allowed IP range and the policy mode corresponding to the node identifier is allowed, the synchronization request is forwarded. Similarly, a synchronization-prohibited message is returned if either of the following conditions is met: the IP address does not match the allowed IP range for the node identifier, or the policy mode for the node identifier is prohibited.

[0029] When applying this, the Nginx proxy can set a whitelist through ACL access control rules. Upon receiving a synchronization request, it first checks the whitelist. If the whitelist is matched, the synchronization policy stored in Redis can be used for verification to determine whether the node identifier is allowed to synchronize.

[0030] This application utilizes a web console and Redis policy control, while policy execution is dynamically intercepted using an Nginx proxy, achieving millisecond-level policy effectiveness. This approach leverages the reliability of certificate authentication and the flexibility of IP restrictions to build the first line of security for the Puppet system. Furthermore, policy modification has been upgraded from code compilation to real-time injection via the front-end user interface, achieving millisecond-level policy effectiveness. The application also allows for multi-dimensional policy settings, resolving the issue in existing technologies where node classification is required, preventing dynamic adjustments during runtime.

[0031] In some embodiments, the web console is also used to perform policy validation on the synchronization configuration, and after the policy validation passes, to encapsulate the synchronization configuration into a data set to obtain the synchronization policy. Specifically, administrators can... Figure 2 The interface shown retrieves the corresponding configuration based on the selected operation performed by the administrator. The configuration is then validated using policies, such as checking if the directory exists and if the IP format is valid. If the validation passes, the data is encapsulated to obtain the synchronization policy.

[0032] In application, the web console can also output the policy of the selected directory in the policy display area included in the front-end user interface after detecting a user's directory selection operation. For example... Figure 2 As shown, the Web console detects that the user has selected the int directory item. The Web console controls the front-end user interface to output the int synchronous strategy on the right as: {all":"1"} and {"w-waf05.nbzt.cn":"1"}.

[0033] In some embodiments, the Redis policy interface is also used to create a target permission index, allowing users to edit the target permission index via a web console. This application sets a depth value for directory paths using the target permission index, enabling subsequent processing such as policy queries, directory hierarchy control, and canary releases to be accelerated based on the depth value. For example, by setting the depth value of a directory using the target permission index, a multi-level directory tree can be generated, allowing users to filter directories at different levels.

[0034] In some embodiments, the Nginx proxy is also used to obtain node information from multiple Puppet clients and generate a node list, so that the web console can perform corresponding display processing based on the user's selected operation in the front-end user interface. The node information includes the node name and IP address. Specifically, the Nginx proxy can store the hostname and IP of each node in the all_ip.lua file, and the file storage format can be: ["ip"] = ["hostname"], which is convenient for the front-end to call and select the node or hostname option. When applying, the hostname of each node should be uniformly and clearly identified for easy identification and selection. For example, waf05.nbzt.cn indicates that the host is the fifth business machine of nbzt (Ningxia City Data Center).

[0035] In some embodiments, the synchronization request includes certificate information. The Puppet server parses the node identifier corresponding to the certificate information and uses the node identifier to query the strategy pattern of the synchronization strategy in the Redis strategy server.

[0036] One embodiment of this application provides a method for canary deployment strategy synchronization based on a Puppet server, wherein the Puppet server is deployed with a web console, an Nginx proxy, and a Redis strategy client, such as... Figure 3 As shown, the method includes steps S101 and S102.

[0037] Step S101: Obtain the synchronization policy sent by the Web console. The synchronization policy is the synchronization configuration generated by the Web console based on the front-end user interface, and the synchronization configuration is verified and converted. The front-end user interface includes the policy mode and control dimensions. The control dimensions include directories, files, nodes and hosts.

[0038] Step S102: Obtain the synchronization strategy using the first interface of the Nginx proxy and write it to the Redis strategy side.

[0039] Specifically, the front-end user interface provides users with multi-dimensional control through multiple pre-configured controls (such as directories). During application, files can be at the bottom of the directory dimension, allowing users to select files to be synchronized at the directory level. This provides not only directory-level file control but also individual file control. Similarly, hosts can be at the bottom of the node dimension, enabling node control at the data center group and host levels.

[0040] This application provides four-dimensional control configuration items, including directories, files, nodes, and hosts, through the front-end user interface of the Web console. It transforms policy control from static code compilation to a policy injection method based on the front-end interface, simplifies the gray-scale policy synchronization steps, achieves fine-grained control of gray-scale policy synchronization, and realizes the goal of dynamically adjusting the fine-grained nature of the policy. The Nginx proxy can intercept illegal clients on the one hand, and speed up policy execution on the other hand, achieving millisecond-level response for policy execution.

[0041] In some embodiments, the method further includes: when the second interface of the Nginx proxy detects a synchronization request sent by the Puppet client, performing access control verification on the synchronization request; when the access control verification passes, forwarding the synchronization request to the Puppet server; and after receiving the synchronization request, the Puppet server sends the pre-generated MD5 checksum and synchronization file to the Puppet client according to the synchronization policy.

[0042] Specifically, the Puppet client can send a synchronization request to the Puppet server when it detects that a scheduled task has been triggered, based on preset synchronization tasks, such as timed tasks.

[0043] In practice, the Nginx proxy typically uses port 8140 to detect synchronization requests sent by clients and port 8141 to receive synchronization policies sent from the web console, which are then stored in the Redis policy server.

[0044] One embodiment of this application provides a gray-scale policy synchronization method based on a Puppet client, such as... Figure 4 As shown, the method includes:

[0045] Step S201: When the MD5 checksum and the synchronization file update are detected by the Puppet server, load the pre-configured checksum script;

[0046] Step S202: Perform verification processing on the MD5 checklist and the synchronization file according to the verification script, and generate the corresponding synchronization log based on the matching result.

[0047] Specifically, after receiving the MD5 checksum and synchronization file from the Puppet server, the Puppet client performs the following synchronization steps: first, it performs synchronization on the MD5 checksum; after synchronization is complete, it performs synchronization on the synchronization file. This avoids using the old MD5 checksum to verify the new file, ensuring that the verification script always uses the latest MD5 checksum to verify the latest file, thereby ensuring that the file content is consistent with expectations and improving the reliability of gray-scale releases.

[0048] In some embodiments, step S202 further includes: traversing multiple entries corresponding to the MD5 checklist, each entry including an expected MD5 value and a file path; determining the existence status of local files corresponding to the multiple entries based on their respective file paths; if the existence status of any local file corresponding to any entry is yes, calculating the local MD5 value of that local file; matching the local MD5 value of that local file with the expected MD5 value of that entry, and generating a corresponding synchronization log based on the matching result.

[0049] Before application, a shell script check_md5.sh can be written in the Puppet client, so that the Puppet client can load and run the script when it detects the MD5 checksum list issued by the Puppet server and the synchronization file has been updated.

[0050] Specifically, when the local MD5 value of the local file corresponding to any entry matches the expected MD5 value corresponding to that entry, a synchronization success indication is generated to prompt the user to perform a restart task or other operations. Similarly, in the case of a failed match, a corresponding log (including the file that failed to match and its corresponding MD5 value) is generated, and an alarm can also be executed so that the administrator can take corresponding actions based on the alarm.

[0051] Specifically, when the verification script (such as check_md5.sh) runs, it first parses the MD5 checksum updated locally, obtaining entries including hash values ​​and corresponding file paths. The file path of each entry is then used to determine if a local file exists on the Puppet client. If it does, the corresponding MD5 value is calculated and matched against the expected MD5 value (i.e., the parsed hash value) for that entry. A match indicates synchronization is complete. If the expected MD5 value does not match or the file is missing (i.e., the file to be synchronized has not been received locally), log processing is performed, and alarm information can be generated using a preset interface. Before determining whether the file to be synchronized has been received on the Puppet client, a predefined file filtering mechanism can be used to ignore files in the parsed results. For example, each parsed entry is matched against file ignore rules; if a match is successful, the verification of that file is skipped, such as temporary files or cached files. That is, if temporary files or cached files are detected, the current file is ignored to reduce resource consumption, lower the false alarm rate, and improve verification efficiency. Therefore, by modifying the file filtering mechanism, the selection of files to be ignored for verification can be achieved.

[0052] In some embodiments, before calculating the local MD5 value of the local file corresponding to any entry in step S202, the method further includes: matching the local file corresponding to any entry with a pre-configured ignore list; if the match fails, calculating the MD5 value of the local file corresponding to any entry.

[0053] Specifically, you can set up an ignore list based on the types of files that need to be skipped to avoid calculating the MD5 value of specific files. For example, the ignore list can include specific files such as temporary files, cache files, and log files, along with their filtering rules, such as regular expressions. This way, if a regular expression is matched, the validation of the specific file is skipped, allowing you to quickly determine the target file that needs to be synchronized and then calculate its MD5 value.

[0054] Specifically, file filtering rules for different application scenarios can be pre-set, and the file filtering rules for the target file can be determined when the user's selected operation is detected, thereby avoiding the problem of massive alarms caused by frequent file changes.

[0055] When applying this feature, you can handle versions requiring urgent updates by updating the ignore list. This involves adding files that need temporary modifications to the ignore list configuration in the verification script. For example, if version A is being released in a canary rollout, and a temporary version B is released to urgently fix a bug, assuming temporary version B only modifies one file: ` / home / work / waf / conf / nginx.conf`, then this temporary version B should be added to the ignore list of the verification script (e.g., `check_md5.sh`). Assuming the original ignore list is:

[0056]

[0057] The ignored list has been modified to:

[0058]

[0059] Since this file is already in the ignore list, even if its MD5 value does not match the MD5 checksum list (version A's list) sent by the server, the checksum script will skip it and will not issue an alert. Later, when you need to roll back to the official version or merge it with a new official version, simply remove the newly added record [' / home / work / waf / conf / nginx.conf']=1 from the modified ignore list.

[0060] The gray-scale policy synchronization system of this embodiment can execute the gray-scale policy synchronization method based on the Puppet server and the gray-scale policy synchronization method based on the Puppet client shown in the embodiments of this application. Their implementation principles are similar and will not be described again here.

[0061] Another embodiment of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.

[0062] Specifically, the processor can be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0063] Specifically, the processor connects to the memory via a bus, which may include a path for transmitting information. The bus can be a PCI bus or an EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc.

[0064] The memory may be ROM or other types of static storage devices that can store static information and instructions, RAM or other types of dynamic storage devices that can store information and instructions, or EEPROM, CD-ROM or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.

[0065] Optionally, the memory stores the code of a computer program that executes the scheme of this application, and the execution is controlled by a processor. The processor executes the application code stored in the memory to implement the operation of the apparatus provided in the above embodiments.

[0066] Another embodiment of this application provides a computer-readable storage medium storing computer-executable instructions for performing the methods provided in the above embodiments.

[0067] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0068] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0069] The above is a detailed description of the preferred embodiments of this application, but this application is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.

Claims

1. A gray-scale strategy synchronization system, comprising a Puppet server and a Puppet client, characterized in that, The Puppet server is deployed with a web console, an Nginx proxy, and a Redis policy client. The Web console is used to obtain the synchronization configuration generated based on the front-end user interface, verify and convert the synchronization configuration to obtain the synchronization policy. The front-end user interface includes policy mode and control dimension. The control dimension includes directory, file, node and host. The Nginx proxy is used to obtain the synchronization strategy and write it into the preset Redis strategy; receive the synchronization request sent by the Puppet client, and forward it to the Puppet server after the synchronization request passes the verification. The Puppet server is used to send the pre-generated MD5 checksum and synchronization file to the Puppet client according to the synchronization strategy after receiving the synchronization request. The Nginx proxy verifies the synchronization request by parsing the synchronization request to obtain the IP address and synchronization directory. If the IP address matches a preset whitelist and the synchronization directory has allowed synchronization permissions, the synchronization request is forwarded to the Puppet server. The Nginx proxy is also used to obtain node information from multiple Puppet clients and generate a node list, so that the Web console can perform corresponding display processing according to the user's selected operation in the front-end user interface. The node information includes node name and IP address. The synchronization request includes certificate information from the Puppet client. The Puppet server parses the node identifier corresponding to the certificate information and uses the node identifier to query the corresponding synchronization strategy pattern in the Redis strategy client.

2. The system according to claim 1, characterized in that, The web console is also used to perform policy verification on the synchronization configuration, and after the policy verification passes, to encapsulate the synchronization configuration into a synchronization policy.

3. The system according to claim 1, characterized in that, The Redis policy interface is also used to create a target permission index, allowing users to edit the target permission index through the web console.

4. A Puppet server-based grayscale strategy synchronization method applied to the grayscale strategy synchronization system according to any one of claims 1-3, characterized in that, The method includes: Obtain the synchronization policy sent by the Web console. The synchronization policy is a synchronization configuration generated by the Web console based on the front-end user interface, and the synchronization configuration is converted. The front-end user interface includes at least the data center, directory and node identifiers, and policy mode. The synchronization strategy is obtained using the first interface of the Nginx proxy and written to the Redis strategy client; When the second interface of the Nginx proxy detects a synchronization request sent by the Puppet client, it performs access control verification on the synchronization request. Once the access control verification passes, the synchronization request is forwarded to the Puppet server. After receiving the synchronization request, the Puppet server sends the pre-generated MD5 checksum and synchronization file to the Puppet client according to the synchronization strategy.

5. A Puppet client-based grayscale strategy synchronization method applied to the grayscale strategy synchronization system according to any one of claims 1-3, characterized in that, include: When the MD5 checksum and synchronized file update are detected by the Puppet server, the pre-configured checksum script is loaded. The verification script is used to perform verification processing on the MD5 verification list and the synchronization file, and corresponding synchronization logs are generated based on the matching results. The step of performing verification processing on the MD5 checksum and the synchronized file according to the verification script includes: Iterate through multiple entries corresponding to the MD5 checksum list, where each entry includes the expected MD5 value and the file path; Based on the file paths corresponding to the multiple entries, determine the existence status of the local files corresponding to the multiple entries. If the local file corresponding to any entry exists, then calculate the local MD5 value of the local file corresponding to that entry. Match the local MD5 value of the local file corresponding to any entry with the expected MD5 value corresponding to any entry, and generate the corresponding synchronization log based on the matching result.

Citation Information

Patent Citations

  • Method for automatic heterogeneous platform file synchronization and puppet server

    CN104519100A

  • Gray release method capable of realizing dynamic configuration

    CN111488159A