CN113485766A - Reverse proxy cluster management method and system based on salt and nginx - Google Patents

Reverse proxy cluster management method and system based on salt and nginx Download PDF

Info

Publication number
CN113485766A
CN113485766A CN202110768700.5A CN202110768700A CN113485766A CN 113485766 A CN113485766 A CN 113485766A CN 202110768700 A CN202110768700 A CN 202110768700A CN 113485766 A CN113485766 A CN 113485766A
Authority
CN
China
Prior art keywords
configuration information
reverse proxy
generated
salt
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110768700.5A
Other languages
Chinese (zh)
Inventor
康明亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Zhongtongji Network Technology Co Ltd
Original Assignee
Shanghai Zhongtongji Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Zhongtongji Network Technology Co Ltd filed Critical Shanghai Zhongtongji Network Technology Co Ltd
Priority to CN202110768700.5A priority Critical patent/CN113485766A/en
Publication of CN113485766A publication Critical patent/CN113485766A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a method and a system for reverse proxy cluster management based on salt and nginx, wherein the method comprises the following steps: the method comprises the following steps that an administrator customizes a reverse proxy configuration template and a mapping relation of a cluster in advance, and an employee fills in or selects parameters according to requirements to submit requirement parameters; then, according to parameters submitted by the staff, reverse proxy configuration and generation are carried out to obtain pre-generated configuration information; checking and detecting the pre-generated configuration information, and generating a configuration file after confirming that the pre-generated configuration information is correct; and finally, sending the configuration file to the reverse proxy cluster according to the current state of the reverse proxy cluster and a preset cluster mapping relation. Therefore, the requirement parameter formats can be unified through the preset template, the error rate of submitted requirement parameters is reduced, and pre-generated configuration information is checked and detected before the configuration file is generated, so that the errors of the configuration file are reduced, the management difficulty is reduced, and the management efficiency is improved.

Description

