CN117950692A - Method, system and device for updating node configuration data in gray test scene - Google Patents

Method, system and device for updating node configuration data in gray test scene Download PDF

Info

Publication number
CN117950692A
CN117950692A CN202311849434.4A CN202311849434A CN117950692A CN 117950692 A CN117950692 A CN 117950692A CN 202311849434 A CN202311849434 A CN 202311849434A CN 117950692 A CN117950692 A CN 117950692A
Authority
CN
China
Prior art keywords
target
node
data
version number
update data
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
CN202311849434.4A
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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202311849434.4A priority Critical patent/CN117950692A/en
Publication of CN117950692A publication Critical patent/CN117950692A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a method, a system and a device for updating node configuration data in a gray test scene, and relates to the technical field of computers. The method is applied to a data configuration system comprising a configuration center and a plurality of nodes of which k8s are deployed in at least one server. The configuration center acquires a target version number of update data of configuration data of an application program to be subjected to gray level test, a storage address of the update data and a preset node screening rule; the configuration center determines a plurality of target nodes and updates the current version number corresponding to the node identification of the target node in the corresponding relation between the node identification and the version number to the target version number; and when the current version number corresponding to each target node is updated to the target version number, each target node acquires a storage address of the update data, acquires the update data according to the storage address and stores the update data. By applying the scheme provided by the embodiment of the application, the configuration data of the nodes deployed in k8s can be updated in a gray scale test scene.

Description

