A configuration information deployment system, method, device, equipment and storage medium
By introducing a combination of a visual deployment platform and a proxy in the server deployment system, the server configuration information deployment problem that lacks unified standards in the existing technology is solved, and efficient and secure configuration information deployment is achieved, reducing the risk of project paralysis.
Patent Information
- Application Number
- CN202110853013.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-27
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2041-07-27
AI Technical Summary
The existing technology lacks unified standard methods to deploy server configuration information, which leads to high operational risks and is prone to accidents such as misconfiguration and project paralysis.
Provides a deployment system with configuration information, including a visual deployment platform and a proxy deployed on the server. The visual deployment platform determines the target server through the visual interface, receives the configuration information to be deployed and the deployment type, and sends the configuration information deployment request to the proxy. After receiving the request, the proxy side deploys the configuration information to be deployed according to the configuration information and the deployment type to be deployed.
Standardized server configuration information deployment is realized, reducing the probability of accidents such as project paralysis, and improving the visualization and security of deployment.
Smart Images

Figure CN113553043B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing, and in particular to a system, method, apparatus, device and storage medium for deploying configuration information. Background Art
[0002] At present, there is no unified standard for the method of deploying configuration information for servers. Usually, various manufacturers mainly rely on the patchwork of open source tools, open source scripts, etc. to barely deploy server configuration information. The operation risk is relatively high. Once improper configuration release occurs, the project may be paralyzed.
[0003] Therefore, there is an urgent need to propose a standardized method for deploying configuration information for servers to solve the above problems. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a configuration information deployment system, method, apparatus, equipment and storage medium, which can implement a configuration information deployment solution for server visualization through a standardized configuration information deployment system, thereby reducing the probability of accidents such as project paralysis.
[0005] In a first aspect, the present disclosure provides a configuration information deployment system, the system comprising a visual deployment platform and an agent deployed on a server;
[0006] The visual deployment platform is used to determine the target server based on the visual interface, receive the configuration information to be deployed and the deployment type corresponding to the target server, and send a configuration information deployment request carrying the configuration information to be deployed and the deployment type to the agent deployed on the target server; wherein the target server includes one or more servers, and the deployment type includes adding configuration information, deleting configuration information or modifying configuration information;
[0007] The proxy end is used to deploy the configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request after receiving the configuration information deployment request.
[0008] In an optional implementation, the visual deployment platform includes a visual configuration module and a first communication module, and the agent includes a deployment module;
[0009] The visualization configuration module is used to determine the target server based on the visualization interface, and receive the to-be-deployed configuration information and the deployment type corresponding to the target server; wherein the target server includes one or more servers, and the deployment type includes adding configuration information, deleting configuration information, or modifying configuration information;
[0010] The first communication module is used to send a configuration information deployment request carrying the configuration information to be deployed and the deployment type to an agent deployed on the target server;
[0011] The deployment module of the proxy end is used to deploy the configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request after receiving the configuration information deployment request.
[0012] In an optional implementation, the visual deployment platform further includes a rollback module;
[0013] The rollback module is used to determine the server to be rolled back, the target rollback version and the rollback type based on the visual interface, and determine the rollback configuration information corresponding to the server to be rolled back according to the target rollback version and the rollback type; wherein the rollback type includes grayscale rollback or global rollback;
[0014] The first communication module is further used to send a configuration rollback request carrying the rollback configuration information to an agent deployed on the server to be rolled back;
[0015] The deployment module of the proxy end is further used to deploy configuration information to the server to be rolled back based on the rollback configuration information carried in the configuration rollback request after receiving the configuration rollback request.
[0016] In an optional implementation, the proxy terminal further includes a rule verification module;
[0017] The rule verification module is used to perform grammatical rule verification on the to-be-deployed configuration information carried in the configuration information deployment request or the rollback configuration information carried in the configuration rollback request after receiving the configuration information deployment request or the configuration rollback request, and trigger the deployment module after determining that the grammatical rule verification passes.
[0018] In an optional implementation, the agent terminal further includes a second communication module;
[0019] The second communication module is used to send a notification message of configuration information deployment failure to the visual deployment platform after determining that the grammar rule verification fails.
[0020] In an optional implementation, the deployment module of the agent includes a Confd configuration management tool and an Etcd storage system;
[0021] The Confd configuration management tool is used to monitor messages in real time, and after receiving the configuration information deployment request, obtain the configuration information to be deployed and the deployment type carried in the configuration information deployment request, and store the configuration information to be deployed in the Etcd storage system;
[0022] The Etcd storage system is used to store the configuration information to be deployed in a key-value pair format;
[0023] The Confd configuration management tool is also used to obtain the configuration information to be deployed stored in a key-value pair format from the Etcd storage system, render the configuration information to be deployed based on a preset configuration information template, and then reload the rendered configuration information to be deployed to the target server based on the deployment type.
[0024] In an optional implementation, the configuration information to be deployed includes a correspondence between a virtual host vhost file identifier and an Nginx configuration content, and the preset configuration information template includes a preset Nginx configuration template;
[0025] The Confd configuration management tool is used to render the Nginx configuration content in the configuration information to be deployed based on the preset Nginx configuration template, and based on the deployment type, reload the rendered Nginx configuration content to the vhost file corresponding to the vhost file identifier in the target server.
[0026] In a second aspect, the present disclosure provides a method for deploying configuration information, the method being applied to a visual deployment platform, the method comprising:
[0027] Determine the target server based on the visual interface, and receive the configuration information to be deployed and the deployment type corresponding to the target server; wherein the target server includes one or more servers, and the deployment type includes adding configuration information, deleting configuration information, or modifying configuration information;
[0028] A configuration information deployment request carrying the configuration information to be deployed and the deployment type is sent to an agent deployed on the target server; wherein the agent is used to deploy configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request.
[0029] In an optional implementation manner, the method further includes:
[0030] Determine the server to be rolled back, the target rollback version and the rollback type based on the visual interface; wherein the rollback type includes grayscale rollback or global rollback;
[0031] Determine the rollback configuration information corresponding to the server to be rolled back according to the target rollback version and the rollback type;
[0032] A configuration rollback request carrying the rollback configuration information is sent to an agent deployed on the server to be rolled back; wherein the agent of the server to be rolled back is used to deploy configuration information on the server to be rolled back based on the rollback configuration information carried in the configuration rollback request.
[0033] In a third aspect, the present disclosure provides a method for deploying configuration information, the method being applied to an agent, the agent being deployed on a target server, the method comprising:
[0034] Receive a configuration information deployment request for the target server; wherein the configuration information deployment request carries the configuration information to be deployed and the deployment type, and the deployment type includes adding configuration information, deleting configuration information, or modifying configuration information;
[0035] The configuration information is deployed to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request.
[0036] In an optional implementation manner, the method further includes:
[0037] Receiving a configuration rollback request for the target server; wherein the configuration rollback request carries rollback configuration information;
[0038] Based on the rollback configuration information carried in the configuration rollback request, configuration information is deployed to the target server.
[0039] In an optional implementation manner, before deploying the configuration information to the target server, the method further includes:
[0040] The configuration information to be deployed carried in the configuration information deployment request or the rollback configuration information carried in the configuration rollback request is subjected to grammatical rule verification, and after determining that the grammatical rule verification passes, the step of deploying the configuration information to the target server is executed.
[0041] In an optional implementation manner, the method further includes:
[0042] After determining that the grammar rule verification fails, a notification message of configuration information deployment failure is sent to the visual deployment platform.
[0043] In an optional implementation, the deploying the configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request includes:
[0044] Obtaining the configuration information to be deployed and the deployment type carried in the configuration information deployment request;
[0045] Storing the configuration information to be deployed in the Etcd storage system in a key-value pair format;
[0046] Acquire the configuration information to be deployed stored in a key-value pair format from the Etcd storage system;
[0047] After rendering the configuration information to be deployed, the rendered configuration information to be deployed is reloaded to the target server based on the deployment type.
[0048] In an optional implementation manner, rendering the configuration information to be deployed includes:
[0049] The Nginx configuration content in the configuration information to be deployed is rendered based on a preset Nginx configuration template.
[0050] In an optional implementation, reloading the rendered configuration information to be deployed to the target server based on the deployment type includes:
[0051] Based on the deployment type, the rendered Nginx configuration content is reloaded into the vhost file identified by the vhost file in the target server corresponding to the Nginx configuration content.
[0052] In a fourth aspect, the present disclosure provides a configuration information deployment device, the device is applied to a visual deployment platform, and the device includes:
[0053] A first determination module is used to determine a target server based on a visual interface, and receive configuration information to be deployed and a deployment type corresponding to the target server; wherein the target server includes one or more servers, and the deployment type includes adding configuration information, deleting configuration information, or modifying configuration information;
[0054] The first sending module is used to send a configuration information deployment request carrying the configuration information to be deployed and the deployment type to an agent deployed on the target server; wherein the agent is used to deploy the configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request.
[0055] In a fifth aspect, the present disclosure provides a configuration information deployment device, the device is applied to an agent end, the agent end is deployed on a target server, and the device includes:
[0056] A first receiving module is used to receive a configuration information deployment request for the target server; wherein the configuration information deployment request carries the configuration information to be deployed and the deployment type, and the deployment type includes adding configuration information, deleting configuration information, or modifying configuration information;
[0057] The first deployment module is used to deploy configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request.
[0058] In a sixth aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements any of the methods described above.
[0059] In a seventh aspect, the present disclosure provides a device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, any of the methods described above is implemented.
[0060] In an eighth aspect, the present disclosure provides a computer program product, wherein the computer program product comprises a computer program / instructions, and when the computer program / instructions are executed by a processor, the method described in any one of the above is implemented.
[0061] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0062] The disclosed embodiment provides a configuration information deployment system, including a visual deployment platform and an agent deployed on a server. The visual deployment platform is used to determine a target server based on a visual interface, and to receive the configuration information to be deployed and the deployment type corresponding to the target server, and to send a configuration information deployment request carrying the configuration information to be deployed and the deployment type to the agent deployed on the target server; wherein the target server includes one or more servers, and the deployment type includes adding configuration information, deleting configuration information, or modifying configuration information. The agent is used to deploy configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request after receiving the configuration information deployment request. It can be seen that the disclosed embodiment provides a standardized configuration information deployment system, which can implement a visual configuration information deployment solution for servers, reducing the probability of accidents such as project paralysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0064] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0065] Figure 1 A schematic diagram of a configuration information deployment system structure provided in an embodiment of the present disclosure;
[0066] Figure 2 A schematic diagram of another configuration information deployment system structure provided in an embodiment of the present disclosure;
[0067] Figure 3 A flow chart of a method for deploying configuration information provided by an embodiment of the present disclosure;
[0068] Figure 4 A schematic diagram of the operation functions of a visual interface provided by an embodiment of the present disclosure;
[0069] Figure 5 A flowchart of another method for deploying configuration information provided by an embodiment of the present disclosure;
[0070] Figure 6 A schematic diagram of the structure of a device for deploying configuration information provided by an embodiment of the present disclosure;
[0071] Figure 7 A schematic diagram of the structure of another device for deploying configuration information provided by an embodiment of the present disclosure;
[0072] Figure 8 A schematic diagram of the structure of a configuration information deployment device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0073] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0074] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0075] In order to simplify the process of deploying configuration information for a server, so that users can implement functions such as deployment, updating, and maintenance in a visual manner, the present disclosure provides a configuration information deployment system. Specifically, the system includes a visual deployment platform and an agent deployed on the server. The visual deployment platform is used to determine the target server based on a visual interface, and to receive the configuration information to be deployed and the deployment type corresponding to the target server, and to send a configuration information deployment request carrying the configuration information to be deployed and the deployment type to the agent deployed on the target server; wherein the target server includes one or more servers, and the deployment type includes adding configuration information, deleting configuration information, or modifying configuration information. The agent is used to deploy the configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request after receiving the configuration information deployment request.
[0076] It can be seen that the configuration information deployment system provided by the embodiment of the present disclosure can implement a visualized configuration information deployment solution for the server, thereby reducing the probability of accidents such as project paralysis.
[0077] Based on this, the present disclosure provides a deployment system for configuration information, referring to Figure 1 , Figure 1 The present invention provides a schematic diagram of a configuration information deployment system structure, wherein the configuration information deployment system 100 includes a visual deployment platform 101 and an agent 102 deployed on a server.
[0078] The visual deployment platform 101 is used to determine the target server based on the visual interface, receive the configuration information to be deployed and the deployment type corresponding to the target server, and send the configuration information deployment request carrying the configuration information to be deployed and the deployment type to the agent 102 deployed on the target server; wherein the target server includes one or more servers, and the deployment type includes adding configuration information, deleting configuration information or modifying configuration information;
[0079] The agent 102 is used to deploy the configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request after receiving the configuration information deployment request.
[0080] In an optional implementation, reference Figure 2 , in the above Figure 1 On the basis of, the visualization deployment platform 101 may include a visualization configuration module 1011 and a first communication module 1012 , and the agent terminal 102 may include a deployment module 1021 .
[0081] The visualization configuration module 1011 is used to determine the target server based on the visualization interface, and receive the configuration information to be deployed and the deployment type corresponding to the target server; wherein the target server includes one or more servers, and the deployment type includes adding configuration information, deleting configuration information or modifying configuration information;
[0082] The first communication module 1012 is used to send a configuration information deployment request carrying the configuration information to be deployed and the deployment type to the agent deployed on the target server;
[0083] The deployment module 1021 of the agent is used to deploy the configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request after receiving the configuration information deployment request.
[0084] In an optional implementation, the visualization configuration module may provide a visualization interface for the user, and receive, based on the visualization interface, the target server determined by the user and the to-be-deployed configuration information and deployment type corresponding to the target server input by the user.
[0085] The disclosed embodiment provides a visual configuration deployment function for users through a visual configuration module, which is simple to operate and easy to deploy, simplifies the process of users deploying configuration information for servers, and improves user experience. In addition, the server with configuration information deployment requirements is deployed with an agent, which is used to interact with the visual deployment platform to jointly implement the deployment of configuration information for the server to which the agent belongs.
[0086] After receiving the configuration information deployment request, the deployment module of the proxy side can parse the configuration information to be deployed and the deployment type from the configuration information deployment request. Assuming that the deployment type is to add configuration information, and the configuration information to be deployed is the correspondence between vhost file 1 and nginx content, it means that the configuration information deployment request indicates to add the nginx content corresponding to vhost file 1 to the vhost file 1 of the target server. To this end, the deployment module finds the vhost file 1 on the target server and adds the nginx content corresponding to vhost file 1 to it, so as to realize the deployment of the configuration information of the target server.
[0087] Assuming that the deployment type is to modify configuration information, and the configuration information to be deployed is the correspondence between vhost file 2 and nginx content, the deployment module finds vhost file 2 on the target server and edits the nginx content corresponding to vhost file 2 to implement the deployment of the configuration information of the target server.
[0088] Assuming that the deployment type is to delete configuration information, and the configuration information to be deployed is vhost file 3, after the deployment module finds vhost file 3 on the target server, it deletes the nginx content in vhost file 3 to implement the deployment of the configuration information of the target server.
[0089] In actual applications, after the configuration information is deployed, it may be found that the server operation does not meet expectations, so a rollback is required to restore the server status. To this end, the visual deployment platform provided by the embodiment of the present disclosure includes a rollback module for implementing the rollback function of the configuration information.
[0090] Specifically, the rollback module is used to determine the server to be rolled back, the target rollback version and the rollback type based on the visual interface, and determine the rollback configuration information corresponding to the server to be rolled back according to the target rollback version and the rollback type; wherein the rollback type includes grayscale rollback or global rollback;
[0091] The first communication module is further used to send a configuration rollback request carrying the rollback configuration information to an agent deployed on the server to be rolled back;
[0092] The deployment module of the proxy end is further used to deploy configuration information to the server to be rolled back based on the rollback configuration information carried in the configuration rollback request after receiving the configuration rollback request.
[0093] Among them, after determining the server to be rolled back, the target rollback version and the rollback type, the rollback module obtains the configuration information corresponding to the target rollback version from the configuration information of each historical version of the server to be rolled back, and then obtains the rollback configuration information from the configuration information corresponding to the target rollback version based on the rollback type.
[0094] Assuming that the historical versions of the configuration information of the server to be rolled back include v1.0 and v1.1, the target rollback version is v1.0, and the rollback type is global rollback, then the configuration information corresponding to v1.0 in the configuration information of the server to be rolled back is obtained as the rollback configuration information.
[0095] Among them, global rollback refers to reloading all the configuration information of the target rollback version to the server to be rolled back, while grayscale rollback refers to reloading part of the configuration information of the target rollback version to the server to be rolled back.
[0096] In actual applications, the deployment module of the agent parses the configuration rollback request, obtains the rollback configuration information, and reloads the rollback configuration information to the server to be rolled back to implement the rollback of the configuration information.
[0097] In addition, before deploying the configuration information, the deployment module on the agent side first verifies whether the configuration information to be deployed or rolled back complies with the grammatical rules of the configuration information, so as to avoid server paralysis accidents caused by the release of configuration information that does not comply with the grammatical rules.
[0098] Specifically, the proxy side also includes a rule verification module;
[0099] The rule verification module is used to perform grammatical rule verification on the to-be-deployed configuration information carried in the configuration information deployment request or the rollback configuration information carried in the configuration rollback request after receiving the configuration information deployment request or the configuration rollback request, and trigger the deployment module after determining that the grammatical rule verification passes.
[0100] In an optional implementation, the agent terminal further includes a second communication module;
[0101] The second communication module is used to send a notification message of configuration information deployment failure to the visual deployment platform after determining that the grammar rule verification fails.
[0102] In an optional implementation, the deployment module of the agent side can be implemented using the Confd configuration management tool and the Etcd storage system. Specifically, the deployment module of the agent side includes the Confd configuration management tool and the Etcd storage system;
[0103] The Confd configuration management tool is used to monitor messages in real time, and after receiving the configuration information deployment request, obtain the configuration information to be deployed and the deployment type carried in the configuration information deployment request, and store the configuration information to be deployed in the Etcd storage system;
[0104] The Etcd storage system is used to store the configuration information to be deployed in a key-value pair format;
[0105] The Confd configuration management tool is also used to obtain the configuration information to be deployed stored in a key-value pair format from the Etcd storage system, render the configuration information to be deployed based on a preset configuration information template, and then reload the rendered configuration information to be deployed to the target server based on the deployment type.
[0106] In another optional implementation, the configuration information to be deployed includes a correspondence between a virtual host vhost file identifier and an Nginx configuration content, and the preset configuration information template includes a preset Nginx configuration template;
[0107] The Confd configuration management tool is specifically used to render the Nginx configuration content in the configuration information to be deployed based on the preset Nginx configuration template, and based on the deployment type, reload the rendered Nginx configuration content to the vhost file corresponding to the vhost file identifier in the target server.
[0108] The configuration information deployment system provided by the embodiment of the present disclosure includes a visual deployment platform and an agent deployed on the server. The visual deployment platform is used to determine the target server based on the visual interface, and receive the configuration information to be deployed and the deployment type corresponding to the target server, and send the configuration information deployment request carrying the configuration information to be deployed and the deployment type to the agent deployed on the target server; wherein the target server includes one or more servers, and the deployment type includes adding configuration information, deleting configuration information or modifying configuration information. The agent is used to deploy the configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request after receiving the configuration information deployment request. It can be seen that the configuration information deployment system provided by the embodiment of the present disclosure can realize a visual configuration information deployment solution for the server, reducing the probability of accidents such as project paralysis due to deployment problems.
[0109] Corresponding to the above system implementation, the present disclosure also provides a configuration information deployment method, which is applied to a visual deployment platform. Figure 3 , is a flow chart of a method for deploying configuration information provided by an embodiment of the present disclosure, the method comprising:
[0110] S301: Determine a target server based on a visual interface, and receive configuration information to be deployed and a deployment type corresponding to the target server.
[0111] The target server includes one or more servers, and the deployment type includes adding configuration information, deleting configuration information, or modifying configuration information.
[0112] In the embodiment of the present disclosure, a visualization interface is displayed to the user, and the user can determine the target server on the visualization interface, and input the configuration information to be deployed and the deployment type corresponding to the target server. Figure 4As shown, it is a schematic diagram of the operation functions of a visual interface provided by an embodiment of the present disclosure, wherein the visual deployment platform can provide users with a variety of deployment environments, and users can select a target deployment environment from the multiple deployment environments, and the multiple deployment environments may include a development environment, a test environment, etc. After determining the target deployment environment, a list of projects corresponding to the target deployment environment is displayed on the visual interface of the visual deployment platform, for example, the project list includes project A, project B, and project C. For the project list, the user can select a target project, for example, project A. After determining the target project, the server corresponding to the target project is displayed on the visual interface of the visual deployment platform, such as the server corresponding to project A, and the user can select the target server as the server for configuration information deployment, assuming that the target server is server 45-50. Among them, the target server can be multiple servers with the same domain name, or it can be a single server.
[0113] After determining the target server, input the configuration information to be deployed and the deployment type for the target server, wherein the deployment type includes adding configuration information, deleting configuration information, or modifying configuration information.
[0114] In an optional implementation, the configuration information to be deployed may include a correspondence between a virtual host vhost file identifier in the form of a key-value pair and the Nginx configuration content. The vhost file identifier is used to locate the configuration file in the target server and use the Nginx configuration content to update the configuration information in the configuration file.
[0115] S302: Send a configuration information deployment request carrying the configuration information to be deployed and the deployment type to an agent deployed on the target server.
[0116] The agent is used to deploy the configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request.
[0117] In the disclosed embodiment, after determining the target server, the configuration information to be deployed and the deployment type, a configuration information deployment request is constructed for the target server and sent to the agent deployed on the target server, which completes the configuration deployment of the target server.
[0118] In actual applications, after the configuration information is deployed, it may be found that the server operation does not meet expectations, so a rollback is required to restore the server status. To this end, the configuration information rollback function provided in the embodiments of the present disclosure.
[0119] Specifically, first, based on the visual interface, determine the server to be rolled back, the target rollback version and the rollback type, and determine the rollback configuration information corresponding to the server to be rolled back according to the target rollback version and the rollback type; wherein the rollback type includes grayscale rollback or global rollback. Then, send a configuration rollback request carrying the rollback configuration information to the agent deployed on the server to be rolled back; wherein the agent of the server to be rolled back is used to deploy configuration information for the server to be rolled back based on the rollback configuration information carried in the configuration rollback request.
[0120] The rollback function may be understood by referring to the description of the rollback module in the above system embodiment, which will not be repeated here.
[0121] In addition, in order to distinguish authorization, the visual deployment platform may also have a user management function. Specifically, the project creator may grant different permissions to different users through the user management function of the visual deployment platform.
[0122] In addition, in order to facilitate the location and tracing of problems on the visual deployment platform, the visual deployment platform can also have a log audit function to record the release log, operation log, login log, etc. of the visual deployment platform.
[0123] The configuration information deployment method provided by the embodiment of the present disclosure is applied to a visual deployment platform, and specifically includes: firstly determining the target server based on a visual interface, and receiving the configuration information to be deployed and the deployment type corresponding to the target server; wherein the target server includes one or more servers, and the deployment type includes adding configuration information, deleting configuration information, or modifying configuration information. Then, a configuration information deployment request carrying the configuration information to be deployed and the deployment type is sent to an agent deployed on the target server; wherein the agent is used to deploy configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request. The embodiment of the present disclosure can realize the visual deployment of configuration information for the server, simplify the deployment process of the configuration information, and reduce the probability of accidents such as project paralysis due to deployment problems.
[0124] Based on the above system and method embodiments, the present disclosure also provides a method for deploying configuration information, the method is applied to an agent, the agent is deployed on a target server, and the configuration information is deployed on a target server. Figure 5 , is a flow chart of another configuration information deployment method provided by an embodiment of the present disclosure, the method comprising:
[0125] S501: Receive a configuration information deployment request for the target server.
[0126] The configuration information deployment request carries the configuration information to be deployed and the deployment type, and the deployment type includes adding configuration information, deleting configuration information, or modifying configuration information.
[0127] S502: Deploy configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request.
[0128] In the disclosed embodiment, after receiving the configuration information deployment request, the agent parses the configuration information deployment request to obtain the configuration information to be deployed and the deployment type, and then deploys the configuration information to the target server based on the configuration information to be deployed and the deployment type.
[0129] Assuming that the deployment type is to add configuration information, and the configuration information to be deployed is the correspondence between vhost file 1 and nginx content, the proxy finds vhost file 1 on the target server and adds the nginx content corresponding to vhost file 1 to it to realize the deployment of the configuration information of the target server.
[0130] Assuming that the deployment type is to modify the configuration information, and the configuration information to be deployed is the correspondence between vhost file 2 and nginx content, the proxy finds the vhost file 2 on the target server and edits the nginx content corresponding to the vhost file 2 to implement the deployment of the configuration information of the target server.
[0131] Assuming that the deployment type is to delete configuration information, and the configuration information to be deployed is vhost file 3, after the proxy finds vhost file 3 on the target server, it deletes the nginx content in vhost file 3 to implement the deployment of the configuration information on the target server.
[0132] In an optional implementation, the proxy end may also receive a configuration rollback request for the target server, wherein the configuration rollback request carries rollback configuration information, and then, based on the rollback configuration information carried in the configuration rollback request, deploy configuration information to the target server.
[0133] In actual applications, the proxy parses the configuration rollback request, obtains the rollback configuration information, and reloads the rollback configuration information to the server to be rolled back to implement the rollback of the configuration information.
[0134] In addition, in order to ensure that the configuration information to be deployed or the rollback configuration information reloaded to the target server complies with the grammatical rules of the configuration information, the embodiment of the present disclosure first verifies the grammatical rules of the configuration information to be deployed or the rollback configuration information before deploying the configuration information to the target server, and deploys the configuration information to the target server after the verification is passed.
[0135] If it is determined that the configuration information to be deployed or the rollback configuration information fails to pass the syntax rule verification, the agent sends a notification message of the configuration information deployment failure to the visual deployment platform, which is displayed on the visual interface by the visual deployment platform so that the user can be informed of the configuration information deployment failure.
[0136] In an optional implementation, the deployment of configuration information to a target server may include: first, obtaining the configuration information to be deployed and the deployment type carried in the configuration information deployment request, and then storing the configuration information to be deployed in a key-value pair format in an Etcd storage system, and then rendering the configuration information to be deployed, and based on the deployment type, reloading the rendered configuration information to be deployed to the target server to complete the deployment of the configuration information to the target server.
[0137] Confd configuration management tool is a lightweight configuration management tool. By querying the Etcd storage system and combining the configuration template engine, it can keep the local configuration up to date. It also has functions such as regular detection mechanism and automatic reload of configuration changes. The Etcd storage system is a highly available Key / Value storage system used for sharing configuration and service discovery. Nginx is a high-performance HTTP and reverse proxy web server. Nginx includes multiple vhost files, each of which contains the corresponding Nginx configuration content.
[0138] In an optional implementation, the configuration information may be deployed using the functions of the Confd configuration management tool and the Etcd storage system.
[0139] Specifically, the Confd configuration management tool can be used to first obtain the configuration information to be deployed and the deployment type carried in the configuration information deployment request, and store the configuration information to be deployed in the Etcd storage system in a key-value pair format. Then, the Confd configuration management tool is used to obtain the configuration information to be deployed stored in the key-value pair format from the Etcd storage system. Then, after rendering the configuration information to be deployed based on a preset configuration information template, the rendered configuration information to be deployed is reloaded to the target server based on the deployment type.
[0140] In an optional implementation, the configuration information to be deployed includes a correspondence between a virtual host vhost file identifier and Nginx configuration content, and the preset configuration information template includes a preset Nginx configuration template.
[0141] The proxy can render the Nginx configuration content in the configuration information to be deployed based on the preset Nginx configuration template, and based on the deployment type, reload the rendered Nginx configuration content to the vhost file corresponding to the vhost file identifier in the target server to complete the deployment of the configuration information.
[0142] In the configuration information deployment method provided in the embodiment of the present disclosure, configuration information deployment for the server can be implemented based on the agent deployed on the server, which simplifies the configuration information deployment process and reduces the probability of accidents such as project paralysis due to deployment problems.
[0143] Corresponding to the above-mentioned system and method implementation, the present disclosure also provides a configuration information deployment device, which is applied to a visual deployment platform, referring to Figure 6 , is a schematic diagram of a configuration information deployment device provided in an embodiment of the present disclosure, the device comprising:
[0144] The first determination module 601 is used to determine the target server based on the visual interface, and receive the to-be-deployed configuration information and the deployment type corresponding to the target server; wherein the target server includes one or more servers, and the deployment type includes adding configuration information, deleting configuration information, or modifying configuration information;
[0145] The first sending module 602 is used to send a configuration information deployment request carrying the configuration information to be deployed and the deployment type to an agent deployed on the target server; wherein the agent is used to deploy the configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request.
[0146] In an optional implementation, the device further includes:
[0147] A second determination module is used to determine the server to be rolled back, the target rollback version and the rollback type based on the visual interface; wherein the rollback type includes grayscale rollback or global rollback;
[0148] A third determination module is used to determine the rollback configuration information corresponding to the server to be rolled back according to the target rollback version and the rollback type;
[0149] The second sending module is used to send a configuration rollback request carrying the rollback configuration information to an agent deployed on the server to be rolled back; wherein the agent of the server to be rolled back is used to deploy configuration information for the server to be rolled back based on the rollback configuration information carried in the configuration rollback request.
[0150] Corresponding to the above-mentioned system, method and device implementation, the present disclosure also provides a configuration information deployment device, the device is applied to the device is applied to the agent end, the agent end is deployed on the target server, and the reference Figure 7 , is a schematic diagram of a configuration information deployment device provided in an embodiment of the present disclosure, the device comprising:
[0151] The first receiving module 701 is used to receive a configuration information deployment request for the target server; wherein the configuration information deployment request carries the configuration information to be deployed and the deployment type, and the deployment type includes adding configuration information, deleting configuration information or modifying configuration information;
[0152] The first deployment module 702 is used to deploy configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request.
[0153] In an optional implementation, the device further includes:
[0154] A second receiving module is used to receive a configuration rollback request for the target server; wherein the configuration rollback request carries rollback configuration information;
[0155] The second deployment module is used to deploy configuration information to the target server based on the rollback configuration information carried in the configuration rollback request.
[0156] In an optional implementation, the device further includes:
[0157] A grammar rule verification module is used to perform grammar rule verification on the configuration information to be deployed carried in the configuration information deployment request or the rollback configuration information carried in the configuration rollback request, and after determining that the grammar rule verification passes, execute the step of deploying the configuration information to the target server.
[0158] In an optional implementation, the device further includes:
[0159] The third sending module is used to send a notification message of configuration information deployment failure to the visual deployment platform after determining that the grammar rule verification fails.
[0160] In an optional implementation manner, the first deployment module includes:
[0161] A first acquisition submodule is used to acquire the configuration information to be deployed and the deployment type carried in the configuration information deployment request;
[0162] A first storage submodule, used to store the to-be-deployed configuration information in a key-value pair format in an Etcd storage system;
[0163] A second acquisition submodule is used to obtain the configuration information to be deployed stored in a key-value pair format from the Etcd storage system;
[0164] A first rendering submodule, used for rendering the configuration information to be deployed;
[0165] The first reloading submodule is used to reload the rendered configuration information to be deployed to the target server based on the deployment type.
[0166] In an optional implementation manner, the first rendering submodule is specifically configured to:
[0167] The Nginx configuration content in the configuration information to be deployed is rendered based on a preset Nginx configuration template.
[0168] In an optional implementation manner, the first heavy-load submodule is specifically used to:
[0169] Based on the deployment type, the rendered Nginx configuration content is reloaded into the vhost file identified by the virtual machine vhost file corresponding to the Nginx configuration content in the target server.
[0170] The configuration information deployment device provided in the embodiment of the present disclosure can implement a visualized configuration information deployment solution for the server, simplify the configuration information deployment process, and reduce the probability of accidents such as project paralysis due to deployment problems.
[0171] In addition, the present disclosure also provides a configuration information deployment device, see Figure 8 As shown, it may include:
[0172] Processor 801, memory 802, input device 803 and output device 804. The number of processors 801 in the configuration information deployment device can be one or more. Figure 8 In some embodiments of the present invention, the processor 801, the memory 802, the input device 803 and the output device 804 may be connected via a bus or other means, wherein: Figure 8 The example of connecting through bus is taken in the following.
[0173] The memory 802 can be used to store software programs and modules. The processor 801 executes various functional applications and data processing of the deployment device of the configuration information by running the software programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. The input device 803 may be used to receive input digital or character information, and to generate signal input related to user settings and function control of the deployment device of the configuration information.
[0174] Specifically in this embodiment, the processor 801 will load the executable files corresponding to the processes of one or more applications into the memory 802 according to the following instructions, and the processor 801 will run the applications stored in the memory 802, thereby realizing various functions of the deployment device of the above configuration information.
[0175] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0176] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A configuration information deployment system, characterized in that: The system includes a visual deployment platform and an agent deployed on a server; The visual deployment platform is used to determine the target server based on a visual interface, and receive the configuration information to be deployed and the deployment type corresponding to the target server input by the user based on the visual interface, and send a configuration information deployment request carrying the configuration information to be deployed and the deployment type to the agent deployed on the target server; wherein the target server includes one or more servers, the deployment type includes adding configuration information, deleting configuration information or modifying configuration information, the configuration information to be deployed includes the correspondence between the virtual host vhost file identifier in the form of a key-value pair and the Nginx configuration content, the vhost file identifier is used to locate the configuration file in the target server, and the Nginx configuration content is used to update the configuration information in the configuration file; The proxy end is used to deploy the configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request after receiving the configuration information deployment request.
2. The system according to claim 1, characterized in that The visual deployment platform includes a visual configuration module and a first communication module, and the agent terminal includes a deployment module; The visualization configuration module is used to determine the target server based on the visualization interface, and receive the configuration information to be deployed and the deployment type corresponding to the target server input by the user based on the visualization interface; wherein the target server includes one or more servers, and the deployment type includes adding configuration information, deleting configuration information or modifying configuration information; The first communication module is used to send a configuration information deployment request carrying the configuration information to be deployed and the deployment type to an agent deployed on the target server; The deployment module of the proxy end is used to deploy the configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request after receiving the configuration information deployment request.
3. The system according to claim 2, characterized in that The visual deployment platform includes a rollback module; The rollback module is used to determine the server to be rolled back, the target rollback version and the rollback type based on the visual interface, and determine the rollback configuration information corresponding to the server to be rolled back according to the target rollback version and the rollback type; wherein the rollback type includes grayscale rollback or global rollback; The first communication module is further used to send a configuration rollback request carrying the rollback configuration information to an agent deployed on the server to be rolled back; The deployment module of the proxy end is further used to deploy configuration information to the server to be rolled back based on the rollback configuration information carried in the configuration rollback request after receiving the configuration rollback request.
4. The system according to claim 3, characterized in that The agent terminal also includes a rule verification module; The rule verification module is used to perform grammatical rule verification on the to-be-deployed configuration information carried in the configuration information deployment request or the rollback configuration information carried in the configuration rollback request after receiving the configuration information deployment request or the configuration rollback request, and trigger the deployment module after determining that the grammatical rule verification passes.
5. The system according to claim 4, characterized in that The agent terminal also includes a second communication module; The second communication module is used to send a notification message of configuration information deployment failure to the visual deployment platform after determining that the grammar rule verification fails.
6. The system according to claim 2, characterized in that The deployment module of the agent includes Confd configuration management tool and Etcd storage system; The Confd configuration management tool is used to monitor messages in real time, and after receiving the configuration information deployment request, obtain the configuration information to be deployed and the deployment type carried in the configuration information deployment request, and store the configuration information to be deployed in the Etcd storage system; The Etcd storage system is used to store the configuration information to be deployed in a key-value pair format; The Confd configuration management tool is also used to obtain the configuration information to be deployed stored in a key-value pair format from the Etcd storage system, render the configuration information to be deployed based on a preset configuration information template, and then reload the rendered configuration information to be deployed to the target server based on the deployment type.
7. The system according to claim 6, characterized in that The preset configuration information template includes a preset Nginx configuration template; The Confd configuration management tool is used to render the Nginx configuration content in the configuration information to be deployed based on the preset Nginx configuration template, and based on the deployment type, reload the rendered Nginx configuration content to the vhost file corresponding to the vhost file identifier in the target server.
8. A method for deploying configuration information, characterized in that: The method is applied to a visual deployment platform, and the method includes: Determine a target server based on a visual interface, and receive configuration information to be deployed and a deployment type corresponding to the target server input by a user based on the visual interface; wherein the target server includes one or more servers, the deployment type includes adding configuration information, deleting configuration information or modifying configuration information, the configuration information to be deployed includes a correspondence between a virtual host vhost file identifier in the form of a key-value pair and an Nginx configuration content, the vhost file identifier is used to locate a configuration file in the target server, and the Nginx configuration content is used to update the configuration information in the configuration file; A configuration information deployment request carrying the configuration information to be deployed and the deployment type is sent to an agent deployed on the target server; wherein the agent is used to deploy configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request.
9. The method according to claim 8, characterized in that The method further comprises: Determine the server to be rolled back, the target rollback version and the rollback type based on the visualization interface; wherein the rollback type includes grayscale rollback or global rollback; Determine the rollback configuration information corresponding to the server to be rolled back according to the target rollback version and the rollback type; A configuration rollback request carrying the rollback configuration information is sent to an agent deployed on the server to be rolled back; wherein the agent of the server to be rolled back is used to deploy configuration information on the server to be rolled back based on the rollback configuration information carried in the configuration rollback request.
10. A method for deploying configuration information, characterized in that: The method is applied to an agent terminal, and the agent terminal is deployed on a target server. The method includes: Receive a configuration information deployment request for the target server; wherein the configuration information deployment request carries the configuration information to be deployed and the deployment type, the deployment type includes adding configuration information, deleting configuration information or modifying configuration information, the configuration information to be deployed and the deployment type are input by a user based on a visual interface, the configuration information to be deployed includes a correspondence between a virtual host vhost file identifier in the form of a key-value pair and an Nginx configuration content, the vhost file identifier is used to locate a configuration file in the target server, and the Nginx configuration content is used to update the configuration information in the configuration file; The configuration information is deployed to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request.
11. The method according to claim 10, characterized in that The method further comprises: Receiving a configuration rollback request for the target server; wherein the configuration rollback request carries rollback configuration information; Based on the rollback configuration information carried in the configuration rollback request, configuration information is deployed to the target server.
12. The method according to claim 11, characterized in that Before deploying the configuration information to the target server, the method further includes: The configuration information to be deployed carried in the configuration information deployment request or the rollback configuration information carried in the configuration rollback request is subjected to grammatical rule verification, and after determining that the grammatical rule verification passes, the step of deploying the configuration information to the target server is executed.
13. The method according to claim 12, characterized in that The method further comprises: After determining that the grammar rule verification fails, a notification message of configuration information deployment failure is sent to the visual deployment platform.
14. The method according to claim 10, characterized in that The deploying the configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request includes: Obtaining the configuration information to be deployed and the deployment type carried in the configuration information deployment request; Storing the configuration information to be deployed in the Etcd storage system in a key-value pair format; Acquire the configuration information to be deployed stored in a key-value pair format from the Etcd storage system; Rendering the configuration information to be deployed; Based on the deployment type, the rendered configuration information to be deployed is reloaded to the target server.
15. The method according to claim 14, characterized in that The rendering of the configuration information to be deployed includes: The Nginx configuration content in the configuration information to be deployed is rendered based on a preset Nginx configuration template.
16. The method according to claim 15, characterized in that The step of reloading the rendered configuration information to be deployed to the target server based on the deployment type includes: Based on the deployment type, the rendered Nginx configuration content is reloaded into the vhost file identified by the virtual host vhost file corresponding to the Nginx configuration content in the target server.
17. A device for deploying configuration information, characterized in that: The device is applied to a visual deployment platform, and the device includes: A first determination module is used to determine a target server based on a visual interface, and to receive configuration information to be deployed and a deployment type corresponding to the target server input by a user based on the visual interface; wherein the target server includes one or more servers, the deployment type includes adding configuration information, deleting configuration information or modifying configuration information, the configuration information to be deployed includes a correspondence between a virtual host vhost file identifier in the form of a key-value pair and an Nginx configuration content, the vhost file identifier is used to locate a configuration file in the target server, and the Nginx configuration content is used to update the configuration information in the configuration file; The first sending module is used to send a configuration information deployment request carrying the configuration information to be deployed and the deployment type to an agent deployed on the target server; wherein the agent is used to deploy the configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request.
18. A device for deploying configuration information, characterized in that: The device is applied to an agent end, and the agent end is deployed on a target server. The device includes: A first receiving module is used to receive a configuration information deployment request for the target server; wherein the configuration information deployment request carries the configuration information to be deployed and the deployment type, the deployment type includes adding configuration information, deleting configuration information or modifying configuration information, the configuration information to be deployed and the deployment type are input by a user based on a visual interface, the configuration information to be deployed includes a correspondence between a virtual host vhost file identifier in the form of a key-value pair and an Nginx configuration content, the vhost file identifier is used to locate a configuration file in the target server, and the Nginx configuration content is used to update the configuration information in the configuration file; The first deployment module is used to deploy configuration information to the target server based on the configuration information to be deployed and the deployment type carried in the configuration information deployment request.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the method according to any one of claims 8 to 16.
20. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 8 to 16 is implemented.
21. A computer program product, characterized in that The computer program product comprises a computer program / instruction, and when the computer program / instruction is executed by a processor, the method according to any one of claims 8 to 16 is implemented.
Citation Information
Patent Citations
Distributed cluster deployment method, distributed cluster deployment device, distributed cluster deployment system and storage medium
CN108965003A
Configuration method and system
CN111371598A
Service deployment method and device, server and readable storage medium
CN112181436A
Confd-based dynamic configuration updating method and system
CN112486564A