Reverse proxy cluster management method and system based on salt and nginx
Technical Field
The application relates to the technical field of internet, in particular to a reverse proxy cluster management method based on salt and nginx.
Background
With the increase of company traffic, reverse proxy and domain name operations are more and more, in the prior art, cluster operations of the reverse proxy are all performed through a linux command line, and cluster management operations of the reverse proxy are all performed by employees according to requirements after copy original files are copied on a satl-master and then fields and values are modified in a self-defined mode, and then configuration is pushed to the reverse proxy cluster to be effective through the linux command line execution salt command according to the known cluster corresponding relation. When management is needed, the operation is complex and tedious, and the error rate of command line operation is high, which is easy to cause accidents.
Disclosure of Invention
Aiming at the problems that in the prior art, in the process of using a reverse proxy cluster, the management operation is complex and tedious, the error rate of command line operation is high, and accidents are easily caused, the application provides a reverse proxy cluster management method based on salt and nginx, and the method is used for solving the technical problem to a certain extent.
The above object of the present application is achieved by the following technical solutions:
in a first aspect, an embodiment of the present application provides a reverse proxy cluster management system based on salt and nginx, including:
receiving a requirement parameter generated and sent by an employee based on a preset template; the preset template is a diversity template set by an administrator and used for being selected and filled by an employee when the employee inputs a demand parameter;
selecting and rendering data based on the requirement parameters, and performing reverse proxy configuration pre-generation to obtain pre-generation configuration information;
auditing and detecting the pre-generated configuration information, and generating a configuration file when the pre-generated configuration information is confirmed to be abnormal;
and sending the configuration file to a preset reverse proxy cluster based on a preset cluster mapping relation and the current state of the cluster.
Optionally, the auditing and detecting the pre-generated configuration information includes:
and performing secondary audit on the pre-generated configuration information based on the requirement parameters, and confirming whether the pre-generated configuration information is abnormal or not.
Optionally, the auditing and detecting the pre-generated configuration information further includes:
and carrying out grammar format correctness detection on the pre-generated configuration information, and confirming whether grammar format abnormity and errors exist in the pre-generated configuration information.
Optionally, the method further includes:
checking the pre-generated configuration information, and receiving the definition change of an administrator after detecting the abnormality;
and changing the pre-generated configuration information based on the custom change data.
Optionally, the number of the preset reverse proxy clusters is at least two.
In a second aspect, an embodiment of the present application provides a reverse proxy cluster management system based on salt and nginx, including: the system comprises a receiving module, a configuration pre-generation module, a grammar self-checking module, an auditing module and a sending module;
the receiving module is used for receiving the requirement information filled or selected by the staff;
the configuration pre-generation module is used for pre-generating configuration information based on the requirement information to obtain pre-generated configuration information;
the grammar self-checking module is used for detecting the pre-generated configuration information to carry out grammar correctness detection;
the auditing module is used for the administrator to audit the pre-generated configuration information;
and the issuing module is used for an administrator to issue the configuration file to the reverse proxy cluster.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in the technical scheme provided by the embodiment of the application, an administrator customizes the mapping relation of the reverse proxy configuration template and the cluster in advance, and an employee fills or selects parameters according to requirements to submit the required parameters; then, according to parameters submitted by the staff, reverse proxy configuration and generation are carried out to obtain pre-generated configuration information; checking and detecting the pre-generated configuration information, and generating a configuration file after confirming that the pre-generated configuration information is correct; and finally, sending the configuration file to the reverse proxy cluster according to the current state of the reverse proxy cluster and a preset cluster mapping relation. Therefore, the requirement parameter formats can be unified through the preset template, the error rate of submitted requirement parameters is reduced, and pre-generated configuration information is checked and detected before the configuration file is generated, so that errors of the configuration file are reduced, modification of the configuration file which is inconvenient to modify is avoided, the management difficulty is reduced, and the management efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic flowchart illustrating a reverse proxy cluster management method based on salt and nginx according to an embodiment of the present application;
fig. 2 is a schematic flowchart illustrating a reverse proxy cluster management method based on salt and nginx according to another embodiment of the present application;
fig. 3 is a schematic flowchart of a reverse proxy cluster management system based on salt and nginx according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Fig. 1 is a schematic flowchart of a method for managing a reverse proxy cluster based on salt and nginx shown in an embodiment of the present application, and as shown in fig. 1, the method for managing a reverse proxy cluster based on salt and nginx provided in the embodiment of the present application includes:
s101, receiving a requirement parameter generated and sent by an employee based on a preset template;
specifically, an administrator can customize and edit a standard configuration template in advance through a preset system, and when the requirement of the reverse agent is improved, the employee only needs to select and automatically fill the template to input the required value, so that the task of configuration parameters is submitted.
S102, selecting and rendering data based on the requirement parameters, and performing reverse proxy configuration pre-generation to obtain pre-generation configuration information;
specifically, after the staff submits the reverse agent requirement configuration parameters through the diversity template set by the administrator, the program in the preset system automatically selects and renders data according to different requirements, and configuration pre-generation is performed.
S103, auditing and detecting the pre-generated configuration information, and generating a configuration file when the pre-generated configuration information is confirmed to be abnormal;
specifically, the auditing and checking the pre-generated configuration information includes: the administrator acquires the requirement information submitted by the staff through a preset system, namely configuration parameters input by the staff, carries out secondary verification on the pre-generated configuration information, and manually detects whether the pre-generated configuration information and the information submitted by the actual staff are abnormal or not, so that the information correctness is ensured; on the other hand, the method also comprises the steps of automatically detecting the correctness of the grammar format of the pre-generated configuration information through a program in the preset system, and returning the detection result to the administrator for the administrator to make judgment.
In practical application, when the administrator performs secondary review, or the administrator receives information returned by the preset system and displays that the pre-generated configuration information is abnormal, the administrator may stop the subsequent process, that is, stop performing configuration delivery, and at the same time, the administrator may directly modify the pre-generated configuration information when finding that the pre-generated configuration information is wrong or abnormal, and then perform subsequent configuration delivery after confirming that no fault exists again.
It should be noted that in the method for managing a cluster based on salt and nginx reverse proxy provided in the embodiment of the present application, after the pre-generated configuration information is generated, the pre-generated configuration information is subjected to secondary review, and syntax correctness detection is automatically performed on the pre-generated configuration information through a preset system program.
S104, sending the configuration file to a preset reverse proxy cluster based on a preset cluster mapping relation and the current state of the cluster;
specifically, an administrator firstly sets a mapping relation between the internal network and the external network of the reverse proxy cluster through a preset system, and after confirming that the configuration file is accurate, the administrator pushes the configuration file to a reverse proxy node and creates a public network domain name resolution through the preset system.
In practical application, because the number of reverse proxy clusters is large, when the administrator issues the configuration file to the reverse proxy clusters through the salt-master, the administrator can also select the clusters according to the current state of the clusters, so as to reasonably distribute the clusters, issue the configuration batch to the corresponding reverse proxy clusters and enable the configuration batch to take effect.
According to the method for cluster management based on salt and nginx reverse proxy, a standard configuration template is pre-defined by an administrator for employees to select and fill, after the employees complete the task submission of the required parameters, the pre-generation of the configuration file is automatically completed through a preset system, and after secondary verification and grammar correctness detection, the configuration file is issued to the cluster through the cluster mapping relation preset by the administrator. In the whole process, configuration errors are reduced through template uploading requirements, secondary audit of an administrator and grammar correctness detection, and finally the configuration is uniformly issued to the cluster after the administrator confirms that no errors exist, so that management is facilitated, the error rate is low, and the management efficiency is improved.
Fig. 2 is a schematic flowchart illustrating a method for reverse proxy cluster management based on salt and nginx according to another embodiment of the present application, as shown in fig. 2,
firstly, an employee fills or selects a requirement in a preset system through a preset template, after the requirement is submitted, the background service of the preset system automatically pre-generates configuration, and after configuration information is pre-generated, on one hand, the system automatically detects configuration, detects grammatical correctness, and returns correctness detection to an administrator. On the other hand, the administrator also performs secondary verification on the configuration information according to the parameters submitted by the staff, selects the cluster after confirming that the pre-generated configuration information is correct, and issues the configuration file through the salt-master.
Fig. 3 is a schematic flowchart of a reverse proxy cluster management system based on salt and nginx according to another embodiment of the present application, and as shown in fig. 3, the reverse proxy cluster management system based on salt and nginx provided in the embodiment of the present application includes:
the system comprises a receiving module 301, a configuration pre-generation module 302, a grammar self-checking module 303, an auditing module 304 and a sending module 305;
the receiving module 301 is configured to receive requirement information filled or selected by an employee;
the configuration pre-generation module 302 is configured to pre-generate configuration information based on the requirement information to obtain pre-generated configuration information;
a syntax self-checking module 303, configured to detect the pre-generated configuration information and perform syntax correctness detection;
the auditing module 304 is used for an administrator to audit the pre-generated configuration information;
and the issuing module 305 is configured to enable an administrator to issue the configuration file to the reverse proxy cluster.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (6)