Method, system and device for updating node configuration data in gray test scene
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, a system, and an apparatus for updating node configuration data in a gray scale test scenario.
Background
In order to facilitate the management and expansion of the application programs, the application programs can be migrated to the cloud environment for operation, and each application program can be deployed and managed in the cloud environment by using k8 s.
Wherein k8s (Kubernetes) is a distributed resource management system, and by containerizing each application program, automatic deployment, management and expansion of the application program are realized.
In general, when the version of the application program is updated, the mirror image of the application program may be updated, and then, each node may update the mirror image, and further, obtain the update data of the configuration data of the application service, thereby updating its own configuration data. However, when it is desired that a part of the nodes acquire update data of the configuration data of the application program, for example, when gray scale testing is performed on an update version of the application program, the part of the nodes may be screened to update the configuration data of the application program, and further, operation data about the update version may be collected so as to test the operation effect of the update version using the operation data.
The above process of screening a part of nodes from the nodes deployed by k8s and issuing the update data of the configuration data of the application program to the screened part of nodes may be referred to as gray distribution of the update data of the configuration data of the application program.
Based on this, how to perform gray scale distribution of update data of configuration data for an application deployed by k8s is a technical problem to be solved currently.
Disclosure of Invention
The embodiment of the application aims to provide a method, a system and a device for updating node configuration data in a gray test scene, so that the gray release of the update data of the configuration data of an application program in the gray test scene can update the configuration data of each node to be subjected to gray test. The specific technical scheme is as follows:
In a first aspect of the present application, firstly, an update method of node configuration data in a gray scale test scene is provided, which is applied to a data configuration system; the system comprises a configuration center and a plurality of nodes of which k8s are deployed in at least one server, wherein each server is provided with at least one node;
the configuration center acquires a target version number of update data of configuration data of an application program to be subjected to gray level test, a storage address of the update data and a preset node screening rule;
The configuration center determines a plurality of target nodes in the plurality of nodes based on the preset node screening rule, and updates the current version number corresponding to the node identifier of each target node into the target version number in the corresponding relation between the node identifier and the version number for each target node; wherein the correspondence is obtained from the k8s by the configuration center;
each target node obtains the target version number and the storage address of the update data when the current version number corresponding to the node identification of the target node is updated to the target version number in the corresponding relation stored in the configuration center;
And each target node acquires the update data with the target version number according to the storage address of the update data, and stores the update data in a target storage space of a server where the target node is located.
Optionally, in a specific implementation manner, the method further includes:
Each node monitors the corresponding relation stored in the configuration center;
Each target node obtains the target version number and the storage address of the update data when the current version number corresponding to the node identifier of the target node is updated to the target version number in the corresponding relation stored in the configuration center, and the method comprises the following steps:
And each target node sends an address acquisition request about a storage address of update data with the target version number to the configuration center when monitoring that the current version number corresponding to the node identification of the target node is updated to the target version number in the corresponding relation stored in the configuration center, and receives the storage address of the update data sent by the configuration center in response to the address acquisition request.
Optionally, in a specific implementation manner, the method further includes:
The configuration center sends the target version number and the storage address of the update data to each target node when updating the current version number corresponding to the node identifier of the target node to the target version number in the corresponding relation between the node identifier and the version number;
Each target node obtains the target version number and the storage address of the update data when the current version number corresponding to the node identifier of the target node is updated to the target version number in the corresponding relation stored in the configuration center, and the method comprises the following steps:
And each target node receives the target version number issued by the configuration center and the storage address of the update data.
Optionally, in a specific implementation manner, the determining, by the configuration center, a plurality of target nodes among the plurality of nodes based on the preset node screening rule includes:
the configuration center determines a plurality of target nodes from the plurality of nodes based on the preset node screening rules and node environment variables;
The method further comprises the steps of:
the configuration center generates a gray label of each target node and transmits the gray label to each target node;
Each target node obtains the target version number and the storage address of the update data when the current version number corresponding to the node identifier of the target node is updated to the target version number in the corresponding relation stored in the configuration center, and the method comprises the following steps:
Each target node, upon receiving the gray label, transmits an address acquisition request regarding a storage address of update data having the target version number to the configuration center, and receives the storage address of update data transmitted by the configuration center in response to the address acquisition request.
Optionally, in a specific implementation manner, the data configuration system further includes: a data storage device in communication with the configuration center and the at least one server; the method further comprises the steps of:
The data storage device receives the target version number sent by the data updating device and the updating data of the configuration data of the application program to be subjected to gray level test, and stores the target version number and the updating data; wherein the data updating device is used for determining updating data of configuration data of the application program;
The data storage device issues the storage address of the update data and the target version number to the configuration center;
each target node obtains the update data with the target version number according to the storage address of the update data, and stores the update data in a target storage space of a server where the target node is located, including:
each target node sends a data acquisition request carrying the target version number to the data storage equipment according to the storage address of the updated data;
the data storage equipment receives the data acquisition request, determines update data corresponding to the target version number in the stored data, and issues the update data to the target node;
Each target node receives the update data.
Optionally, in a specific implementation manner, the method further includes:
The configuration center monitors the corresponding relation stored in the k8s, and updates the corresponding relation stored in the configuration center based on the monitored updating information of the corresponding relation when the corresponding relation stored in the k8s is monitored to be updated.
Optionally, in a specific implementation manner, the method further includes:
The configuration center acquires a data list of the update data;
The target node acquires the data list and performs integrity check on the acquired updated data by utilizing the data list;
each target node stores the update data in a target storage space of a server where the target node is located, including:
And when the update data is successfully checked, each target node stores the update data in a target storage space of a server where the target node is located.
In a second aspect of the present application, a method for updating node configuration data in a gray scale test scene is also provided, which is applied to a configuration center in a data configuration system; the system further comprises: a plurality of nodes deployed k8s within at least one server, each server comprising at least one node; the method comprises the following steps:
acquiring a target version number of update data of configuration data of an application program to be subjected to gray level test, a storage address of the update data and a preset node screening rule;
Based on the preset node screening rule, determining a plurality of target nodes in the plurality of nodes, updating the current version number corresponding to the node identifier of the target node into the target version number in the corresponding relation between the node identifier and the version number for each target node, so that each target node obtains the target version number and the storage address of the update data when the current version number corresponding to the node identifier of the target node is updated into the target version number in the corresponding relation stored in the configuration center, obtains the update data with the target version number according to the storage address of the update data, and stores the update data in the target storage space of the server where the target node is located; wherein the correspondence is obtained from the k8s by the configuration center.
Optionally, in a specific implementation manner, the method further includes:
And when the current version number corresponding to the node identification of each target node is updated to the target version number in the corresponding relation between the node identification and the version number, the target version number and the storage address of the update data are issued to the target node, so that each target node receives the target version number and the storage address of the update data.
Optionally, in a specific implementation manner, the determining, based on the preset node screening rule, a plurality of target nodes among the plurality of nodes includes:
Determining a plurality of target nodes in the plurality of nodes based on the preset node screening rules and node environment variables;
The method further comprises the steps of:
Generating a gray label of each target node, and issuing the gray label to each target node, so that when each target node receives the gray label, an address acquisition request about a storage address of update data with the target version number is sent to the configuration center, and the storage address of the update data sent by the configuration center in response to the address acquisition request is received.
Optionally, in a specific implementation manner, the method further includes:
Monitoring the corresponding relation stored in the k8s, and updating the corresponding relation stored in the k8s based on the monitored updating information of the corresponding relation when the corresponding relation is monitored to be updated.
Optionally, in a specific implementation manner, the method further includes:
And acquiring a data list of the updated data, so that the target node acquires the data list, carrying out integrity check on the acquired updated data by utilizing the data list, and storing the updated data in a target storage space of a server where each target node is positioned when the updated data is successfully checked.
In a third aspect of the present application, there is further provided a method for updating node configuration data in a gray scale test scenario, applied to any one of a plurality of target nodes of a plurality of nodes deployed in at least one server by k8s in a data configuration system; each server comprises at least one node; the system further comprises: a configuration center; the method comprises the following steps:
In the corresponding relation between the node identification and the version number stored in the configuration center, when the current version number corresponding to the node identification of the target node is updated to the target version number of the update data of the configuration data of the application program to be subjected to gray level test, acquiring the target version number and the storage address of the update data; wherein the target version number and the storage address of the update data are acquired by the configuration center; the plurality of target nodes are determined in the plurality of nodes by the configuration center based on preset node screening rules; the corresponding relation is obtained from the k8s by the configuration center;
And acquiring the update data with the target version number according to the storage address of the update data, and storing the update data in a target storage space of a server where the update data is located.
Optionally, in a specific implementation manner, the method further includes:
monitoring the corresponding relation stored in the configuration center;
in the correspondence between the node identifier and the version number stored in the configuration center, when the current version number corresponding to the node identifier of the target node is updated to the target version number of the update data of the configuration data of the application program to be subjected to the gray level test, acquiring the target version number and the storage address of the update data includes:
And when the corresponding relation stored in the configuration center is monitored, the current version number corresponding to the node identification of the target node is updated to the target version number, an address acquisition request about the storage address of the update data with the target version number is sent to the configuration center, and the storage address of the update data sent by the configuration center in response to the address acquisition request is received.
Optionally, in a specific implementation manner, when the current version number corresponding to the node identifier of the target node is updated to the target version number of the update data of the configuration data of the application program to be subjected to the gray test in the correspondence between the node identifier and the version number stored in the configuration center, acquiring the target version number and the storage address of the update data includes:
And receiving the issued target version numbers and the storage addresses of the updated data when the configuration center updates the current version number corresponding to each target node to the target version number in the corresponding relation between the node identifier and the version number.
Optionally, in a specific implementation manner, when the current version number corresponding to the node identifier of the target node is updated to the target version number of the update data of the configuration data of the application program to be subjected to the gray test in the correspondence between the node identifier and the version number stored in the configuration center, acquiring the target version number and the storage address of the update data includes:
when a gray label issued by the configuration center is received, an address acquisition request about a storage address of update data with the target version number is sent to the configuration center, and the storage address of the update data sent by the configuration center in response to the address acquisition request is received; the gray label is generated for each target node after the configuration center determines a plurality of target nodes in the plurality of nodes based on the preset node screening rule and the node environment variable.
Optionally, in a specific implementation manner, the obtaining, according to the storage address of the update data, the update data with the target version number includes:
according to the storage address of the update data, a data acquisition request carrying the target version number is sent to the data storage equipment, so that the data storage equipment receives the data acquisition request, determines the update data corresponding to the target version number in the stored data, and sends the update data to the target node;
Each target node receives the update data.
Optionally, in a specific implementation manner, the method further includes:
Acquiring a data list, and carrying out integrity check on the acquired updated data by utilizing the data list;
The storing the update data in the target storage space of the server where the update data is located includes:
And when the update data is successfully checked, each target node stores the update data in a target storage space of a server where the target node is located.
In a fourth aspect of the present application, there is also provided a data configuration system, the system comprising a configuration center and a plurality of nodes where k8s are deployed in at least one server; each server comprises at least one node;
The configuration center is used for acquiring a target version number of update data of configuration data of an application program to be subjected to gray level test, a storage address of the update data and a preset node screening rule; determining a plurality of target nodes in the plurality of nodes based on the preset node screening rule, and updating the current version number corresponding to the node identifier of each target node into the target version number in the corresponding relation between the node identifier and the version number for each target node; wherein the correspondence is obtained from the k8s by the configuration center;
Each target node is configured to obtain, in the corresponding relationship stored in the configuration center, the target version number and a storage address of the update data when the current version number corresponding to the node identifier of the target node is updated to the target version number; and acquiring the update data with the target version number according to the storage address of the update data, and storing the update data in a target storage space of a server where the update data is located.
In a fifth aspect of the present application, an updating device for node configuration data in a gray scale test scene is further provided, which is applied to a configuration center in a data configuration system; the system further comprises: a plurality of nodes deployed k8s within at least one server, each server comprising at least one node; the device comprises:
The first acquisition module is used for acquiring a target version number of update data of configuration data of an application program to be subjected to gray level test, a storage address of the update data and a preset node screening rule;
The first updating module is used for determining a plurality of target nodes in the plurality of nodes based on the preset node screening rule, updating the current version number corresponding to the node identifier of the target node into the target version number in the corresponding relation between the node identifier and the version number for each target node, so that when each target node updates the current version number corresponding to the node identifier of the target node into the target version number in the corresponding relation stored in the configuration center, acquiring the target version number and the storage address of the updating data, acquiring the updating data with the target version number according to the storage address of the updating data, and storing the updating data in the target storage space of a server where the updating data is located; wherein the correspondence is obtained from the k8s by the configuration center.
Optionally, in a specific implementation manner, the apparatus further includes:
And the first issuing module is used for issuing the target version number and the storage address of the update data to each target node when the current version number corresponding to the node identifier of each target node is updated to the target version number in the corresponding relation between the node identifier and the version number, so that each target node receives the target version number and the storage address of the update data.
Optionally, in a specific implementation manner, the first updating module is specifically configured to:
Determining a plurality of target nodes in the plurality of nodes based on the preset node screening rules and node environment variables;
The apparatus further comprises:
and the second issuing module is used for generating a gray label of each target node, issuing the gray label to each target node, sending an address acquisition request about a storage address of update data with the target version number to the configuration center when each target node receives the gray label, and receiving the storage address of the update data sent by the configuration center in response to the address acquisition request.
Optionally, in a specific implementation manner, the apparatus further includes:
and the third updating module is used for monitoring the corresponding relation stored in the k8s and updating the corresponding relation stored in the third updating module based on the monitored updating information of the corresponding relation when the corresponding relation stored in the k8s is monitored.
Optionally, in a specific implementation manner, the apparatus further includes:
and the third acquisition module is used for acquiring a data list of the update data so that the target nodes acquire the data list, carrying out integrity check on the acquired update data by utilizing the data list, and storing the update data in a target storage space of a server where each target node is positioned when the update data check is successful.
In a sixth aspect of the present application, there is further provided an updating apparatus for node configuration data in a gray scale test scenario, which is applied to any one of a plurality of target nodes of a plurality of nodes deployed in at least one server by k8s in a data configuration system; each server comprises at least one node; the system further comprises: a configuration center; the device comprises:
The second obtaining module is used for obtaining the target version number and the storage address of the update data when the current version number corresponding to the node identifier of the target node is updated to the target version number of the update data of the configuration data of the application program to be subjected to gray level test in the corresponding relation between the node identifier and the version number stored in the configuration center; wherein the target version number and the storage address of the update data are acquired by the configuration center; the plurality of target nodes are determined in the plurality of nodes by the configuration center based on preset node screening rules; the corresponding relation is obtained from the k8s by the configuration center;
and the second updating module is used for acquiring the updating data with the target version number according to the storage address of the updating data and storing the updating data in the target storage space of the server where the second updating module is located.
Optionally, in a specific implementation manner, the apparatus further includes:
the monitoring module is used for monitoring the corresponding relation stored in the configuration center;
The second obtaining module is specifically configured to:
And when the corresponding relation stored in the configuration center is monitored, the current version number corresponding to the node identification of the target node is updated to the target version number, an address acquisition request about the storage address of the update data with the target version number is sent to the configuration center, and the storage address of the update data sent by the configuration center in response to the address acquisition request is received.
Optionally, in a specific implementation manner, the second obtaining module is specifically configured to:
And receiving the issued target version numbers and the storage addresses of the updated data when the configuration center updates the current version number corresponding to each target node to the target version number in the corresponding relation between the node identifier and the version number.
Optionally, in a specific implementation manner, the second obtaining module is specifically configured to:
when a gray label issued by the configuration center is received, an address acquisition request about a storage address of update data with the target version number is sent to the configuration center, and the storage address of the update data sent by the configuration center in response to the address acquisition request is received; the gray label is generated for each target node after the configuration center determines a plurality of target nodes in the plurality of nodes based on the preset node screening rule and the node environment variable.
Optionally, in a specific implementation manner, the second updating module is specifically configured to:
according to the storage address of the update data, a data acquisition request carrying the target version number is sent to the data storage equipment, so that the data storage equipment receives the data acquisition request, determines the update data corresponding to the target version number in the stored data, and sends the update data to the target node; each target node receives the update data.
Optionally, in a specific implementation manner, the apparatus further includes:
A fourth acquisition module, configured to acquire a data list, and perform integrity check on the acquired update data by using the data list;
The second updating module is specifically configured to:
And when the update data is successfully checked, each target node stores the update data in a target storage space of a server where the target node is located.
In a seventh aspect of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing any of the method steps of the second or third aspects described above when executing a program stored on a memory.
In a further aspect of the present application, there is also provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements any of the method steps of the second or third aspects described above.
In a further aspect of the application there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method steps of any of the second or third aspects described above.
The embodiment of the application has the beneficial effects that:
In view of the foregoing, an embodiment of the present application provides a method for updating node configuration data in a gray scale test scene, where the method is applied to a data configuration system, and the system may include: the configuration center and k8s are provided with a plurality of nodes deployed in at least one server, and each server is provided with at least one node. The configuration center may first set a target version number of update data of configuration data of an application program to be subjected to gray level test, a storage address of the update data, and a preset node screening rule; then, determining a plurality of target nodes in a plurality of nodes based on a preset node screening rule; then, for each target node, updating the current version number corresponding to the node identifier of the target node into the target version number in the corresponding relation between the node identifier and the version number acquired from k8 s. In this way, each target node can acquire the target version number and the storage address of the update data when the current version number corresponding to the node identifier of the target node is updated to the target version number in the corresponding relation stored in the configuration center; furthermore, according to the storage address of the update data, the update data with the target version number is acquired, and the acquired update data is stored in the target storage space of the server where the update data is located.
In this way, when the gradation test is performed on each application program deployed by k8s, gradation distribution of update data of configuration data of the application program can be performed by means of the above-described data configuration system. Therefore, the configuration data of the application program of each screened target node can be updated without updating the mirror image of the application program, and the operation and maintenance difficulty of k8s is reduced. In addition, when the gray level distribution is performed on different update data of the configuration data of the application program, node screening rules of nodes for performing the gray level distribution can be respectively set, so that the flexibility of the gray level distribution of the update data of the configuration data of the application program can be improved. In addition, by means of the data configuration system, the gray level release of the update data of the configuration data of each version can be performed in parallel, the gray level release efficiency is improved, and further, the gray level test efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flow chart of a method for updating node configuration data in a gray scale test scene according to an embodiment of the present application;
Fig. 2 is a schematic structural diagram of a data configuration system according to an embodiment of the present application;
fig. 3 is a flowchart of another method for updating node configuration data in a gray scale test scenario according to an embodiment of the present application;
Fig. 4 is a schematic diagram of a specific example of a method for updating node configuration data in a gray scale test scenario according to an embodiment of the present application;
Fig. 5 is a schematic diagram of another specific example of a method for updating node configuration data in a gray scale test scenario according to an embodiment of the present application;
fig. 6 is a flowchart of a method for updating node configuration data in still another gray scale test scenario according to an embodiment of the present application;
fig. 7 is a flowchart of a method for updating node configuration data in still another gray scale test scenario according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an updating device for node configuration data in a gray scale test scene according to an embodiment of the present application;
Fig. 9 is a schematic structural diagram of an updating device for node configuration data in another gray scale test scenario according to an embodiment of the present application;
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
In order to perform gray level distribution of update data of configuration data of an application program deployed by k8s, an embodiment of the present application provides a method for updating node configuration data in a gray level test scene, where the method is applied to a data configuration system, and the system includes a configuration center and a plurality of nodes deployed by k8s in at least one server, where each server is deployed with at least one node.
The method is suitable for various application scenes with the gray test requirements of the application programs, for example, when gray test is carried out on a test version of the application programs deployed in the cloud environment by k8s, update data of configuration data is distributed to 10% of nodes in a gray mode; when the gray scale test is performed on the application program deployed in the cloud environment by k8s, the update data a of the configuration data is distributed to 20% of the nodes in gray scale, and the update data B of the configuration data is distributed to 50% of the nodes in gray scale.
Also, the application program in the method may be various kinds of programs, for example, a video program, a game program, and the like; the configuration center in the method can be various configuration centers, for example: apollo configuration centers, etc.; in addition, the configuration center can be located in a cloud server or a local server; when the configuration center is located in the cloud server, the cloud server where the configuration center is located may be the cloud server where k8s is located, or may be other cloud servers.
Based on this, the embodiment of the present application does not specifically limit the application scenario and execution subject of the method.
In order to facilitate understanding of the scheme provided by the embodiment of the present application, a specific description is given below of the node according to the embodiment of the present application.
The node is the smallest unit deployed by k8s for serving an application. Each node may run and process tasks independently. And, multiple pod can be deployed in the same server, which can be a physical machine or a virtual machine.
Alternatively, a node deployed within a server by k8s may be referred to as a pod.
The method for updating the node configuration data in the gray test scene provided by the embodiment of the application can comprise the following steps:
the configuration center acquires a target version number of update data of configuration data of an application program to be subjected to gray level test, a storage address of the update data and a preset node screening rule;
The configuration center determines a plurality of target nodes in the plurality of nodes based on the preset node screening rule, and updates the current version number corresponding to the node identifier of each target node into the target version number in the corresponding relation between the node identifier and the version number for each target node; wherein the correspondence is obtained from the k8s by the configuration center;
each target node obtains the target version number and the storage address of the update data when the current version number corresponding to the node identification of the target node is updated to the target version number in the corresponding relation stored in the configuration center;
And each target node acquires the update data with the target version number according to the storage address of the update data, and stores the update data in a target storage space of a server where the target node is located.
In view of the foregoing, an embodiment of the present application provides a method for updating node configuration data in a gray scale test scene, where the method is applied to a data configuration system, and the system may include: the configuration center and k8s are provided with a plurality of nodes deployed in at least one server, and each server is provided with at least one node. The configuration center may first set a target version number of update data of configuration data of an application program to be subjected to gray level test, a storage address of the update data, and a preset node screening rule; then, determining a plurality of target nodes in a plurality of nodes based on a preset node screening rule; then, for each target node, updating the current version number corresponding to the node identifier of the target node into the target version number in the corresponding relation between the node identifier and the version number acquired from k8 s. In this way, each target node can acquire the target version number and the storage address of the update data when the current version number corresponding to the node identifier of the target node is updated to the target version number in the corresponding relation stored in the configuration center; furthermore, according to the storage address of the update data, the update data with the target version number is acquired, and the acquired update data is stored in the target storage space of the server where the update data is located.
In this way, when the gradation test is performed on each application program deployed by k8s, gradation distribution of update data of configuration data of the application program can be performed by means of the above-described data configuration system. Therefore, the configuration data of the application program of each screened target node can be updated without updating the mirror image of the application program, and the operation and maintenance difficulty of k8s is reduced. In addition, when the gray level distribution is performed on different update data of the configuration data of the application program, node screening rules of nodes for performing the gray level distribution can be respectively set, so that the flexibility of the gray level distribution of the update data of the configuration data of the application program can be improved. In addition, by means of the data configuration system, the gray level release of the update data of the configuration data of each version can be performed in parallel, the gray level release efficiency is improved, and further, the gray level test efficiency is improved.
The following describes a method for updating node configuration data in a gray scale test scene according to an embodiment of the present application with reference to the accompanying drawings.
Fig. 1 is a flow chart of a method for updating node configuration data in a gray scale test scenario according to an embodiment of the present application, where the method is applied to a data configuration system as shown in fig. 2, and the system may include a plurality of nodes 200 deployed in at least one server by a configuration center 100 and k8s, where each server is deployed with at least one node 200.
A configuration center 100, configured to obtain a target version number of update data of configuration data of an application program to be subjected to gray level test, a storage address of the update data, and a preset node screening rule; determining a plurality of target nodes 200 in the plurality of nodes 200 based on the preset node screening rule, and updating the current version number corresponding to the node identifier of each target node 200 into the target version number in the corresponding relation between the node identifier and the version number for each target node 200; wherein the correspondence is obtained from the k8s by the configuration center 100;
Each target node 200 is configured to obtain, in the correspondence stored in the configuration center 100, a target version number and a storage address of the update data when a current version number corresponding to a node identifier of the target node 200 is updated to the target version number; and acquiring the update data with the target version number according to the storage address of the update data, and storing the update data in a target storage space of a server where the update data is located.
As shown in fig. 1, the method may include the following steps S101-S104:
S101: the configuration center 100 acquires a target version number of update data of configuration data of an application program to be subjected to gray level test, a storage address of the update data, and a preset node screening rule;
In order to facilitate gray distribution of update data of configuration data of an application to be gray tested operated in a cloud environment by k8s deployment, a configuration center 100 for gray distribution of update data may be constructed.
It is reasonable that the configuration center 100 may be apollo configuration centers or other configuration centers, which are not specifically limited in the embodiment of the present application.
Update data of configuration data of an application, that is, new data generated due to version update of the configuration data of the application. Accordingly, when the configuration data of the application program is updated, the version of the application program is updated. For example, when it is desired to newly add service a to the application, update data about service a may be added to the configuration data of the application, and since the application adds service a, the version of the application to which service a is added is different from the previous version of the application, that is, the version of the application to which service a is added is an updated version of the application.
That is, the update of the version number of the application program corresponds to the update of the configuration data of the application program, and further, the target version number of the updated version of the application program can be regarded as the target version number of the update data of the configuration data of the application program.
In some cases, it is desirable to perform gray level testing on a partial version of an application program, for example, in the case where an internal test is performed on a version of the application program to which a new service is added, or a gray level test is performed on a version of the application program to which a specific service for a specific area is added, for example, in the case where the gray level test is performed on a specific area-oriented version of the application program, it is desirable to issue only update data of configuration data of the application program to some nodes, not to all nodes, in which case it is unnecessary to update a mirror image of the application program, but update data of the configuration data of the application program is stored separately from configuration data corresponding to the mirror image of the application program, and the update data is issued to some nodes. In this way, the configuration data of a part of the nodes can be updated, that is, the gray scale test is performed by the part of the nodes.
Based on this, when it is desired to perform gradation release on the update data of the configuration data of the application program to be subjected to gradation test, the target version number of the update data of the configuration data of the application program may be first determined, and thereafter, the update data of the configuration data of the application program may be stored in a data storage device that is preset for data storage, and the storage address of the update data may be acquired.
In this way, the update data of the configuration data of the application program and the configuration data of the application program are stored in an isolated manner, so that the purpose of gray scale test of the application program can be realized without modifying the mirror image of the application service.
For each application program, the procedure of gray-scale publishing the updated version of the configuration data of the application program is a procedure of pushing the updated data of the configuration data to a part of nodes in a plurality of nodes deployed in at least one server by k8s with respect to the application program, and is also a procedure of updating the configuration data of a part of the nodes.
Also, since the respective nodes 200 of the application are deployed by k8s in at least one server, and at least one node 200 is deployed in each server. Thus, each node 200 is managed by k8 s.
For each node 200, k8s may manage the node identifier of the node 200 and the version number of the configuration data of the node, that is, k8s may record the version number corresponding to each node identifier, and generate the correspondence between the node identifier of each node 200 and the version number.
Illustratively, for video programs, k8s may house multiple nodes within multiple servers. For each node, k8s may set a node identifier for the node, and increase a correspondence between the node identifier of the node and a version number of configuration data of an application program of the node in a correspondence between the node identifier and the version number; the version number of the configuration data of the application program corresponding to the node is the version number of the configuration data operated by the node.
Accordingly, in order to perform gray distribution on the update data of the configuration data of the application program, the configuration center 100 may obtain the correspondence between the node identifier and the version number from k8s, and store the correspondence when the correspondence is obtained.
Optionally, in a specific implementation manner, the method for updating node configuration data in a gray scale test scene provided by the embodiment of the present application may include the following step 11:
step 11: the configuration center monitors the corresponding relation stored in the k8s, and updates the corresponding relation stored in the configuration center based on the monitored updating information of the corresponding relation when the corresponding relation stored in the k8s is monitored to be updated.
In this embodiment, for each application, the respective node 200 or the version number corresponding to the respective node 200 of the application may be updated, and accordingly, the correspondence between the node identifier and the version number stored in k8s may also be updated along with the update of the respective node 200 or the version number corresponding to the respective node 200.
Therefore, in order to timely understand the update condition of the corresponding relationship between the node identifier and the version number stored in k8s and timely update the corresponding relationship between the node identifier and the version number stored in the configuration center 100, the corresponding relationship stored in k8s may be monitored.
In this way, when the correspondence update stored in k8s is monitored, the configuration center 100 can update the correspondence stored in itself based on the monitored update information of the correspondence.
That is, the configuration center 100 may timely update the corresponding relationship stored in itself by monitoring the corresponding relationship stored in k8s based on the monitored update condition of the corresponding relationship, so as to avoid a release error caused by a node identification error and/or a version number error corresponding to the node in the corresponding relationship stored in itself when gray release is performed on the update data of the configuration data of the application program.
In addition, in order to perform gray distribution on the update data of the configuration data of the application program, a preset node filtering rule for filtering the node 200 performing gray distribution may be set.
The preset node screening rule may be set according to actual needs, and may be a proportion of the screened node in a plurality of nodes, for example: screening 10% of the plurality of nodes, screening 20% of the plurality of nodes, and the like; but also a specific number of nodes screened, for example: screening 1000 nodes and the like; also node identification ranges for the screened nodes, such as: the node identifiers of the plurality of nodes are positioned in the range of A1-A10000, and the nodes with the node identifiers positioned in the range of A200-A1000 can be screened; this is reasonable, and is not particularly limited in the embodiments of the present application.
In addition, the preset node screening rule may be a node screening rule for performing node screening on an application program to be subjected to gray level test, that is, the preset node screening rule may be adopted when gray level release is performed on update data of configuration data of each update version of the application program; it is also possible to take the preset node screening rule for the update data with the target version number of the application program to be subjected to the gray level test, that is, only when the update data with the configuration data with the target version number of the application program is subjected to gray level distribution, which is reasonable, and the embodiment of the application is not limited specifically.
Alternatively, the configuration center 100 may determine, from among the preset node screening rules stored in itself, a preset node screening rule for performing gray release on update data of configuration data of an application program to be subjected to gray test, and screen the target node 200 among the plurality of nodes 200 according to the preset node screening rule.
Alternatively, the staff may send a gray level issue instruction carrying a preset node screening rule to the configuration center 100 according to an actual requirement, so that the configuration center 100 may receive and store the preset node screening rule, and screen the target node 200 from the plurality of nodes 200 according to the preset node screening rule.
That is, when it is desired to perform gray distribution on the update data of the configuration data of the application program to be subjected to the gray test, the configuration center 100 may first obtain the target version number of the update data of the configuration data, the storage address of the update data, and the preset node screening rule, and further perform gray distribution on the update data of the configuration data of the application program based on the target version number, the storage address of the update data, and the preset node screening rule.
S102: the configuration center 100 determines a plurality of target nodes 200 among the plurality of nodes 200 based on a preset node screening rule, and updates a current version number corresponding to a node identifier of each target node 200 into a target version number in a corresponding relation between the node identifier and the version number for each target node 200;
Wherein, the corresponding relation is obtained from k8s by the configuration center 100;
As described above, the configuration center 100 may obtain the correspondence between the node identifier and the version number from k8s, and further, after obtaining the preset node screening rule, the configuration center 100 may determine a plurality of target nodes 200 from the plurality of nodes 200 related to the application program based on the preset node screening rule and the correspondence.
Optionally, when node screening is performed based on the preset node screening rule, each node with a current version number being a version number corresponding to the configuration data of the application deployed in k8s may be used as a node to be screened, and a plurality of target nodes are determined in the node to be screened; for example, each node with the version number of the current configuration data being the version number a11 corresponding to the configuration data deployed in k8s by the application program may be used as a node to be screened, so that the target node is screened in each node to be screened, and each node with the version number a10 of the current configuration data may not be used as a node to be screened.
Further, after determining a plurality of target nodes 200, the configuration center 100 may update the current version number corresponding to the node identifier of the target node 200 to the target version number in the correspondence between the node identifier and the version number described by itself for each target node 200.
S103: each target node 200 obtains a target version number and a storage address of update data when a current version number corresponding to a node identifier of the target node is updated to the target version number in a corresponding relation stored in the configuration center 100;
Each target node 200 may obtain the target version number and the storage address of the update data when the current version number corresponding to the node identifier of the target node is updated to the target version number in the correspondence stored in the configuration center 100.
Optionally, to facilitate gray level distribution of update data of configuration data of an application program, SIDECAR AGENT (side car agent component) may be set in each node, and further, the update management may be performed on the configuration data of the node by using the SIDECAR AGENT. Therefore, SIDECAR AGENT of each target node 200 may obtain the target version number and the storage address of the update data when the current version number corresponding to the node identifier of the target node is updated to the target version number in the correspondence stored in the configuration center 100.
Wherein SIDECAR AGENT is one of the cloud design modes in the distributed architecture, because it is very similar to a motor tricycle in life; the design mode expands the existing functions of the node by adding a side car to the application program. The new mode is realized by deploying containers, each container is isolated from each other, each container has a file system, processes among the containers cannot affect each other, and computing resources can be distinguished. Compared with a virtual machine, the container can be rapidly deployed, and can migrate among different cloud and different version operating systems due to decoupling of the container from underlying facilities and machine file systems. In the application, through internally arranging SIDECAR AGENT in the node, the update management of the update data is abstracted to the side car container, so that the update management of the update data is decoupled from the service function, and the low-delay data reading capability is ensured. For each node 200, after SIDECAR AGENT is set in the node 200, the SIDECAR AGENT may update and manage configuration data of the node.
Optionally, in a specific implementation manner, the method for updating node configuration data in a gray scale test scene provided by the embodiment of the present application may further include the following step 21:
step 21: each node 200 listens for the correspondence stored in the configuration center 100;
correspondingly, the step S103 may include the following step 22:
Step 22: each target node 200 transmits an address acquisition request regarding a storage address of update data having a target version number to the configuration center 100 when it is monitored that the current version number corresponding to the node identification of the target node 200 is updated to the target version number in the correspondence stored in the configuration center 100, and receives the storage address of update data transmitted by the configuration center 100 in response to the address acquisition request.
In this specific implementation, each node 200 may monitor the correspondence stored in the configuration center 100.
In this way, when the configuration center 100 updates the current version number corresponding to each target node 200 to the target version number in the correspondence between the node identifier and the version number, each target node 200 may monitor that the current version number corresponding to the node identifier of the target node 200 is updated to the target version number in the correspondence.
Further, each target node 200 may send an address acquisition request to the configuration center 100 regarding a storage address of update data having a target version number when it monitors the correspondence stored in the configuration center 100 that the current version number corresponding to the node identification of the target node is updated to the target version number. Upon receiving the address acquisition request, the configuration center 100 may issue a storage address of the update data to the target node 200 in response to the address acquisition request.
In this way, the target node 200 can receive the storage address of the update data transmitted from the configuration center 100.
Since the storage address of the update data is requested by the target node from the configuration center, and the target version number is obtained by the target node 200 by monitoring, the process of the target node 200 requesting the storage address of the update data from the configuration center 100 may be referred to as pulling the storage address of the update data from the configuration center 100.
Accordingly, optionally, SIDECAR AGENT may be provided in each node in order to facilitate gray scale distribution of the update data. The SIDECAR AGENT of each node 200 may monitor the corresponding relationship stored in the configuration center 100, and in addition, SIDECAR AGENT may pull the target version number and the storage address of the update data from the configuration center 100 when the current version number corresponding to the node identifier of the target node 200 is updated to the target version number in the corresponding relationship stored in the configuration center 100.
Optionally, in a specific implementation manner, the method for updating node configuration data in a gray scale test scene provided by the embodiment of the present application may further include the following step 31:
Step 31: when updating the current version number corresponding to the node identifier of each target node to the target version number in the corresponding relation between the node identifier and the version number, the configuration center 100 issues the target version number and the storage address of the update data to the target node;
Correspondingly, the step S103 may include the following step 32:
Step 32: each target node 200 receives the target version number issued by the configuration center 100 and the storage address of the update data.
In this embodiment, for each target node 200, when the configuration center 100 updates the current version number corresponding to the node identifier of the target node 200 to the target version number in the corresponding relationship between the node identifier and the version number, the configuration center may issue the target version number and the storage address of the update data to the target node 200.
In this way, each target node 200 can receive the target version number and the storage address of the update data issued by the configuration center 100.
Accordingly, optionally, to facilitate gray scale distribution of the update data, SIDECAR AGENT may be provided in each node 200. For each target node 200, when the configuration center 100 updates the current version number corresponding to the node identifier of the target node 200 to the target version number in the corresponding relation between the node identifier and the version number, the configuration center may issue the target version number and the storage address of the update data to SIDECAR AGENT of the target node 200; further, SIDECAR AGENT may receive the target version number and the storage address of the update data issued by the configuration center 100.
S104: each target node 200 obtains the update data with the target version number according to the storage address of the update data, and stores the update data in the target storage space of the server where the target node itself is located.
When the storage address of the target version number and the update data is acquired for each target node 200, the target node 200 may acquire the update data having the target version number according to the storage address.
Optionally, for each target node 200, when acquiring the storage address of the target version number and the update data, the target node 200 may access the storage address, acquire a storage file named by the target version number from the storage address, and acquire the update data stored in the storage file.
Further, after the update data is acquired for each target node 200, the update data may be stored in a target storage space of the server where the target node is located, and further, the data service may be provided for the application program by using the update data of the configuration data of the target version number.
Accordingly, optionally, when SIDECAR AGENT is set in each node 200, SIDECAR AGENT of each target node 200 may obtain, according to the storage address of the update data, the update data with the target version number, and store the update data in the target storage space of the server where the update data is located.
Alternatively, for each target node 200, after the update data is stored in the target storage space of the server where the target node itself is located, the server may be restarted, and after the server is restarted, the data service may be provided for the application program by using the update data of the configuration data.
Accordingly, optionally, when SIDECAR AGENT is provided in each node 200, for each target node 200, after the update data is stored in the target storage space of the server where the target node 200 is located, the server may be restarted by SIDECAR AGENT of the target node 200. After the server is restarted, the target node may provide data services for the application using the updated data of the configuration data.
Furthermore, different update data of configuration data of the application may correspond to different update versions for the same application, and thus, different update data may correspond to different target version numbers. For different update data of the application program, the update method of node configuration data in the gray test scene provided by the embodiment of the application can be executed in parallel, that is, the configuration center 100 can screen a plurality of target nodes 200 of the update data for each target version number of the application program respectively, and issue corresponding target version numbers and download addresses of the update data to the screened plurality of target nodes 200, so that the screened plurality of target nodes update their configuration data based on the target version numbers and the download addresses of the update data.
As described above, when each application program deployed by k8s is subjected to gradation test, gradation distribution of update data of configuration data of the application program can be performed by means of the above-described data configuration system. Therefore, the configuration data of the application program of each screened target node can be updated without updating the mirror image of the application program, and the operation and maintenance difficulty of k8s is reduced. In addition, when the gray level distribution is performed on different update data of the configuration data of the application program, node screening rules of nodes for performing the gray level distribution can be respectively set, so that the flexibility of the gray level distribution of the update data of the configuration data of the application program can be improved. In addition, by means of the data configuration system, the gray level release of the update data of the configuration data of each version can be performed in parallel, the gray level release efficiency is improved, and further, the gray level test efficiency is improved.
Optionally, in a specific implementation manner, a data configuration system provided by the embodiment of the present application may further include: a data storage device in communication with the configuration center 100 and at least one server; correspondingly, as shown in fig. 3, the method for updating node configuration data in a gray scale test scene provided by the embodiment of the present application may further include the following steps S1001 to S1002:
s1001: the data storage device receives the target version number sent by the data updating device and the updating data of the configuration data of the application program to be subjected to gray level test, and stores the target version number and the updating data;
The data updating device is used for determining updating data of configuration data of the application program;
S1002: the data storage device issues a storage address and a target version number of the update data to the configuration center 100;
Correspondingly, in the step S104, each target node 200 obtains the update data with the target version number according to the storage address of the update data, and stores the update data in the target storage space of the server where the target node itself is located, which may include the following steps S1041-S1043:
s1041: each target node 200 sends a data acquisition request carrying a target version number to the data storage device according to the storage address of the updated data;
S1042: the data storage device receives the data acquisition request, determines update data corresponding to the target version number from the stored data, and issues the update data to the target node 200;
s1043: each target node 200 receives the update data.
In this specific implementation manner, when it is desired to perform gray release on the update data of the configuration data of the application program to be subjected to gray test, a worker may first determine, through the data update device, the update data of the configuration data of the application program to be subjected to gray test and the target version number of the update data.
Alternatively, the worker may input the update data of the configuration data of the application program to be subjected to the gradation test and the target version number of the update data into the data update device, so that the data update device may receive the update data of the configuration data of the application program and the target version number and store the update data of the configuration data of the application program and the target version number.
Alternatively, the worker may access a database of configuration data about the application program to be subjected to the gradation test through the data updating apparatus, and read the update data of the configuration data of the application program and the target version number of the update data from the database, so that the data updating apparatus may acquire the update data and the target version number of the configuration data of the application program, and store the update data and the target version number of the configuration data of the application program.
Then, the data updating device may send the target version number and the update data of the configuration data of the application program to be subjected to the gray test to the data storage device, so that the data storage device may receive the target version number sent by the data updating device and the update data of the configuration data of the application program to be subjected to the gray test, store the target version number and the update data, and send the storage address of the update data and the target version number to the configuration center 100;
Optionally, after acquiring the update data of the configuration data of the application program to be subjected to the gray scale test and the target version number of the update data of the configuration data of the application program, the data storage device may store the update data of the configuration data of the application program to be subjected to the gray scale test, and set the file name of the storage file storing the update data of the configuration data of the application program to be subjected to the gray scale test as the target version number, so that the update data of the configuration data may be acquired by searching the target version number.
Optionally, after acquiring the update data of the configuration data of the application program to be subjected to the gray test and the target version number of the update data of the configuration data of the application program to be subjected to the gray test, the data storage device may store the update data of the configuration data of the application program to be subjected to the gray test, and establish a correspondence between a file name of a storage file storing the update data of the configuration data of the application program to be subjected to the gray test and the target version number, so that the update data of the configuration data can be acquired through the correspondence and the target version number.
The data storage device may then send the storage address of the update data and the target version number to the configuration center 100.
In this way, the configuration center 100 may receive the target version number and the storage address of the update data, determine the preset node screening rule corresponding to the target version number after obtaining the target version number and the storage address of the update data, and further perform gray-scale distribution on the update data by using the preset node screening rule, the target version number and the storage address of the update data.
For each target node 200, the target node 200 may send a data acquisition request carrying a target version number to the data storage device according to the storage address of the update data. The data storage device may receive the data acquisition request, determine update data corresponding to the target version number from among the stored data, and issue the update data to the target nodes 200, so that each of the target nodes 200 may receive the update data.
In some cases, the target node 200 may not be able to obtain the update data completely due to network transmission errors, and in this case, the target node 200 may not be able to update its own configuration data with the update data.
Based on this, in an optional implementation manner, the method for updating node configuration data in a gray scale test scene provided by the embodiment of the present application may further include the following steps 41 to 42:
step 41: the configuration center 100 acquires a data list of update data;
Step 42: the target node 200 acquires a data list, and performs integrity check on the acquired update data by using the data list;
Accordingly, the step S104 of storing the update data in the target storage space of the server where the update data is located may include the following step 43:
step 43: when the update data check is successful, each target node stores the update data in a target storage space of the server where the target node is located.
In this embodiment, the configuration center 100 may obtain the data list of the update data when obtaining the target version number of the update data, the storage address of the update data, and the preset node screening rule.
The data list of the update data is used for representing the data amount of the update data, for example, the data size of the update data, the data directory of the update data, and the like.
Alternatively, the above data list may be an MD5 value, or other data, which is reasonable, and is not specifically limited in the embodiment of the present application.
Accordingly, each target node 200 may further obtain a data list of the update data when obtaining the target version number and the storage address of the update data when updating the current version number corresponding to the node identifier of the target node 200 to the target version number in the correspondence stored in the configuration center 100.
Optionally, for each target node 200, the target node 200 may pull the data list of the updated data from the configuration center 100 when the current version number corresponding to the node identifier of the target node 200 is updated to the target version number in the correspondence stored in the configuration center 100.
Optionally, for each target node 200, when updating the current version number corresponding to the node identifier of the target node 200 to the target version number in the corresponding relationship between the node identifier and the version number, the configuration center 100 may issue a data list of the updated data to the target node 200; further, each target node 200 may receive a data list of the update data issued by the configuration center 100.
Further, for each target node 200, after the target node 200 acquires the update data, the integrity check of the acquired update data may be performed using the data list.
Further, if the acquired update data is successfully checked, the target node 200 may store the update data in the target storage space of the server where itself is located.
Specifically, for each target node 200, after the target node 200 acquires the update data, the data amount of the update data recorded in the data list may be compared with the data amount of the acquired update data to determine whether the update data acquired by itself is complete.
Further, if the data amount of the update data recorded in the data list is the same as the data amount of the acquired update data, the acquired update data is complete, and the verification is successful. The target node 200 may store the update data in a target storage space of its own server.
Optionally, if the data amount of the update data recorded in the data list is different from the data amount of the acquired update data, the acquired update data is incomplete, and verification fails. The target node 200 may output a notification message for characterizing the failure of verification of the update data, so that corresponding staff can take corresponding measures to trace the failure cause; the target node 200 may empty the acquired update data.
Therefore, by carrying out integrity check on the acquired update data, operation errors caused by updating the configuration data of the user by utilizing incomplete update data can be avoided, and the use experience of the user is prevented from being influenced.
In some cases, when the configuration center 100 screens the plurality of target nodes 200 among the plurality of nodes 200, the node environment variables of the respective nodes 200 set when the k8s performs the node configuration may also be considered.
The environment variable of each node 200 is a variable set for node distinction when the node is deployed by k8s, for example, a server for deploying the node, a node cluster to which the node belongs, a node identification range to which the node belongs, a special mark of the node, and the like.
Optionally, in a specific implementation manner, in step S102, the determining, by the configuration center, a plurality of target nodes among a plurality of nodes based on a preset node screening rule may include the following step 51:
Step 51: the configuration center 100 determines a plurality of target nodes 200 among the plurality of nodes 200 based on preset node screening rules and node environment variables;
correspondingly, the method for updating the node configuration data in the gray test scene provided by the embodiment of the application further comprises the following step 52:
step 52: the configuration center 100 generates a gray label of each target node 200 and issues the gray label to each target node 200;
Furthermore, in the step S103, when the current version number corresponding to the node identifier of the target node is updated to the target version number in the correspondence stored in the configuration center, the step of obtaining the target version number and the storage address of the update data may include the following step 53:
Step 53: each target node 200, upon receiving the gray label, transmits an address acquisition request regarding the storage address of the update data having the target version number to the configuration center 100, and receives the storage address of the update data transmitted by the configuration center 100 in response to the address acquisition request.
In this embodiment, since the configuration center 100 may communicate with k8s, the configuration center 100 may obtain the node environment variables set by the k8s when configuring each node.
Further, in gray distribution of the update data, the configuration center 100 may determine a plurality of target nodes 200 among the plurality of nodes 200 deployed in k8s based on a preset node screening rule and a node environment variable.
Illustratively, the configuration center 100 may determine a plurality of target nodes 200 among the plurality of nodes 200 deployed in k8s based on a preset node screening rule and a cluster to which the nodes belong.
Further, after determining a plurality of target nodes 200, for each target node 200, the configuration center 100 may generate a gray label for that target node 200 and issue the gray label to each target node 200.
Thus, each target node 200, upon receiving the gray label issued by the configuration center 100, may transmit an address acquisition request regarding the storage address of the update data having the target version number to the configuration center 100, and receive the storage address of the update data transmitted by the configuration center 100 in response to the address acquisition request, that is, pull the target version number and the storage address of the update data from the configuration center 100.
In this way, the target node 200 is screened according to the preset node screening rule and the node environment variable, and the screened target node 200 is the node 200 meeting the preset node screening rule and the node environment variable, so that the success rate of gray level release of the update data can be improved.
In general, gray level distribution of an updated version of an application program is performed to a node 200 only when the node 200 survives. Based on this, for each node 200 in the recorded correspondence between the node identifier and the version number, before the target node 200 is screened, the configuration center 100 may determine the survival state of each node 200, and then, when each node 200 survives, use the node 200 as the node to be screened.
The configuration center 100 may determine the survival status of the respective nodes 200 in a variety of ways, for example, the configuration center 100 determines the survival status of each node 200 through a heartbeat mechanism.
The heartbeat mechanism is a mechanism for ensuring the validity of a connection by sending a heartbeat message, and can be generally used by either one of two devices communicating to notify the other party whether itself survives or to detect whether the other party survives.
Optionally, in a specific implementation manner, the method for updating node configuration data in a gray scale test scene provided by the embodiment of the present application may further include the following steps 61 to 63:
step 61: the configuration center 100 transmits a preset heartbeat transmission interval to each node 200;
Step 62: each node 200 receives a preset heartbeat transmission interval and transmits a heartbeat message to the configuration center 100 according to the preset heartbeat transmission interval;
step 63: for each node 200, the configuration center 100 receives the heartbeat message, and if the heartbeat message sent by the node 200 is not received within the preset heartbeat sending interval, the survival state of the node 200 is updated to be a non-survival state.
In this specific implementation, the configuration center 100 may transmit a preset heartbeat transmission interval to each node 200. The preset heartbeat sending interval can be set according to actual needs, can be 5 seconds or 1 minute, which is reasonable, and the embodiment of the application is not limited in detail.
In this way, each node 200 may receive the preset heartbeat transmission interval, and transmit a heartbeat message to the configuration center 100 according to the preset heartbeat transmission interval.
The heartbeat message can be set according to actual needs, can be an online message or a subscription update message, which is reasonable, and the embodiment of the application is not particularly limited.
The heartbeat transmission interval is 5 seconds, and the heartbeat message is a subscription update message. Each node 200 may send a subscription update message to the configuration center 100 every 5 seconds, and the configuration center 100 receives the subscription update message sent by the node 200, and determines that the node 200 survives.
For each node 200, if the configuration center 100 does not receive the heartbeat message sent by the node 200 within the preset heartbeat sending interval, the survival state of the node 200 may be updated to be a non-survival state.
In this way, the configuration center 100 may determine the survival state of each node by receiving the heartbeat message sent by each node 200 within the preset heartbeat sending interval, and further, when the survival state of a certain node 200 changes, may update the survival state of the node 200 in time. Thus, the determination of the non-surviving node 200 as the target node 200 for gray scale distribution of the update data is avoided.
Accordingly, optionally, when SIDECAR AGENT is set in each node, when the configuration center 100 communicates with SIDECAR AGENT of each node, survival check may also be performed on SIDECAR AGENT of each node 200 according to the above method to determine whether SIDECAR AGENT of each node 200 is communicable, so as to avoid screening SIDECAR AGENT non-communicable nodes 200 as target nodes 200, and further avoid influence of SIDECAR AGENT non-communicable on gray scale distribution of update data.
Optionally, for each node 200, if the node 200 is destroyed, the node 200 may send a notification message for characterizing the destruction of the node to the configuration center 100, so that the configuration center 100 clears the corresponding relationship of the node 200 in the corresponding relationship between the node identifier and the version number stored in the configuration center 100.
In order to facilitate understanding of the interaction process between the configuration center and each node in the method for updating node configuration data in the gray scale test scene, a specific implementation process of the method for updating node configuration data in the gray scale test scene provided by the embodiment of the application is illustrated with reference to fig. 4 and 5.
For each application operating in a cloud environment, the full flow of updating configuration data of a portion of nodes of the application is shown in fig. 4.
The configuration center monitors k8s, and periodically updates the corresponding relation between the node identification stored by the configuration center and the current version number by monitoring the corresponding relation between the node identification and the current version number.
And, for each node (pod) of the k8s deployed application, the configuration center performs a periodic survival check on each pod to check pod survival and to check Agent survival for each pod. And when the pod is destroyed, informing the configuration center so as to remove the corresponding relation of the pod from the corresponding relation of the node identification and the version number stored by the configuration center.
When gray level test is performed on the updated version of the application program, the configuration center can acquire the target version number of the updated data of the configuration data of the application program, the storage address of the updated data and the preset node screening rule.
Then, a plurality of target nodes are determined among the surviving individual nodes based on a preset node screening rule. The configuration center determines a plurality of target nodes in a plurality of nodes based on a preset node screening rule, and updates the current version number corresponding to each target node into a target version number in the corresponding relation between the node identifier and the version number for each target node.
Thus, for each target pod, SIDECAR AGENT of the pod can pull the target version number from the configuration center and pull the storage address of the update data when it is monitored that the current version number in the correspondence stored by the configuration center is updated to the target version number. Furthermore, SIDECAR AGENT of the pod obtains the update data with the target version number according to the storage address, checks the md5 value, and updates the configuration data of the target pod in the server when the check is successful.
As shown in fig. 5, for each application, when it is desired to release the gradation of the update data of a certain version of the configuration data of the application, a worker can write the update data together with the target version number of the update data in the data update device. In this way, the data update device may determine the target version number of the update data and send the update data and the target version number package of the update data to the data storage device. The data updating device may then issue the target version number and node screening rules for the target version number to a configuration center.
In this way, the data storage device may receive the above-described update data and the target version number of the update data and store the update data and the target version number of the update data. Next, a storage address of the update data is determined, and the storage address is issued to the configuration center.
The configuration center may receive the node screening rule and the storage address, determine a plurality of target pods from the plurality of pods according to the node screening rule, and for each target pod, update a current version number corresponding to a node identifier of the target pod to a target version number in a corresponding relationship between the node identifier and the version number.
In this way, for each target pod, SIDECAR AGENT of the pod can acquire the target version number and the storage address of the update data of the target version number from the configuration center when the current version number corresponding to the node identifier of the target pod is updated to the target version number in the correspondence stored in the configuration center. Furthermore, SIDECAR AGENT of the pod obtains the update data with the target version number from the data storage device according to the storage address, and stores the update data in the target storage space of the server where the update data is located.
Based on the same inventive concept, the embodiment of the application also provides a method for updating node configuration data in a gray test scene, which is applied to a configuration center of a data configuration system; the system further comprises: a plurality of nodes deployed k8s within at least one server, each server comprising at least one node; as shown in fig. 6, the method may include the following steps S601-S602:
S601: acquiring a target version number of update data of configuration data of an application program to be subjected to gray level test, a storage address of the update data and a preset node screening rule;
S602: based on a preset node screening rule, determining a plurality of target nodes in a plurality of nodes, updating the current version number corresponding to the node identifier of each target node into a target version number in the corresponding relation between the node identifier and the version number of each target node, so that when the current version number corresponding to the node identifier of each target node is updated into the target version number in the corresponding relation stored in a configuration center, acquiring the target version number and the storage address of update data, acquiring the update data with the target version number according to the storage address of the update data, and storing the update data in the target storage space of a server where the update data is located;
Wherein the correspondence is obtained from k8s by the configuration center.
As described above, when each application program deployed by k8s is subjected to gradation test, gradation distribution of update data of configuration data of the application program can be performed by means of the above-described data configuration system. Therefore, the configuration data of the application program of each screened target node can be updated without updating the mirror image of the application program, and the operation and maintenance difficulty of k8s is reduced. In addition, when the gray level distribution is performed on different update data of the configuration data of the application program, node screening rules of nodes for performing the gray level distribution can be respectively set, so that the flexibility of the gray level distribution of the update data of the configuration data of the application program can be improved. In addition, by means of the data configuration system, the gray level release of the update data of the configuration data of each version can be performed in parallel, the gray level release efficiency is improved, and further, the gray level test efficiency is improved.
Optionally, in a specific implementation manner, the method further includes:
And when the current version number corresponding to the node identification of each target node is updated to the target version number in the corresponding relation between the node identification and the version number, the target version number and the storage address of the update data are issued to the target node, so that each target node receives the target version number and the storage address of the update data.
Optionally, in a specific implementation manner, the determining, based on the preset node screening rule, a plurality of target nodes among the plurality of nodes includes:
Determining a plurality of target nodes in the plurality of nodes based on the preset node screening rules and node environment variables;
The method further comprises the steps of:
Generating a gray label of each target node, and issuing the gray label to each target node, so that when each target node receives the gray label, an address acquisition request about a storage address of update data with the target version number is sent to the configuration center, and the storage address of the update data sent by the configuration center in response to the address acquisition request is received.
Optionally, in a specific implementation manner, the method further includes:
Monitoring the corresponding relation stored in the k8s, and updating the corresponding relation stored in the k8s based on the monitored updating information of the corresponding relation when the corresponding relation is monitored to be updated.
Optionally, in a specific implementation manner, the method further includes:
And acquiring a data list of the updated data, so that the target node acquires the data list, carrying out integrity check on the acquired updated data by utilizing the data list, and storing the updated data in a target storage space of a server where each target node is positioned when the updated data is successfully checked.
The specific implementation manner of the method is the same as the specific implementation manner of the node configuration data updating method applied to the gray test scene of the data configuration system provided by the embodiment of the present application, and is not repeated here.
Based on the same inventive concept, the embodiment of the application also provides a method for updating node configuration data in a gray scale test scene, which is applied to a plurality of target nodes in a plurality of nodes deployed in k8s of a data configuration system; the system further comprises: a configuration center; as shown in fig. 7, the method may include the following steps S701-S702:
S701: in the corresponding relation between the node identification and the version number stored in the configuration center, when the current version number corresponding to the node identification of the target node is updated to the target version number of the update data of the configuration data of the application program to be subjected to gray level test, the target version number and the storage address of the update data are obtained;
The storage addresses of the target version number and the update data are acquired by a configuration center; the plurality of target nodes are determined in the plurality of nodes by the configuration center based on preset node screening rules; the corresponding relation is obtained from k8s by the configuration center;
s702: and acquiring the update data with the target version number according to the storage address of the update data, and storing the update data in the target storage space of the server where the update data is located.
As described above, when each application program deployed by k8s is subjected to gradation test, gradation distribution of update data of configuration data of the application program can be performed by means of the above-described data configuration system. Therefore, the configuration data of the application program of each screened target node can be updated without updating the mirror image of the application program, and the operation and maintenance difficulty of k8s is reduced. In addition, when the gray level distribution is performed on different update data of the configuration data of the application program, node screening rules of nodes for performing the gray level distribution can be respectively set, so that the flexibility of the gray level distribution of the update data of the configuration data of the application program can be improved. In addition, by means of the data configuration system, the gray level release of the update data of the configuration data of each version can be performed in parallel, the gray level release efficiency is improved, and further, the gray level test efficiency is improved.
Optionally, in a specific implementation manner, the method further includes:
monitoring the corresponding relation stored in the configuration center;
in the correspondence between the node identifier and the version number stored in the configuration center, when the current version number corresponding to the node identifier of the target node is updated to the target version number of the update data of the configuration data of the application program to be subjected to the gray level test, acquiring the target version number and the storage address of the update data includes:
And when the corresponding relation stored in the configuration center is monitored, the current version number corresponding to the node identification of the target node is updated to the target version number, an address acquisition request about the storage address of the update data with the target version number is sent to the configuration center, and the storage address of the update data sent by the configuration center in response to the address acquisition request is received.
Optionally, in a specific implementation manner, when the current version number corresponding to the node identifier of the target node is updated to the target version number of the update data of the configuration data of the application program to be subjected to the gray test in the correspondence between the node identifier and the version number stored in the configuration center, acquiring the target version number and the storage address of the update data includes:
And receiving the issued target version numbers and the storage addresses of the updated data when the configuration center updates the current version number corresponding to each target node to the target version number in the corresponding relation between the node identifier and the version number.
Optionally, in a specific implementation manner, when the current version number corresponding to the node identifier of the target node is updated to the target version number of the update data of the configuration data of the application program to be subjected to the gray test in the correspondence between the node identifier and the version number stored in the configuration center, acquiring the target version number and the storage address of the update data includes:
when a gray label issued by the configuration center is received, an address acquisition request about a storage address of update data with the target version number is sent to the configuration center, and the storage address of the update data sent by the configuration center in response to the address acquisition request is received; the gray label is generated for each target node after the configuration center determines a plurality of target nodes in the plurality of nodes based on the preset node screening rule and the node environment variable.
Optionally, in a specific implementation manner, the obtaining, according to the storage address of the update data, the update data with the target version number includes:
according to the storage address of the update data, a data acquisition request carrying the target version number is sent to the data storage equipment, so that the data storage equipment receives the data acquisition request, determines the update data corresponding to the target version number in the stored data, and sends the update data to the target node;
Each target node receives the update data.
Optionally, in a specific implementation manner, the method further includes:
Acquiring a data list, and carrying out integrity check on the acquired updated data by utilizing the data list;
The storing the update data in the target storage space of the server where the update data is located includes:
And when the update data is successfully checked, each target node stores the update data in a target storage space of a server where the target node is located.
The specific implementation manner of the method is the same as the specific implementation manner of the node configuration data updating method applied to the gray test scene of the data configuration system provided by the embodiment of the present application, and is not repeated here.
Based on the same inventive concept, the embodiment of the application also provides an updating device of node configuration data in a gray test scene, which is applied to a configuration center in a data configuration system, corresponding to the updating method of node configuration data in the gray test scene shown in fig. 6 provided by the embodiment of the application; the system further comprises: k8s a plurality of nodes deployed within at least one server, each server comprising at least one node.
Fig. 8 is a schematic structural diagram of an updating device for node configuration data in a gray test scenario applied to a configuration center in a data configuration system according to an embodiment of the present application. As shown in fig. 8, the apparatus may include the following modules:
A first obtaining module 810, configured to obtain a target version number of update data of configuration data of an application program to be subjected to gray scale test, a storage address of the update data, and a preset node screening rule;
The first updating module 820 determines a plurality of target nodes in the plurality of nodes based on the preset node screening rule, updates a current version number corresponding to a node identifier of the target node in a corresponding relation between the node identifier and a version number for each target node to the target version number, so that when each target node updates the current version number corresponding to the node identifier of the target node to the target version number in the corresponding relation stored in the configuration center, the storage address of the target version number and the storage address of the update data are acquired, the update data with the target version number is acquired according to the storage address of the update data, and the update data is stored in a target storage space of a server where the update data are located; wherein the correspondence is obtained from the k8s by the configuration center.
As described above, when each application program deployed by k8s is subjected to gradation test, gradation distribution of update data of configuration data of the application program can be performed by means of the above-described data configuration system. Therefore, the configuration data of the application program of each screened target node can be updated without updating the mirror image of the application program, and the operation and maintenance difficulty of k8s is reduced. In addition, when the gray level distribution is performed on different update data of the configuration data of the application program, node screening rules of nodes for performing the gray level distribution can be respectively set, so that the flexibility of the gray level distribution of the update data of the configuration data of the application program can be improved. In addition, by means of the data configuration system, the gray level release of the update data of the configuration data of each version can be performed in parallel, the gray level release efficiency is improved, and further, the gray level test efficiency is improved.
Optionally, in a specific implementation manner, the apparatus further includes:
And the first issuing module is used for issuing the target version number and the storage address of the update data to each target node when the current version number corresponding to the node identifier of each target node is updated to the target version number in the corresponding relation between the node identifier and the version number, so that each target node receives the target version number and the storage address of the update data.
Optionally, in a specific implementation manner, the first updating module is specifically configured to:
Determining a plurality of target nodes in the plurality of nodes based on the preset node screening rules and node environment variables;
The apparatus further comprises:
and the second issuing module is used for generating a gray label of each target node, issuing the gray label to each target node, sending an address acquisition request about a storage address of update data with the target version number to the configuration center when each target node receives the gray label, and receiving the storage address of the update data sent by the configuration center in response to the address acquisition request.
Optionally, in a specific implementation manner, the apparatus further includes:
and the third updating module is used for monitoring the corresponding relation stored in the k8s and updating the corresponding relation stored in the third updating module based on the monitored updating information of the corresponding relation when the corresponding relation stored in the k8s is monitored.
Optionally, in a specific implementation manner, the apparatus further includes:
and the third acquisition module is used for acquiring a data list of the update data so that the target nodes acquire the data list, carrying out integrity check on the acquired update data by utilizing the data list, and storing the update data in a target storage space of a server where each target node is positioned when the update data check is successful.
Based on the same inventive concept, corresponding to the method for updating node configuration data in a gray test scene shown in fig. 7 provided by the above-mentioned embodiment of the present application, the embodiment of the present application further provides an apparatus for updating node configuration data in a gray test scene, which is applied to any one of a plurality of nodes where k8s in a data configuration system is deployed in at least one server; each server comprises at least one node; the system further comprises: and (5) configuring a center.
Fig. 9 is a schematic structural diagram of an updating device for node configuration data in a gray scale test scenario applied to any one target node in a data configuration system according to an embodiment of the present application. As shown in fig. 9, the apparatus may include the following modules:
A second obtaining module 910, configured to obtain, when a current version number corresponding to a node identifier of the target node is updated to a target version number of update data of configuration data of an application program to be subjected to gray scale test in a correspondence between a node identifier and a version number stored in the configuration center, the target version number and a storage address of the update data; wherein the target version number and the storage address of the update data are acquired by the configuration center; the plurality of target nodes are determined in the plurality of nodes by the configuration center based on preset node screening rules; the corresponding relation is obtained from the k8s by the configuration center;
The second updating module 920 is configured to obtain the update data with the target version number according to the storage address of the update data, and store the update data in a target storage space of a server where the second updating module is located.
As described above, when each application program deployed by k8s is subjected to gradation test, gradation distribution of update data of configuration data of the application program can be performed by means of the above-described data configuration system. Therefore, the configuration data of the application program of each screened target node can be updated without updating the mirror image of the application program, and the operation and maintenance difficulty of k8s is reduced. In addition, when the gray level distribution is performed on different update data of the configuration data of the application program, node screening rules of nodes for performing the gray level distribution can be respectively set, so that the flexibility of the gray level distribution of the update data of the configuration data of the application program can be improved. In addition, by means of the data configuration system, the gray level release of the update data of the configuration data of each version can be performed in parallel, the gray level release efficiency is improved, and further, the gray level test efficiency is improved.
Optionally, in a specific implementation manner, the apparatus further includes:
the monitoring module is used for monitoring the corresponding relation stored in the configuration center;
The second obtaining module 910 is specifically configured to:
And when the corresponding relation stored in the configuration center is monitored, the current version number corresponding to the node identification of the target node is updated to the target version number, an address acquisition request about the storage address of the update data with the target version number is sent to the configuration center, and the storage address of the update data sent by the configuration center in response to the address acquisition request is received.
Optionally, in a specific implementation manner, the second obtaining module 910 is specifically configured to:
And receiving the issued target version numbers and the storage addresses of the updated data when the configuration center updates the current version number corresponding to each target node to the target version number in the corresponding relation between the node identifier and the version number.
Optionally, in a specific implementation manner, the second obtaining module 910 is specifically configured to:
when a gray label issued by the configuration center is received, an address acquisition request about a storage address of update data with the target version number is sent to the configuration center, and the storage address of the update data sent by the configuration center in response to the address acquisition request is received; the gray label is generated for each target node after the configuration center determines a plurality of target nodes in the plurality of nodes based on the preset node screening rule and the node environment variable.
Optionally, in a specific implementation manner, the second updating module 920 is specifically configured to:
according to the storage address of the update data, a data acquisition request carrying the target version number is sent to the data storage equipment, so that the data storage equipment receives the data acquisition request, determines the update data corresponding to the target version number in the stored data, and sends the update data to the target node; each target node receives the update data.
Optionally, in a specific implementation manner, the apparatus further includes:
A fourth acquisition module, configured to acquire a data list, and perform integrity check on the acquired update data by using the data list;
The second updating module 920 is specifically configured to:
And when the update data is successfully checked, each target node stores the update data in a target storage space of a server where the target node is located.
The embodiment of the application also provides an electronic device, as shown in fig. 10, which comprises a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002 and the memory 1003 complete communication with each other through the communication bus 1004,
A memory 1003 for storing a computer program;
The processor 1001 is configured to implement any of the above method steps when executing a program stored in the memory 1003.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or may include non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), etc.; but may also be a digital signal Processor (DIGITAL SIGNAL Processor, DSP), application Specific Integrated Circuit (ASIC), field-Programmable gate array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In still another embodiment of the present application, a computer readable storage medium is provided, where a computer program is stored, where the computer program, when executed by a processor, implements the method for updating node configuration data in a gray scale test scene according to any one of the foregoing embodiments.
In yet another embodiment of the present application, a computer program product containing instructions that, when executed on a computer, cause the computer to perform the method for updating node configuration data in a gray scale test scene according to any one of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk Solid STATE DISK (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, apparatus embodiments, electronic device embodiments, computer readable storage medium embodiments, the description is relatively simple as it is substantially similar to method embodiments, as relevant points are found in the partial description of method embodiments.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (14)

1. The updating method of the node configuration data under the gray test scene is characterized by being applied to a data configuration system; the system comprises a configuration center and a plurality of nodes of which k8s are deployed in at least one server, wherein each server is provided with at least one node;
the configuration center acquires a target version number of update data of configuration data of an application program to be subjected to gray level test, a storage address of the update data and a preset node screening rule;
The configuration center determines a plurality of target nodes in the plurality of nodes based on the preset node screening rule, and updates the current version number corresponding to the node identifier of each target node into the target version number in the corresponding relation between the node identifier and the version number for each target node; wherein the correspondence is obtained from the k8s by the configuration center;
each target node obtains the target version number and the storage address of the update data when the current version number corresponding to the node identification of the target node is updated to the target version number in the corresponding relation stored in the configuration center;
And each target node acquires the update data with the target version number according to the storage address of the update data, and stores the update data in a target storage space of a server where the target node is located.
2. The method according to claim 1, wherein the method further comprises:
Each node monitors the corresponding relation stored in the configuration center;
Each target node obtains the target version number and the storage address of the update data when the current version number corresponding to the node identifier of the target node is updated to the target version number in the corresponding relation stored in the configuration center, and the method comprises the following steps:
And each target node sends an address acquisition request about a storage address of update data with the target version number to the configuration center when monitoring that the current version number corresponding to the node identification of the target node is updated to the target version number in the corresponding relation stored in the configuration center, and receives the storage address of the update data sent by the configuration center in response to the address acquisition request.
3. The method according to claim 1, wherein the method further comprises:
The configuration center sends the target version number and the storage address of the update data to each target node when updating the current version number corresponding to the node identifier of the target node to the target version number in the corresponding relation between the node identifier and the version number;
Each target node obtains the target version number and the storage address of the update data when the current version number corresponding to the node identifier of the target node is updated to the target version number in the corresponding relation stored in the configuration center, and the method comprises the following steps:
And each target node receives the target version number issued by the configuration center and the storage address of the update data.
4. The method of claim 1, wherein the configuration center determining a plurality of target nodes among the plurality of nodes based on the preset node screening rule comprises:
the configuration center determines a plurality of target nodes from the plurality of nodes based on the preset node screening rules and node environment variables;
The method further comprises the steps of:
the configuration center generates a gray label of each target node and transmits the gray label to each target node;
Each target node obtains the target version number and the storage address of the update data when the current version number corresponding to the node identifier of the target node is updated to the target version number in the corresponding relation stored in the configuration center, and the method comprises the following steps:
Each target node, upon receiving the gray label, transmits an address acquisition request regarding a storage address of update data having the target version number to the configuration center, and receives the storage address of update data transmitted by the configuration center in response to the address acquisition request.
5. The method of any of claims 1-4, wherein the data configuration system further comprises: a data storage device in communication with the configuration center and the at least one server; the method further comprises the steps of:
The data storage device receives the target version number sent by the data updating device and the updating data of the configuration data of the application program to be subjected to gray level test, and stores the target version number and the updating data; wherein the data updating device is used for determining updating data of configuration data of the application program;
The data storage device issues the storage address of the update data and the target version number to the configuration center;
each target node obtains the update data with the target version number according to the storage address of the update data, and stores the update data in a target storage space of a server where the target node is located, including:
each target node sends a data acquisition request carrying the target version number to the data storage equipment according to the storage address of the updated data;
the data storage equipment receives the data acquisition request, determines update data corresponding to the target version number in the stored data, and issues the update data to the target node;
Each target node receives the update data.
6. The method according to any one of claims 1-4, further comprising:
The configuration center monitors the corresponding relation stored in the k8s, and updates the corresponding relation stored in the configuration center based on the monitored updating information of the corresponding relation when the corresponding relation stored in the k8s is monitored to be updated.
7. The method according to claim 1, wherein the method further comprises:
The configuration center acquires a data list of the update data;
The target node acquires the data list and performs integrity check on the acquired updated data by utilizing the data list;
each target node stores the update data in a target storage space of a server where the target node is located, including:
And when the update data is successfully checked, each target node stores the update data in a target storage space of a server where the target node is located.
8. The updating method of the node configuration data under the gray test scene is characterized by being applied to a configuration center in a data configuration system; the system further comprises: a plurality of nodes deployed k8s within at least one server, each server comprising at least one node; the method comprises the following steps:
acquiring a target version number of update data of configuration data of an application program to be subjected to gray level test, a storage address of the update data and a preset node screening rule;
Based on the preset node screening rule, determining a plurality of target nodes in the plurality of nodes, updating the current version number corresponding to the node identifier of the target node into the target version number in the corresponding relation between the node identifier and the version number for each target node, so that each target node obtains the target version number and the storage address of the update data when the current version number corresponding to the node identifier of the target node is updated into the target version number in the corresponding relation stored in the configuration center, obtains the update data with the target version number according to the storage address of the update data, and stores the update data in the target storage space of the server where the target node is located; wherein the correspondence is obtained from the k8s by the configuration center.
9. The updating method of the node configuration data under the gray test scene is characterized by being applied to any one target node of a plurality of nodes of which k8s is deployed in at least one server in a data configuration system; each server comprises at least one node; the system further comprises: a configuration center; the method comprises the following steps:
In the corresponding relation between the node identification and the version number stored in the configuration center, when the current version number corresponding to the node identification of the target node is updated to the target version number of the update data of the configuration data of the application program to be subjected to gray level test, acquiring the target version number and the storage address of the update data; wherein the target version number and the storage address of the update data are acquired by the configuration center; the plurality of target nodes are determined in the plurality of nodes by the configuration center based on preset node screening rules; the corresponding relation is obtained from the k8s by the configuration center;
And acquiring the update data with the target version number according to the storage address of the update data, and storing the update data in a target storage space of a server where the update data is located.
10. A data configuration system, comprising a configuration center and a plurality of nodes where k8s are deployed in at least one server; each server comprises at least one node;
The configuration center is used for acquiring a target version number of update data of configuration data of an application program to be subjected to gray level test, a storage address of the update data and a preset node screening rule; determining a plurality of target nodes in the plurality of nodes based on the preset node screening rule, and updating the current version number corresponding to the node identifier of each target node into the target version number in the corresponding relation between the node identifier and the version number for each target node; wherein the correspondence is obtained from the k8s by the configuration center;
Each target node is configured to obtain, in the corresponding relationship stored in the configuration center, the target version number and a storage address of the update data when the current version number corresponding to the node identifier of the target node is updated to the target version number; and acquiring the update data with the target version number according to the storage address of the update data, and storing the update data in a target storage space of a server where the update data is located.
11. The updating device of the node configuration data under the gray test scene is characterized by being applied to a configuration center in a data configuration system; the system further comprises: a plurality of nodes deployed k8s within at least one server, each server comprising at least one node; the device comprises:
The first acquisition module is used for acquiring a target version number of update data of configuration data of an application program to be subjected to gray level test, a storage address of the update data and a preset node screening rule;
The first updating module is used for determining a plurality of target nodes in the plurality of nodes based on the preset node screening rule, updating the current version number corresponding to the node identifier of the target node into the target version number in the corresponding relation between the node identifier and the version number for each target node, so that when each target node updates the current version number corresponding to the node identifier of the target node into the target version number in the corresponding relation stored in the configuration center, acquiring the target version number and the storage address of the updating data, acquiring the updating data with the target version number according to the storage address of the updating data, and storing the updating data in the target storage space of a server where the updating data is located; wherein the correspondence is obtained from the k8s by the configuration center.
12. The device for updating the node configuration data in the gray test scene is characterized by being applied to any one target node of a plurality of nodes of which k8s is deployed in at least one server in a data configuration system; each server comprises at least one node; the system further comprises: a configuration center; the device comprises:
The second obtaining module is used for obtaining the target version number and the storage address of the update data when the current version number corresponding to the node identifier of the target node is updated to the target version number of the update data of the configuration data of the application program to be subjected to gray level test in the corresponding relation between the node identifier and the version number stored in the configuration center; wherein the target version number and the storage address of the update data are acquired by the configuration center; the plurality of target nodes are determined in the plurality of nodes by the configuration center based on preset node screening rules; the corresponding relation is obtained from the k8s by the configuration center;
and the second updating module is used for acquiring the updating data with the target version number according to the storage address of the updating data and storing the updating data in the target storage space of the server where the second updating module is located.
13. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of claim 8 or 9 when executing a program stored on a memory.
14. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of claim 8 or 9.
CN202311849434.4A 2023-12-29 2023-12-29 Method, system and device for updating node configuration data in gray test scene Pending CN117950692A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311849434.4A CN117950692A (en) 2023-12-29 2023-12-29 Method, system and device for updating node configuration data in gray test scene

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311849434.4A CN117950692A (en) 2023-12-29 2023-12-29 Method, system and device for updating node configuration data in gray test scene

Publications (1)

Publication Number Publication Date
CN117950692A true CN117950692A (en) 2024-04-30

Family

ID=90804075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311849434.4A Pending CN117950692A (en) 2023-12-29 2023-12-29 Method, system and device for updating node configuration data in gray test scene

Country Status (1)

Country Link
CN (1) CN117950692A (en)

Similar Documents

Publication Publication Date Title
CN112506659B (en) Management method of edge equipment and related device
US9819535B2 (en) Correlating computing network events
CN109150987B (en) Two-layer container cluster elastic expansion method based on host layer and container layer
CN105262608B (en) Monitoring method and device for network service
CN112506755B (en) Log acquisition method, device, computer equipment and storage medium
CN112532413A (en) Business support Saas system, method, medium and device based on micro-service architecture
CN112905323B (en) Data processing method, device, electronic equipment and storage medium
CN106339273A (en) Application program restoration method, terminal and server
CN112162761A (en) Method, system and equipment for automatically deploying project to public cloud containerization platform
CN113792008A (en) Method and device for acquiring network topology structure, electronic equipment and storage medium
CN116257438A (en) Updating method of interface test case and related equipment
CN112306973B (en) Picture importing system and method
CN110569046A (en) Data processing method, device, equipment and storage medium
WO2013161522A1 (en) Log collection server, log collection system, log collection method
CN109274533B (en) Web service fault positioning device and method based on rule engine
CN117950692A (en) Method, system and device for updating node configuration data in gray test scene
CN109814911A (en) Method, apparatus, computer equipment and storage medium for Manage Scripts program
CN115002107A (en) Method, system, equipment and storage medium for deploying fragment service
US11582345B2 (en) Context data management interface for contact center
CN111581256A (en) Interaction method and system for application program of intelligent measurement terminal
US20200014602A1 (en) Dynamic resiliency framework
CN112579189A (en) Configuration file updating method and device
CN117453665B (en) Data processing method, device, equipment and storage medium
CN117270888B (en) Cloud application deployment method, system, device and computer equipment
CN113849364B (en) Edge application management method, device, equipment and readable storage medium

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