CN115632944B - Node configuration method, device, equipment, readable storage medium and server - Google Patents

Node configuration method, device, equipment, readable storage medium and server Download PDF

Info

Publication number
CN115632944B
CN115632944B CN202211645146.2A CN202211645146A CN115632944B CN 115632944 B CN115632944 B CN 115632944B CN 202211645146 A CN202211645146 A CN 202211645146A CN 115632944 B CN115632944 B CN 115632944B
Authority
CN
China
Prior art keywords
configuration
node
configuration file
difference
service module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211645146.2A
Other languages
Chinese (zh)
Other versions
CN115632944A (en
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211645146.2A priority Critical patent/CN115632944B/en
Publication of CN115632944A publication Critical patent/CN115632944A/en
Application granted granted Critical
Publication of CN115632944B publication Critical patent/CN115632944B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a node configuration method, a node configuration device, a readable storage medium and a server, belongs to the field of cloud computing platforms, and is used for configuring service modules of nodes in a cloud computing platform deployed on a K8s platform. According to the configuration method and the configuration device, for the service module to be configured, the difference increment configuration file corresponding to the node and the service module to be configured, which is prestored, can be obtained from K8s, then the difference content of the default configuration file corresponding to the service module to be configured in the difference increment configuration file can be added to the default configuration file, so that the configuration file required by the service module to be configured under the node is obtained, the configuration of the service module is completed, the configuration of the service module is efficiently realized, different configurations can be performed according to the characteristics of the node, differential nodes can be deployed in a cloud computing platform under the condition, and the flexibility of a cloud computing platform architecture is improved.

Description

Node configuration method, device, equipment, readable storage medium and server
Technical Field
The invention relates to the field of cloud computing platforms, in particular to a node configuration method, and further relates to a node configuration device, equipment, a computer readable storage medium and a server.
Background
Kubernetes (K8 s) is a brand-new container cluster management system based on a container technology, provides functions of deployment and operation, resource scheduling, service discovery, dynamic scaling and the like for containerized applications on the basis of a docker technology, and provides convenience for large-scale container cluster management.
The cloud computing platform is generally composed of a plurality of business modules, and the cloud computing platform is complex in function, and whether each business module in the cloud computing platform can normally operate and provide services depends on the correctness of a configuration file of each business module, so when the cloud computing platform is deployed on K8s, an important task is to generate a correct configuration file for each business module and provide the correct configuration file for the business module to use so as to normally operate and provide services.
Therefore, how to provide a solution to the above technical problems is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a node configuration method, which not only realizes the configuration of a service module efficiently, but also can carry out different configurations according to the characteristics of the node, so that differentiated nodes can be deployed in a cloud computing platform, and the flexibility of the cloud computing platform architecture is improved; another object of the present invention is to provide a node configuration device, a computer-readable storage medium, and a server, which not only efficiently implement configuration of a service module, but also perform different configurations according to characteristics of a node where the service module is located, so that differentiated nodes can be deployed in a cloud computing platform, and flexibility of a cloud computing platform architecture is improved.
In order to solve the above technical problem, the present invention provides a node configuration method, including:
determining a subordinate business module to be configured;
acquiring a difference increment configuration file which is prestored and corresponds to the node and the service module to be configured from the K8 s;
acquiring a pre-stored default configuration file corresponding to the service module to be configured;
adding the difference content of the difference increment configuration file and the default configuration file to the default configuration file;
and configuring the service module to be configured according to the default configuration file added with the difference content.
Preferably, the obtaining of the pre-stored difference increment configuration file corresponding to the self node and the service module to be configured from the K8s specifically includes:
acquiring a pre-stored node difference increment configuration total file corresponding to the service module to be configured from K8 s;
acquiring node identification information of a node of the node;
and acquiring a difference increment configuration file matched with the node identification information from the node difference increment configuration total file.
Preferably, the obtaining of the difference increment configuration file matched with the node identification information from the node difference increment configuration total file specifically includes:
judging whether a difference increment configuration file matched with the node identification information exists in the node difference increment configuration total file or not;
if not, directly configuring the service module to be configured according to a default configuration file corresponding to the service module to be configured;
and if so, acquiring a difference increment configuration file matched with the node identification information from the node difference increment configuration total file.
Preferably, the adding the difference content between the difference increment configuration file and the default configuration file to the default configuration file specifically includes:
determining a configuration block to be checked from the difference increment configuration file;
judging whether the configuration block to be checked exists in the default configuration file or not;
if the configuration block does not exist, adding the configuration block to be checked to the default configuration file;
if yes, adding the difference content between the configuration block to be checked and the default configuration file to the default configuration file;
judging whether all configuration blocks in the difference increment configuration file are checked;
and if not, executing the step of determining a configuration block to be checked from the difference increment configuration file.
Preferably, the adding of the content of the difference between the configuration block to be checked and the default configuration file to the default configuration file specifically includes:
determining a difference increment configuration item to be checked from the configuration blocks to be checked;
judging whether the difference increment configuration item to be checked exists in the default configuration file or not;
if not, adding the differential increment configuration item to be checked to the default configuration file;
if yes, updating the difference increment configuration item to be checked to the default configuration file;
judging whether all the difference increment configuration items in the configuration block to be checked are checked;
and if not, executing the step of determining a to-be-checked difference increment configuration item from the to-be-checked configuration block.
Preferably, after configuring the service module to be configured according to the default configuration file after adding the difference content, the node configuration method further includes:
and executing the step of acquiring the pre-stored difference increment configuration file corresponding to the self node and the service module to be configured from the K8s every other preset period.
Preferably, after the service module to be configured is configured according to the default configuration file after the difference content is added, the node configuration method further includes:
in response to the received configuration instruction, extracting a difference increment configuration item in the configuration instruction;
determining a business module corresponding to the extracted difference increment configuration item;
and updating the extracted difference increment configuration item to the corresponding business module.
Preferably, the obtaining of the pre-stored node difference increment configuration total file corresponding to the service module to be configured from the K8s specifically includes:
and acquiring a pre-stored node difference increment configuration total file corresponding to the service module to be configured from the Config Map resource of K8 s.
Preferably, the differential increment configuration items include a CPU over-rate, a memory over-rate and an occupied thread number.
Preferably, the delta configuration file comprises a delta configuration file configuration field;
wherein the incremental configuration file configuration field comprises a configuration file type field for specifying a file type, a location field for specifying a home location of the differential incremental configuration file in a node, and a configuration block field for accommodating the differential incremental configuration item.
Preferably, the delta configuration file further comprises a reservation information field, so as to obtain reservation information from the reservation information field or fill reservation information into the reservation information field.
Preferably, the obtaining of the pre-stored node difference increment configuration total file corresponding to the service module to be configured from the K8s specifically includes:
judging whether a node difference increment configuration total file corresponding to the service module to be configured exists in K8 s;
if not, alarming;
and if so, acquiring a pre-stored node difference increment configuration total file corresponding to the service module to be configured from the K8 s.
Preferably, the acquiring node identification information of the own node specifically includes:
judging whether node identification information of the node can be acquired or not;
if yes, the step of obtaining a difference increment configuration file matched with the node identification information from the node difference increment configuration total file is executed;
if not, the control prompter prompts the node identification information to acquire abnormity.
Preferably, after configuring the service module to be configured according to the default configuration file after adding the difference content, the node configuration method further includes:
judging whether all the service modules subordinate to the self are completely configured;
if not, executing the step of determining the subordinate business module to be configured;
if yes, controlling the prompter to prompt the service module to finish configuration.
Preferably, after the service module to be configured is configured according to the default configuration file after the difference content is added, the node configuration method further includes:
acquiring current fault equipment of a node of the node;
judging whether the fault equipment belongs to preset equipment related to the difference increment configuration file or not;
if yes, the control prompter prompts that reconfiguration is needed.
Preferably, after determining whether the faulty device belongs to a preset device related to the delta configuration file, the node configuration method further includes:
if the business module belongs to the service module, acquiring the original default configuration file of each subordinate business module;
and configuring each corresponding service module according to the default configuration file.
In order to solve the above technical problem, the present invention further provides a node configuration apparatus, including:
the determining module is used for determining the subordinate business module to be configured;
the first acquisition module is used for acquiring a difference increment configuration file which is prestored and corresponds to the node and the service module to be configured from the K8 s;
the second acquisition module is used for acquiring a pre-stored default configuration file corresponding to the service module to be configured;
a merging module, configured to add, to the default configuration file, difference content in the difference increment configuration file and the default configuration file;
and the execution module is used for configuring the service module to be configured according to the default configuration file added with the difference content.
In order to solve the above technical problem, the present invention further provides a node configuration device, including:
a memory for storing a computer program;
a processor for implementing the steps of the node configuration method as described above when executing the computer program.
In order to solve the technical problem, the invention further provides a server, which comprises a server body and the node configuration equipment connected with the server body.
To solve the above technical problem, the present invention further provides a computer-readable storage medium, having a computer program stored thereon, where the computer program, when executed by a processor, implements the steps of the node configuration method as described above.
The invention provides a node configuration method, and in consideration of the fact that the difference of nodes located in the same service module located in different nodes can also cause the difference of configuration files required by the service module, for the service module to be configured, the method can acquire prestored difference increment configuration files corresponding to the node and the service module to be configured from K8s, and then can add the difference content of default configuration files corresponding to the service module to be configured in the difference increment configuration files to the default configuration files, so as to obtain the configuration files required by the service module to be configured under the node, so as to complete the configuration of the service module, thereby not only efficiently realizing the configuration of the service module, but also carrying out different configurations aiming at the characteristics of the nodes located in the node configuration files, and under the condition, deploying the differentiated nodes in a cloud computing platform, and improving the flexibility of the architecture of the cloud computing platform.
The invention also provides a node configuration device, equipment, a computer readable storage medium and a server, which have the same beneficial effects as the node configuration method.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed in the prior art and the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a node configuration method according to the present invention;
fig. 2 is a schematic structural diagram of a node configuration apparatus according to the present invention;
fig. 3 is a schematic structural diagram of a node configuration device provided in the present invention.
Detailed Description
The core of the invention is to provide a node configuration method, which not only realizes the configuration of the service module efficiently, but also can carry out different configurations according to the characteristics of the node, and can deploy differentiated nodes in the cloud computing platform under the condition, thereby improving the flexibility of the cloud computing platform architecture; another core of the present invention is to provide a node configuration device, a computer-readable storage medium, and a server, which not only efficiently implement configuration of a service module, but also perform different configurations according to characteristics of a node where the service module is located, so that differentiated nodes can be deployed in a cloud computing platform, and flexibility of a cloud computing platform architecture is improved.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic flowchart of a node configuration method provided by the present invention, where the node configuration method includes:
s101: determining a subordinate business module to be configured;
specifically, in view of the technical problems in the background art, in combination with consideration that for the same service module located at different nodes, the difference of the located nodes may also cause the difference of the configuration files required by the service module, for example, for the service module a, the service module a is provided in both the node a and the node B, and the node a and the node B have obvious differences in structure and performance, for example, the node a has 4 CPUs, and the node B has 8 CPUs, in this case, the configuration contents required by the service module a in the node a and the service module a in the node B also have differences, so that different configurations for the service module a need to be implemented, and in the present application, the node in the cloud computing platform is to configure the service module subordinate to itself, so that the service module to be configured to itself may be determined first, so that the service module to be configured in the subsequent step may be configured.
The embodiment of the present invention may be applied to a single node of a cloud computing platform, and the number of service modules that need to be configured included in the single node may also be multiple, which is not limited herein.
Specifically, the cloud computing platform where the node in the embodiment of the present invention is located may be of various types, for example, may be an OpenStack cloud computing platform, and the like, and the embodiment of the present invention is not limited herein.
The OpenStack is an open-source cloud computing management platform, and the main purpose of the OpenStack is to hide details of underlying physical hardware through virtualization technology, provide resource isolation and resource use limitation of computing, storage, network and other layers for a user, and enable the user to look like monopolizing one machine. At present, a large number of developers participate in the method on the global scale, and powerful guarantee is provided for the rapid development of OpenStack. Through years of development, the technology of OpenStack is mature and stable, and the OpenStack has flexible expandability while providing high availability, so that OpenStack is widely applied to various industries. The OpenStack cloud computing platform is deployed on Kubernets, so that the deployment flexibility, expandability, fault self-recovery and other capabilities of the OpenStack cloud computing platform are improved.
S102: acquiring a difference increment configuration file which is prestored and corresponds to the node and the service module to be configured from the K8 s;
specifically, in order to facilitate the acquisition of the difference increment configuration file by each node, in the embodiment of the invention, the difference increment configuration file corresponding to each node and each service module to be configured can be prestored in the K8s platform, and then each node can be uniformly acquired from the K8s platform, so that the data acquisition efficiency is improved.
Wherein, the difference increment configuration file can be used as a data base of the subsequent steps.
Specifically, considering that for the same service module located at different nodes, the difference of the located node may also cause the difference of the configuration file required by the service module, so that the difference increment configuration file in the embodiment of the present invention needs to correspond to the node in addition to the service module to be configured, which can be implemented in the generation stage of the difference increment configuration file, and the corresponding difference increment configuration file can be designed according to the characteristics of the node and the characteristics of the service module, thereby implementing the design of the different difference increment configuration files for the same service module located at different nodes according to the difference of the located node, so as to implement the differential configuration for the service module subsequently through the difference configuration files.
S103: acquiring a pre-stored default configuration file corresponding to a service module to be configured;
specifically, considering that, for a service module, the difference content of configuration items caused by the difference of nodes located therein only occupies a small part, in this case, in order to reduce the workload of a worker in designing a difference increment configuration file, the embodiment of the present invention may obtain a pre-stored default configuration file corresponding to the service module to be configured, so as to be used as a data basis for subsequent steps, so far, it can be seen that the difference increment configuration file may actually specify a small part of "configuration items that need to be specially set due to the difference of characteristics of the nodes where the service module is located" on the basis of each configuration item included in the default configuration file.
The pre-storage location of the default configuration file may be freely set, for example, may be pre-stored in each node, and the like.
S104: adding the difference content of the difference increment configuration file and the default configuration file to the default configuration file;
specifically, since the delta configuration file specifies some configuration items of special settings, and these special configuration items are likely to be absent or different in the default configuration file, in order to apply the content of each configuration item in the delta configuration file to the service module, in the embodiment of the present invention, the content of the difference between the delta configuration file and the default configuration file may be added to the default configuration file, so as to obtain the default configuration file with the content of the difference added, and use the default configuration file as the data base of the subsequent step.
S105: and configuring the service module to be configured according to the default configuration file added with the difference content.
After the default configuration file with the added difference content is obtained, the service module to be configured can be configured according to the current default configuration file, and the configured service module also meets the relevant requirements of the node when in operation, namely, each service module can smoothly and efficiently operate.
Specifically, because the differential increment configuration file in the embodiment of the present invention can be designed for each node, that is, corresponding differential configuration files are respectively designed for scenes of the same service module in different nodes, the structure and configuration of each node can also be flexibly designed under such a condition, so that the flexibility of the cloud computing platform during building is improved, and the user experience is improved.
The invention provides a node configuration method, which considers that for the same service module positioned at different nodes, the difference of the positioned nodes can also cause the difference of configuration files required by the service module, for the service module to be configured, the method can acquire the prestored difference increment configuration files corresponding to the self node and the service module to be configured from K8s, and then the difference content of the default configuration files corresponding to the service module to be configured in the difference increment configuration files can be added to the default configuration files, so that the configuration files required by the service module to be configured under the node can be obtained, the configuration of the service module can be completed, the configuration of the service module can be efficiently realized, different configurations can be carried out according to the characteristics of the positioned nodes, the differentiated nodes can be deployed in a cloud computing platform under the condition, and the flexibility of the architecture of the cloud computing platform is improved.
On the basis of the above-described embodiment:
as a preferred embodiment, the obtaining of the pre-stored difference increment configuration file corresponding to the self node and the service module to be configured from the K8s specifically includes:
acquiring a pre-stored node difference increment configuration total file corresponding to the service module to be configured from K8 s;
acquiring node identification information of a node of the self;
and acquiring a difference increment configuration file matched with the node identification information from the node difference increment configuration total file.
Specifically, considering that the number of nodes is large, if a plurality of difference increment configuration files corresponding to the nodes one to one are designed, not only is space occupation increased, but also the nodes are more complicated when searching the difference increment configuration files corresponding to the nodes, so in order to reduce the space occupation and the searching efficiency, in the embodiment of the invention, a node difference increment configuration total file (a total file for short) is designed for each service module, and a specific difference increment configuration file of one service module in different nodes of the cloud computing platform can be accommodated in the total file, so that the space occupation is reduced, the only total file corresponding to the service module to be configured can be quickly searched during searching, and the configuration efficiency is improved.
In order to search the total file corresponding to the node, matching can be performed through the node identification information of the node, and the searching efficiency can be further improved through a simple searching mode.
The total file may be organized using a yml format, and the embodiment of the present invention is not limited herein.
Of course, in addition to the searching manner, a difference increment configuration file corresponding to the node itself may be obtained from the node difference increment configuration total file in other manners.
As a preferred embodiment, the step of obtaining the difference increment configuration file matched with the node identification information from the node difference increment configuration total file specifically includes:
judging whether a difference increment configuration file matched with the node identification information exists in the node difference increment configuration total file or not;
if not, directly configuring the service module to be configured according to a default configuration file corresponding to the service module to be configured;
and if so, acquiring a difference increment configuration file matched with the node identification information from the node difference increment configuration total file.
Specifically, considering that due to the characteristics of the node, a service module to be configured in the node may not need to be configured differently, and therefore, a difference increment configuration file corresponding to the node may not be designed in this case, in the embodiment of the present invention, it may be determined whether a difference increment configuration file matching the node identification information exists in the node difference increment configuration total file, and if not, the service module to be configured may be configured directly according to a default configuration file corresponding to the service module to be configured, and if so, the difference increment configuration file matching the node identification information may be obtained from the node difference increment configuration total file.
As a preferred embodiment, adding the difference content in the difference increment configuration file and the default configuration file to the default configuration file specifically includes:
determining a configuration block to be checked from the difference increment configuration file;
judging whether the configuration block to be checked exists in a default configuration file or not;
if not, adding the configuration block to be checked to a default configuration file;
if the configuration block exists, adding the difference content between the configuration block to be checked and the default configuration file to the default configuration file;
judging whether all configuration blocks in the difference increment configuration file are checked;
and if not, executing a step of determining a configuration block to be checked from the difference increment configuration file.
Specifically, considering that the content of the differential incremental configuration items may be more, and a plurality of differential incremental configuration items have an obvious category characteristic, the differential incremental configuration items of different categories may be placed in different configuration blocks in the differential incremental configuration file, so as to facilitate management and search, when the differential content of the differential incremental configuration file and the difference of the default configuration file are added to the default configuration file, each configuration block may be sequentially traversed in a traversal manner, the configuration blocks that do not exist in the default configuration file may be directly added to the default configuration file, and for the configuration blocks that exist in the default configuration file, considering that some of the differential incremental configuration items may be different from the default configuration file, the differential content of the configuration blocks to be checked and the difference of the default configuration file may be added to the default configuration file until all the configuration blocks in the differential incremental configuration file are traversed, which may avoid and ensure reliable configuration work.
As a preferred embodiment, adding the content of the difference between the configuration block to be checked and the default configuration file to the default configuration file specifically includes:
determining a difference increment configuration item to be checked from the configuration blocks to be checked;
judging whether the difference increment configuration item to be checked exists in a default configuration file or not;
if not, adding the difference increment configuration item to be checked to a default configuration file;
if yes, updating the difference increment configuration item to be checked to a default configuration file;
judging whether all the difference increment configuration items in the configuration block to be checked are checked;
if not, executing a step of determining a difference increment configuration item to be checked from the configuration blocks to be checked.
Specifically, a plurality of difference increment configuration items may also be provided in a single configuration block, and in order to find out the content of the configuration item that is different from the content of the configuration item in the default configuration file, in the embodiment of the present invention, a traversal manner may be similarly employed to perform one-by-one check, if the difference is present in the default configuration file, there may also be a difference in value, and because the priority of the difference increment configuration item is higher, the difference increment configuration item to be checked may be updated (covered or replaced) to the default configuration file, and if the difference is not present in the default configuration file, the difference increment configuration item to be checked may be added to the default configuration file, which further avoids omission, and ensures reliable performance of configuration work.
As a preferred embodiment, after configuring the service module to be configured according to the default configuration file after adding the difference content, the node configuration method further includes:
and executing a step of acquiring a difference increment configuration file corresponding to the self node and the service module to be configured, which is prestored from the K8s, every other preset period.
Specifically, considering that a worker may have a requirement for a service module configuration file in a subsequent process, in the embodiment of the present invention, the step of obtaining a pre-stored difference increment configuration file corresponding to a self node and a service module to be configured from K8s may be performed every preset period, so as to find an updated difference increment configuration file in time and update and configure a designed service module in time, and an automation degree is high.
The preset period may be set autonomously, and the embodiment of the present invention is not limited herein.
As a preferred embodiment, after configuring the service module to be configured according to the default configuration file after adding the difference content, the node configuration method further includes:
in response to the received configuration instruction, extracting a difference increment configuration item in the configuration instruction;
determining a business module corresponding to the extracted difference increment configuration item;
and updating the extracted difference increment configuration item to the corresponding business module.
Specifically, in order to update and configure the service module in time, a worker may directly inform the node in the form of a configuration instruction, so that in the embodiment of the present invention, in response to a received configuration instruction, a difference increment configuration item in the configuration instruction is extracted, a service module corresponding to the extracted difference increment configuration item is determined, and then the extracted difference increment configuration item is updated to the service module corresponding to the extracted difference increment configuration item, which provides a way to update the configuration of the service module in time, and improves work efficiency and user experience.
As a preferred embodiment, the step of obtaining the pre-stored node difference increment configuration total file corresponding to the service module to be configured from the K8s specifically includes:
and acquiring a pre-stored node difference increment configuration total file corresponding to the service module to be configured from the Config Map resource of K8 s.
Specifically, before the service module is deployed, a configmap resource of kubernets can be created by using the total file; when the service module is deployed, the high-priority node difference increment configuration file in the configmap is mounted to the relevant directory in the service module pod, so that the method can be executed, the high-priority node difference increment configuration file is obtained from K8s configmap resources, and the method has the advantages of high reading speed, high reliability and the like.
Of course, in addition to the specific manner, a pre-stored node difference increment configuration total file corresponding to the service module to be configured may be obtained from other locations, and the embodiment of the present invention is not limited herein.
In a preferred embodiment, the differential increment configuration items include a CPU over-rate, a memory over-rate and an occupied thread number.
Specifically, the CPU over-rate is related to the core number of the node CPU and the CPU frequency, the memory over-rate is related to the memory capacity, and the number of occupied threads is related to the core number of the node CPU, the CPU frequency, and the memory capacity, which belong to more important difference increment configuration items.
Of course, in addition to the specific example, the delta configuration item may also be other specific contents, and the embodiment of the present invention is not limited herein.
As a preferred embodiment, the differential delta profile includes a delta profile configuration field;
wherein the incremental configuration file configuration field comprises a configuration file type field for specifying a file type, a location field for specifying a home location of the differential incremental configuration file in the node, and a configuration block field for accommodating differential incremental configuration items.
Specifically, in the incremental configuration file configuration field, some parameters of a rich differential incremental configuration file can be specified, and besides the configuration block field for accommodating the differential incremental configuration item, the incremental configuration file further includes a configuration file type field for specifying a file type and a location field for specifying a home location of the differential incremental configuration file in the node.
Of course, the delta configuration file may include other contents besides the above field contents, and the embodiment of the present invention is not limited herein.
As a preferred embodiment, the delta configuration file further comprises a reservation information field to obtain reservation information from the reservation information field or to fill the reservation information into the reservation information field.
Specifically, in consideration of the requirement that the staff member performs information interaction with the node/service module through the difference increment configuration file, the difference increment configuration file in the embodiment of the present invention may further include a reserved information field, so as to obtain the reserved information from the reserved information field or fill the reserved information into the reserved information field.
As a preferred embodiment, the step of obtaining the pre-stored node difference increment configuration total file corresponding to the service module to be configured from the K8s specifically includes:
judging whether a node difference increment configuration total file corresponding to the service module to be configured exists in K8 s;
if not, alarming;
and if so, acquiring a pre-stored node difference increment configuration total file corresponding to the service module to be configured from the K8 s.
Specifically, because the total file includes the difference increment configuration files of the plurality of nodes, the total file exists in a general case, however, in some cases, due to reasons such as a path error, the node may not acquire the total file, and in this case, the configuration work of the service module cannot be performed, so that an alarm can be given in this case, so that a worker can timely know and perform maintenance, and the reliability of the configuration work is further improved.
As a preferred embodiment, the acquiring node identification information of the self node specifically includes:
judging whether node identification information of the node can be acquired;
if yes, a step of acquiring a difference increment configuration file matched with the node identification information from the node difference increment configuration total file is executed;
if not, the control prompter prompts the node identification information to obtain abnormity.
Specifically, considering that the node identification information is also key information for acquiring the difference increment configuration file from the total file, and the node identification information may not be normally acquired under some abnormal conditions, in the embodiment of the present invention, when the node identification information of the node itself cannot be acquired, the control prompter may prompt the node identification information to acquire an abnormality, so that a worker can timely learn and perform maintenance, and reliability of configuration work is further improved.
The prompting device may be of various types, such as a display, and the like, and the embodiment of the present invention is not limited herein.
As a preferred embodiment, after configuring the service module to be configured according to the default configuration file after adding the difference content, the node configuration method further includes:
judging whether all the service modules subordinate to the self are completely configured;
if not, executing the step of determining the subordinate business module to be configured;
if yes, the prompter is controlled to prompt that the configuration of the service module is finished.
Specifically, in order to automatically execute configuration work on a plurality of service modules existing in a node, in the embodiment of the present invention, after a service module to be configured is configured, it may be determined whether all service modules subordinate to the service module are configured completely, and when all service modules subordinate to the service module are not configured completely, a step of determining the service module to be configured subordinate to the service module may be executed, so as to improve the degree of automation, and when the execution is completed, a prompter may be controlled to prompt that the service module is configured completely, so that a worker knows the progress of the configuration work of the service module.
As a preferred embodiment, after configuring the service module to be configured according to the default configuration file after adding the difference content, the node configuration method further includes:
acquiring current fault equipment of a node of the node;
judging whether the fault equipment belongs to preset equipment related to the difference increment configuration file or not;
if yes, the control prompter prompts that reconfiguration is needed.
Specifically, considering that a device failure in a self node may affect a change in a configuration requirement of a service module, the embodiment of the present invention provides a monitoring mechanism, which may determine whether a current failure device of the self node belongs to a preset device related to a difference increment configuration file, and if the current failure device of the self node belongs to the preset device related to the difference increment configuration file, may control a prompter to prompt that reconfiguration is needed, so that a worker may find the situation in time and control a node to overhaul the failed device or reconfigure a service module, and the like, thereby improving the working stability of a cloud computing platform.
As a preferred embodiment, after determining whether the failed device belongs to a preset device related to a delta configuration file, the node configuration method further includes:
if the business module belongs to the business module, acquiring original default configuration files of each subordinate business module;
and configuring each corresponding service module according to the default configuration file.
Specifically, in consideration that a worker may not be able to timely know the prompt content of "needing to be reconfigured", in this case, in order to enable the relevant service module to normally operate, in the embodiment of the present invention, the original default configuration file of each service module subordinate to the worker itself may be obtained, and then each corresponding service module is configured according to the default configuration file, that is, the basic operation of the service module is satisfied, so that the service module is ensured to continuously operate.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a node configuration apparatus provided in the present invention, where the node configuration apparatus includes:
the determining module 21 is configured to determine a subordinate business module to be configured;
the first obtaining module 22 is configured to obtain a difference increment configuration file, which is pre-stored and corresponds to the self node and the service module to be configured, from the K8 s;
the second obtaining module 23 is configured to obtain a pre-stored default configuration file corresponding to the service module to be configured;
a merging module 24, configured to add the difference content in the difference increment configuration file from the default configuration file to the default configuration file;
and the execution module 25 is configured to configure the service module to be configured according to the default configuration file to which the difference content is added.
The invention provides a node configuration device, and in consideration of the fact that the difference of nodes located in the same service module located in different nodes can also cause the difference of configuration files required by the service module, for the service module to be configured, the method can acquire prestored difference increment configuration files corresponding to the node and the service module to be configured from K8s, and then can add the difference content of default configuration files corresponding to the service module to be configured in the difference increment configuration files to the default configuration files, so as to obtain the configuration files required by the service module to be configured under the node, so as to complete the configuration of the service module, thereby not only efficiently realizing the configuration of the service module, but also carrying out different configurations aiming at the characteristics of the nodes located in the node configuration device, and under the condition, the different nodes can be deployed in a cloud computing platform, so that the flexibility of the cloud computing platform architecture is improved.
For introducing the node configuration apparatus provided in the embodiment of the present invention, please refer to the embodiment of the foregoing node configuration method, and details of the embodiment of the present invention are not repeated herein.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a node configuration device according to the present invention, where the node configuration device includes:
a memory 31 for storing a computer program;
a processor 32 for implementing the steps of the node configuration method as in the previous embodiment when executing the computer program.
Specifically, the memory includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer readable instructions, and the internal memory provides an environment for the operating system and the computer readable instructions in the non-volatile storage medium to run. The processor, when executing the computer program stored in the memory, may perform the following steps: determining a subordinate business module to be configured; acquiring a difference increment configuration file which is prestored and corresponds to the node and the service module to be configured from the K8 s; acquiring a pre-stored default configuration file corresponding to a service module to be configured; adding the difference content of the difference increment configuration file and the default configuration file to the default configuration file; and configuring the service module to be configured according to the default configuration file added with the difference content.
The invention provides a node configuration device, which considers that the difference of nodes in the same service module positioned at different nodes can also cause the difference of configuration files required by the service module, the application can acquire the pre-stored difference increment configuration files corresponding to the self node and the service module to be configured from K8s for the service module to be configured, and then the difference content of the default configuration file corresponding to the service module to be configured in the difference increment configuration file can be added to the default configuration file, so that the configuration files required by the service module to be configured under the node can be obtained, the configuration of the service module can be completed, the configuration of the service module can be efficiently realized, different configurations can be carried out according to the characteristics of the nodes, and the differentiated nodes can be deployed in a cloud computing platform under the condition, so that the flexibility of the cloud computing platform architecture is improved.
For introducing the node configuration device provided in the embodiment of the present invention, please refer to the embodiment of the foregoing node configuration method, and details of the embodiment of the present invention are not repeated herein.
The invention also provides a server, which comprises a server body and the node configuration equipment connected with the server body in the embodiment.
The invention provides a server, and in consideration of the fact that different configuration files needed by a service module can be caused by the difference of nodes located in the same service module located in different nodes, for the service module to be configured, the server can acquire prestored difference increment configuration files corresponding to the node and the service module to be configured from K8s, and then the difference content of default configuration files corresponding to the service module to be configured in the difference increment configuration files can be added to the default configuration files, so that the configuration files needed by the service module to be configured under the node are obtained, the configuration of the service module is completed, the configuration of the service module is efficiently realized, different configurations can be carried out according to the characteristics of the nodes located in the difference increment configuration files, and the differentiated nodes can be deployed in a cloud computing platform under the condition, so that the flexibility of the architecture of the cloud computing platform is improved.
For the introduction of the server provided in the embodiment of the present invention, please refer to the embodiment of the foregoing node configuration method, and details of the embodiment of the present invention are not repeated herein.
The present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the node configuration method as in the previous embodiments.
Specifically, the readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk. The storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of: determining a subordinate business module to be configured; acquiring a difference increment configuration file which is prestored and corresponds to the node and the service module to be configured from the K8 s; acquiring a pre-stored default configuration file corresponding to a service module to be configured; adding the difference content of the difference increment configuration file and the default configuration file to the default configuration file; and configuring the service module to be configured according to the default configuration file added with the difference content.
The invention provides a computer readable storage medium, considering that for the same service module located at different nodes, the difference of the located nodes can also cause the difference of configuration files required by the service module, for the service module to be configured, the application can acquire the prestored difference increment configuration files corresponding to the self node and the service module to be configured from K8s, and then can add the difference content of the default configuration files corresponding to the service module to be configured in the difference increment configuration files to the default configuration files, so as to obtain the configuration files required by the service module to be configured under the node, thereby completing the configuration of the service module, not only realizing the configuration of the service module with high efficiency, but also carrying out different configurations according to the characteristics of the located nodes, and under the condition, the differentiated nodes can be deployed in a cloud computing platform, thereby improving the flexibility of the architecture of the cloud computing platform.
For introduction of the computer-readable storage medium provided in the embodiment of the present invention, please refer to the embodiment of the foregoing node configuration method, and details of the embodiment of the present invention are not repeated herein.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It is further noted that, in the present specification, 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. Also, 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 phrases "comprising a component of' 8230; \8230;" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (19)

1. A node configuration method, comprising:
determining a subordinate business module to be configured;
acquiring a difference increment configuration file which is prestored and corresponds to the node and the service module to be configured from the K8 s;
acquiring a pre-stored default configuration file corresponding to the service module to be configured;
adding the difference content of the difference increment configuration file and the default configuration file to the default configuration file;
configuring the service module to be configured according to the default configuration file added with the difference content;
the obtaining of the difference increment configuration file corresponding to the pre-stored node and the service module to be configured from the K8s specifically includes:
acquiring a pre-stored node difference increment configuration total file corresponding to the service module to be configured from K8 s;
acquiring node identification information of a node of the node;
and acquiring a difference increment configuration file matched with the node identification information from the node difference increment configuration total file.
2. The node configuration method according to claim 1, wherein the obtaining of the difference increment configuration file matched with the node identification information from the node difference increment configuration total file specifically includes:
judging whether a difference increment configuration file matched with the node identification information exists in the node difference increment configuration total file or not;
if not, directly configuring the service module to be configured according to a default configuration file corresponding to the service module to be configured;
and if so, acquiring a difference increment configuration file matched with the node identification information from the node difference increment configuration total file.
3. The node configuration method according to claim 1, wherein the adding of the difference content in the difference incremental configuration file from the default configuration file to the default configuration file specifically includes:
determining a configuration block to be checked from the difference increment configuration file;
judging whether the configuration block to be checked exists in the default configuration file or not;
if the configuration block does not exist, adding the configuration block to be checked to the default configuration file;
if the configuration block exists, adding the difference content between the configuration block to be checked and the default configuration file to the default configuration file;
judging whether all configuration blocks in the difference increment configuration file are checked;
and if not, executing the step of determining a configuration block to be checked from the difference increment configuration file.
4. The node configuration method according to claim 3, wherein the adding of the difference content between the configuration block to be checked and the default configuration file to the default configuration file specifically includes:
determining a difference increment configuration item to be checked from the configuration blocks to be checked;
judging whether the difference increment configuration item to be checked exists in the default configuration file or not;
if not, adding the differential increment configuration item to be checked to the default configuration file;
if yes, updating the difference increment configuration item to be checked to the default configuration file;
judging whether all the difference increment configuration items in the configuration block to be checked are checked;
and if not, executing the step of determining a to-be-checked difference increment configuration item from the to-be-checked configuration block.
5. The node configuration method according to claim 4, wherein after configuring the service module to be configured according to the default configuration file after adding the difference content, the node configuration method further comprises:
and executing the step of acquiring the pre-stored difference increment configuration file corresponding to the self node and the service module to be configured from the K8s every other preset period.
6. The node configuration method according to claim 5, wherein after configuring the service module to be configured according to the default configuration file after adding the difference content, the node configuration method further comprises:
in response to a received configuration instruction, extracting a difference increment configuration item in the configuration instruction;
determining a business module corresponding to the extracted difference increment configuration item;
and updating the extracted difference increment configuration item to the corresponding business module.
7. The node configuration method according to claim 1, wherein the obtaining of the pre-stored node difference increment configuration total file corresponding to the service module to be configured from K8s specifically includes:
and acquiring a pre-stored node difference increment configuration total file corresponding to the service module to be configured from the Config Map resource of K8 s.
8. The node configuration method according to claim 4, wherein the differential increment configuration items comprise CPU over-rate, memory over-rate and thread-occupied number.
9. The node configuration method of claim 8, wherein the delta configuration file comprises a delta configuration file configuration field;
wherein the delta configuration file configuration field comprises a configuration file type field for specifying a file type, a location field for specifying a home location of the differential delta configuration file in a node, and a configuration block field for accommodating the differential delta configuration item.
10. The node configuration method of claim 9, wherein the delta configuration file further comprises a reservation information field to obtain reservation information from the reservation information field or to fill in the reservation information field with reservation information.
11. The node configuration method according to claim 1, wherein the obtaining of the pre-stored node difference increment configuration total file corresponding to the service module to be configured from K8s specifically includes:
judging whether a node difference increment configuration total file corresponding to the service module to be configured exists in K8 s;
if not, alarming;
and if so, acquiring a pre-stored node difference increment configuration total file corresponding to the service module to be configured from the K8 s.
12. The node configuration method according to claim 11, wherein the acquiring node identification information of the own node specifically includes:
judging whether node identification information of the node can be acquired;
if yes, the step of obtaining a difference increment configuration file matched with the node identification information from the node difference increment configuration total file is executed;
if not, the control prompter prompts the node identification information to obtain abnormity.
13. The node configuration method according to claim 1, wherein after configuring the service module to be configured according to the default configuration file after adding the difference content, the node configuration method further comprises:
judging whether all the service modules subordinate to the self are completely configured;
if not, executing the step of determining the subordinate business module to be configured;
if yes, the prompter is controlled to prompt that the configuration of the service module is finished.
14. The node configuration method according to any one of claims 1 to 13, wherein after configuring the service module to be configured according to the default configuration file after adding the difference content, the node configuration method further comprises:
acquiring current fault equipment of a node of the node;
judging whether the fault equipment belongs to preset equipment related to the difference increment configuration file or not;
if yes, the control prompter prompts that reconfiguration is needed.
15. The node configuration method according to claim 14, wherein after determining whether the failed device belongs to the preset device associated with the delta configuration file, the node configuration method further comprises:
if the business module belongs to the service module, acquiring the original default configuration file of each subordinate business module;
and configuring each corresponding service module according to the default configuration file.
16. A node configuration apparatus, comprising:
the determining module is used for determining the subordinate business module to be configured;
the first acquisition module is used for acquiring a difference increment configuration file which is prestored and corresponds to the node and the service module to be configured from the K8 s;
the second acquisition module is used for acquiring a pre-stored default configuration file corresponding to the service module to be configured;
a merging module, configured to add, to the default configuration file, difference content in the difference increment configuration file and the default configuration file;
the execution module is used for configuring the service module to be configured according to the default configuration file added with the difference content;
the first obtaining module is specifically configured to:
acquiring a pre-stored node difference increment configuration total file corresponding to the service module to be configured from K8 s;
acquiring node identification information of a node of the self;
and acquiring a difference increment configuration file matched with the node identification information from the node difference increment configuration total file.
17. A node configuration device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the node configuration method according to any one of claims 1 to 15 when executing the computer program.
18. A server comprising a server body and the node configuration device of claim 17 connected to the server body.
19. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the node configuration method according to any one of claims 1 to 15.
CN202211645146.2A 2022-12-21 2022-12-21 Node configuration method, device, equipment, readable storage medium and server Active CN115632944B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211645146.2A CN115632944B (en) 2022-12-21 2022-12-21 Node configuration method, device, equipment, readable storage medium and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211645146.2A CN115632944B (en) 2022-12-21 2022-12-21 Node configuration method, device, equipment, readable storage medium and server

Publications (2)

Publication Number Publication Date
CN115632944A CN115632944A (en) 2023-01-20
CN115632944B true CN115632944B (en) 2023-03-14

Family

ID=84909635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211645146.2A Active CN115632944B (en) 2022-12-21 2022-12-21 Node configuration method, device, equipment, readable storage medium and server

Country Status (1)

Country Link
CN (1) CN115632944B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116208498A (en) * 2023-05-04 2023-06-02 苏州浪潮智能科技有限公司 Method, device, equipment and medium for node differential configuration of OpenStack cloud platform

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106412955A (en) * 2016-09-29 2017-02-15 宇龙计算机通信科技(深圳)有限公司 Method and device for executing IMS service, and terminal
CN111090446A (en) * 2019-12-20 2020-05-01 北京海益同展信息科技有限公司 Configuration file updating method and system
CN111580884A (en) * 2020-04-30 2020-08-25 北京金山云网络技术有限公司 Configuration updating method and device, server and electronic equipment
CN113535262A (en) * 2021-07-07 2021-10-22 曙光信息产业(北京)有限公司 Method, device, equipment and storage medium for controlling starting of proxy node

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106412955A (en) * 2016-09-29 2017-02-15 宇龙计算机通信科技(深圳)有限公司 Method and device for executing IMS service, and terminal
CN111090446A (en) * 2019-12-20 2020-05-01 北京海益同展信息科技有限公司 Configuration file updating method and system
CN111580884A (en) * 2020-04-30 2020-08-25 北京金山云网络技术有限公司 Configuration updating method and device, server and electronic equipment
CN113535262A (en) * 2021-07-07 2021-10-22 曙光信息产业(北京)有限公司 Method, device, equipment and storage medium for controlling starting of proxy node

Also Published As

Publication number Publication date
CN115632944A (en) 2023-01-20

Similar Documents

Publication Publication Date Title
EP3182280B1 (en) Machine for development of analytical models
CN107896162B (en) Deployment method and device of monitoring system, computer equipment and storage medium
CN109271170B (en) Distributed system deployment method, system, electronic device and storage medium
CN107566165B (en) Method and system for discovering and deploying available resources of power cloud data center
CN110673923A (en) XWIKI system configuration method, system and computer equipment
CN113204353B (en) Big data platform assembly deployment method and device
CN103377101A (en) Testing system and testing method
CN115632944B (en) Node configuration method, device, equipment, readable storage medium and server
CN110162344B (en) Isolation current limiting method and device, computer equipment and readable storage medium
CN113645262A (en) Cloud computing service system and method
CN112328307A (en) Development, operation and maintenance integrated system
CN114527996A (en) Multi-service deployment method and device, electronic equipment and storage medium
US9836365B2 (en) Recovery execution system using programmatic generation of actionable workflows
CN117608810B (en) Service processing method, device, electronic equipment and storage medium
CN113515293B (en) Method and system for managing DevOps toolchain
CN113708971A (en) Openstack cloud platform deployment method and related device
CN113485894A (en) Data acquisition method, device and equipment and readable storage medium
CN114143235A (en) NFV automatic test method, device, equipment and storage medium
CN114519477A (en) Large data platform tenant management system, method, storage medium and electronic equipment
CN112953770A (en) Method, system and medium for configuration-free access of edge cloud gateway and cloud management system
CN111858234A (en) Task execution method, device, equipment and medium
CN115373696B (en) Low code configuration method, system, equipment and storage medium for software resource generation
CN115022317B (en) Cloud platform-based application management method and device, electronic equipment and storage medium
CN114240265B (en) Product deployment method and device based on mixed environment
CN110858806B (en) Generation method and device of node deployment file, node deployment method and device and electronic equipment

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
GR01 Patent grant
GR01 Patent grant