1. A reverse proxy cluster management method based on salt and nginx is characterized by comprising the following steps:
receiving a requirement parameter generated and sent by an employee based on a preset template; the preset template is a diversity template set by an administrator and used for being selected and filled by an employee when the employee inputs a demand parameter;
selecting and rendering data based on the requirement parameters, and performing reverse proxy configuration pre-generation to obtain pre-generation configuration information;
auditing and detecting the pre-generated configuration information, and generating a configuration file when the pre-generated configuration information is confirmed to be abnormal;
and sending the configuration file to a preset reverse proxy cluster based on a preset cluster mapping relation and the current state of the cluster.
2. The salt and nginx based reverse proxy cluster management method of claim 1, wherein the auditing and detecting the pre-generated configuration information comprises:
and performing secondary audit on the pre-generated configuration information based on the requirement parameters, and confirming whether the pre-generated configuration information is abnormal or not.
3. The salt and nginx based reverse proxy cluster management method of claim 1, wherein the auditing and detecting the pre-generated configuration information further comprises:
and carrying out grammar format correctness detection on the pre-generated configuration information, and confirming whether grammar format abnormity and errors exist in the pre-generated configuration information.
4. The salt and nginx based reverse proxy cluster management method of claim 2, further comprising:
checking the pre-generated configuration information, and receiving the definition change of an administrator after detecting the abnormality;
and changing the pre-generated configuration information based on the custom change data.
5. The salt and nginx based reverse proxy cluster management method of claim 1, wherein the number of the preset reverse proxy clusters is at least two.
6. A reverse proxy cluster management system based on salt and nginx, characterized by comprising: the system comprises a receiving module, a configuration pre-generation module, a grammar self-checking module, an auditing module and a sending module;
the receiving module is used for receiving the requirement information filled or selected by the staff;
the configuration pre-generation module is used for pre-generating configuration information based on the requirement information to obtain pre-generated configuration information;
the grammar self-checking module is used for detecting the pre-generated configuration information to carry out grammar correctness detection;
the auditing module is used for the administrator to audit the pre-generated configuration information;
and the issuing module is used for an administrator to issue the configuration file to the reverse proxy cluster.
CN202110768700.5A 2021-07-07 2021-07-07 Reverse proxy cluster management method and system based on salt and nginx Pending CN113485766A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110768700.5A CN113485766A (en) 2021-07-07 2021-07-07 Reverse proxy cluster management method and system based on salt and nginx

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110768700.5A CN113485766A (en) 2021-07-07 2021-07-07 Reverse proxy cluster management method and system based on salt and nginx

Publications (1)

Publication Number Publication Date
CN113485766A true CN113485766A (en) 2021-10-08

Family

ID=77940887

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110768700.5A Pending CN113485766A (en) 2021-07-07 2021-07-07 Reverse proxy cluster management method and system based on salt and nginx

Country Status (1)

Country Link
CN (1) CN113485766A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174244A (en) * 2022-07-14 2022-10-11 湖北天融信网络安全技术有限公司 Safety detection method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108712457A (en) * 2018-04-03 2018-10-26 苏宁易购集团股份有限公司 Back-end server dynamic load method of adjustment and device based on Nginx reverse proxys
CN109450708A (en) * 2018-12-14 2019-03-08 北京明朝万达科技股份有限公司 A kind of Nginx Dynamic Configuration and system
CN109905263A (en) * 2017-12-11 2019-06-18 上海逸云信息科技发展有限公司 A kind of automation O&M deployment system
CN112702203A (en) * 2020-12-22 2021-04-23 上海智迩智能科技有限公司 Nginx cluster white screen configuration management method and system
WO2021082081A1 (en) * 2019-10-29 2021-05-06 平安科技(深圳)有限公司 Method, system and device for dynamically modifying nginx configuration parameters, and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109905263A (en) * 2017-12-11 2019-06-18 上海逸云信息科技发展有限公司 A kind of automation O&M deployment system
CN108712457A (en) * 2018-04-03 2018-10-26 苏宁易购集团股份有限公司 Back-end server dynamic load method of adjustment and device based on Nginx reverse proxys
CN109450708A (en) * 2018-12-14 2019-03-08 北京明朝万达科技股份有限公司 A kind of Nginx Dynamic Configuration and system
WO2021082081A1 (en) * 2019-10-29 2021-05-06 平安科技(深圳)有限公司 Method, system and device for dynamically modifying nginx configuration parameters, and storage medium
CN112702203A (en) * 2020-12-22 2021-04-23 上海智迩智能科技有限公司 Nginx cluster white screen configuration management method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174244A (en) * 2022-07-14 2022-10-11 湖北天融信网络安全技术有限公司 Safety detection method and system
CN115174244B (en) * 2022-07-14 2024-05-28 湖北天融信网络安全技术有限公司 Safety detection method and system

Similar Documents

Publication Publication Date Title
CN112148542B (en) Reliability testing method, device and system for distributed storage cluster
CN106549810A (en) Cloud service platform redaction issues front method of testing, device and system
WO2020258674A1 (en) Script file verification method and apparatus, server and storage medium
CN111338869B (en) Configuration parameter management method, device, equipment and storage medium
CN112989422B (en) Block chain system assembling method, device, electronic equipment and storage medium
WO2023179749A1 (en) Configuration data processing system and method, and electronic device
CN111176991A (en) Automatic generation method for embedded software interface use case
CN113485766A (en) Reverse proxy cluster management method and system based on salt and nginx
EP2693692B1 (en) Verification of computer system prior to and subsequent to computer program installation
EP4025994A1 (en) Enhanced virtual machine image management system
CN116107885A (en) Interface testing method, device, equipment and storage medium
CN113918150A (en) Method for automatically configuring interface front-end code
CN113986334A (en) Blue-green automatic publishing method based on automatic publishing platform
CN113987400A (en) Design and code generation method of front-end webpage template
CN112256554B (en) Method and equipment for testing based on scene test cases
CN114064467A (en) Resource analysis method and device, electronic equipment and storage medium
CN111488232A (en) System and method for out-of-box solution level configuration and diagnostic logging and reporting
CN110647657B (en) Method, device and equipment for automatically correcting errors of resource structured data and storage medium
US11693765B2 (en) Unified regression platform for regression testing
CN113190463B (en) Code testing method, node and system
CN117538672B (en) Test method and device for target capacitive screen and electronic equipment
US11768527B2 (en) Data center component replacement
CN113886165B (en) Verification method, device and equipment for firmware diagnosis function and readable medium
WO2023093365A1 (en) Parameter configuration method and apparatus
CN115981681A (en) Server delivery method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination