CN115454580B - Node host resource management method and device and computing equipment - Google Patents
Node host resource management method and device and computing equipment Download PDFInfo
- Publication number
- CN115454580B CN115454580B CN202211402041.4A CN202211402041A CN115454580B CN 115454580 B CN115454580 B CN 115454580B CN 202211402041 A CN202211402041 A CN 202211402041A CN 115454580 B CN115454580 B CN 115454580B
- Authority
- CN
- China
- Prior art keywords
- operating system
- node host
- node
- cluster
- host
- 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
Links
- 238000007726 management method Methods 0.000 title claims abstract description 45
- 238000000034 method Methods 0.000 claims abstract description 32
- 230000008569 process Effects 0.000 claims description 9
- 238000004891 communication Methods 0.000 claims description 7
- 230000004044 response Effects 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000012216 screening Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/63—Image based installation; Cloning; Build to order
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a node host resource management method, a node host resource management device and computing equipment, relates to the technical field of node host deployment and expansion, and solves the problem that states of an equivalent node and a node operating system are difficult to reconstruct and are inconsistent. The method comprises the following steps: receiving request information which is sent by a node host and applies for joining a cluster; acquiring an operating system version image and an operating system configuration file corresponding to the cluster, and sending the operating system version image and the operating system configuration file to the node host, so that the operating system states of the node host and other node machines in the cluster are consistent; determining that the node host is configured with an operating system, and performing cluster binding on the node host; the operating system state of the node host is registered. The invention ensures the consistency of the operating system state of each node host in the cluster by setting the configuration of the node host on the master control equipment or the server of the cluster.
Description
Technical Field
The invention relates to the technical field of node host deployment and expansion, in particular to a node host resource management method, a node host resource management device and computing equipment.
Background
Kubernets, a Kubernetes release, is an open source container orchestration platform for large-scale operation of containerized distributed applications and services. Kubernets operate on a set of machines in the form of a cluster that contains at least one control plane node, and one or more compute nodes. Clusters are a core advantage of kubernets, enabling containers to be scheduled and run across a set of machines within an organization or cloud, and containers in kubernets are not limited by a single machine, but are abstracted across the entire cluster. Kubernets runs on infrastructure and relies on operating systems installed on node hosts to run.
In recent years, applications enter the container deployment era, separation from infrastructure is achieved by using container technology, kubernets become a de facto standard for container arrangement, and the kubernets help users to save a large number of manual deployment, failover and expansion operations of containerized applications and maximally utilize cluster computing resources.
Kubernets can achieve operational scalability and management of containers, but it does not directly manage the infrastructure on which kubernets themselves depend, leading to additional maintenance efforts for administrators to manage both kubernets and node operating systems.
In addition, for a variable infrastructure architecture, the operating systems of the node hosts in the kubernets cluster are constantly updated and modified, an infrastructure administrator remotely logs in the node operating systems, and manually upgrades or downgrades software packages, adjusts configuration files, upgrades/rollback systems, and the like, are performed on the nodes one by one, that is, the operating systems in the infrastructure are variable and can be changed after the installation of the operating systems is completed.
The kubernets cluster with variable infrastructure architecture leads to the following problems:
1. difficulty in reconstructing equivalent nodes: after a disaster occurs or when a new node needs to be added into a cluster, excessive manual operations are historically continued on a node operating system, and the lack of records can cause that after the standard of the node operating system is initialized, the node operating system is difficult to reconstruct equivalent services before, so that the cluster state is influenced.
2. The node operating system states are inconsistent: during the cluster operation process, the operating systems of the nodes are continuously modified, and the risk of inconsistent states of the operating systems of the nodes is introduced, so that unpredictable problems are caused.
Disclosure of Invention
To this end, the present invention provides a node host resource management method, apparatus and computing device in an attempt to solve or at least alleviate at least one of the problems identified above.
According to an aspect of the present invention, there is provided a node host resource management method, including: receiving request information which is sent by a node host and applies for joining a cluster; acquiring an operating system version image and an operating system configuration file corresponding to the cluster, and sending the operating system version image and the operating system configuration file to the node host, so that the node host configures an operating system according to the operating system version image and the operating system configuration file and keeps consistent with the operating system state of other node machines in the cluster; determining that the node host is configured with an operating system, and performing cluster binding on the node host; registering an operating system state of the node host.
Optionally, after the cluster binding is performed on the node host, the method further includes: obtaining an operating system version and an operating system configuration of the node host; when the operating system version or the operating system configuration of the node host does not match the operating system version or the operating system configuration corresponding to the cluster, updating the operating system version and the operating system configuration of the node host.
Optionally, the updating the os version and os configuration of the node host includes: setting the node host to be in a non-dispatchable state, and evicting a container on the node host in the non-dispatchable state; acquiring an operating system version image and an operating system configuration file corresponding to the cluster, and sending the operating system version image and the operating system configuration file to the node host so as to enable the node host to configure an operating system; and in response to the operating system state of the node host being normal, canceling the non-dispatchable state of the node host.
Optionally, determining that the node host configures the operating system to complete comprises: receiving application information which is sent by a node host configuration operating system; or, periodically communicating with the node host, detecting the operating system configuration condition of the node host, and determining that the node host completes configuring the operating system under the condition that the operating system configuration condition indicates that the node host completes configuring the operating system.
Optionally, when the node host exits the cluster service, deleting the information of the node host, removing the binding relationship between the node host and the cluster, and restoring the operating system configuration of the node host.
According to another aspect of the present invention, there is provided a node host resource management apparatus, comprising: the communication module is suitable for receiving request information which is sent by the node host and applies for joining the cluster; the resource management module is suitable for acquiring an operating system version image and an operating system configuration file corresponding to the cluster, and sending the operating system version image and the operating system configuration file to the node host, so that the node host configures an operating system according to the operating system version image and the operating system configuration file and keeps consistent with the operating system state of other node machines in the cluster; the binding module is suitable for determining that the configuration of the operating system by the node host is finished and carrying out cluster binding on the node host; and the registration module is suitable for registering the operating system state of the node host.
Optionally, the apparatus further comprises an update module adapted to: obtaining an operating system version and an operating system configuration of the node host; when the operating system version or the operating system configuration of the node host does not match the operating system version or the operating system configuration corresponding to the cluster, updating the operating system version and the operating system configuration of the node host.
Optionally, the update module is adapted to update the os version and os configuration of the node host as follows: setting the node host to be in a non-dispatchable state, and evicting a container on the node host in the non-dispatchable state; acquiring an operating system version image and an operating system configuration file corresponding to the cluster, and sending the operating system version image and the operating system configuration file to the node host so as to enable the node host to configure an operating system; and in response to the operating system state of the node host being normal, canceling the non-dispatchable state of the node host.
According to another aspect of the present invention, there is also provided a computing device comprising: at least one processor and a memory storing program instructions; the program instructions, when read and executed by a processor, cause a computing device to perform the node host resource management method as above.
According to still another aspect of the present invention, there is also provided a readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the node host resource management method as above.
According to the node host resource management method, the node host resource management device and the computing equipment, the following beneficial effects can be realized:
the invention can solve the problem that the states of the equivalent node and the node operating system are not consistent due to the difficulty in reconstructing the equivalent node caused by the fact that an administrator needs to manage the Kubernets cluster and the node operating system at the same time in the related technology; the invention configures the operating system of the node host according to the operating system version mirror image and the operating system configuration file provided by the cluster for each node, ensures the consistency of the operating system state of each node host in the cluster by setting the configuration of the node host on the master control equipment or the server of the Kubernets cluster, realizes the management of the node host operating system incorporated into the Kubernets cluster resource, and effectively solves the problem that the status of the equivalent node and the node operating system is not consistent and is difficult to reconstruct in the traditional variable infrastructure architecture. The management complexity of the Kubernets cluster nodes is reduced.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a schematic diagram of a computing device 100, according to one embodiment of the invention;
FIG. 2 illustrates a flow diagram of a node host resource management method 200 according to one embodiment of the invention;
FIG. 3 shows a schematic diagram of a Kubernets cluster architecture according to one embodiment of the invention;
FIG. 4 illustrates a logic flow diagram for initializing an operating system when a new node host joins a cluster in accordance with one embodiment of the present invention;
FIG. 5 illustrates a node host operating system state update logic flow diagram in accordance with one embodiment of the present invention;
FIG. 6 is a block diagram of a node host resource management apparatus 600 according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The node host resource management method can optimize the management of the node host operating system and ensure the consistency of the states of all node host operating systems in a cluster aiming at the problem that the states of equivalent nodes and the node operating systems are difficult to reconstruct at present. The computing device may be any device with storage and computing capabilities, and may be implemented as, for example, a server, a workstation, or the like, or may be implemented as a personal computer such as a desktop computer or a notebook computer, or may be implemented as a terminal device such as a mobile phone, a tablet computer, a smart wearable device, or an internet of things device, but is not limited thereto.
FIG. 1 shows a block diagram of a computing device 100, according to one embodiment of the invention. It should be noted that the computing device 100 shown in fig. 1 is only an example, and in practice, the computing device for implementing the node host resource management method of the present invention may be any type of device, and the hardware configuration thereof may be the same as the computing device 100 shown in fig. 1 or different from the computing device 100 shown in fig. 1. In practice, the computing device for implementing the node host resource management method of the present invention may add or delete hardware components of the computing device 100 shown in fig. 1, the present invention does not limit the specific hardware configuration of the computing device, and the node host resource management method 200 of the present invention may dynamically invoke each hardware component in the computing device 100 during the execution process.
As shown in FIG. 1, computing device 100 includes system memory 110, processor 120, and display device 130.
The system memory 110 stores a plurality of program instructions for performing the node host resource management method 200 of the present invention, and the system memory 110 may be any type of memory including, but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. Processor 120 may be any type of processor including, but not limited to: a microprocessor (μ P), a microcontroller (μ C), a digital information processor (DSP), or any combination thereof. When a user sets up the operating system configuration of a node host using display device 130 (e.g., browser 301), processor 120 reads and executes program instructions stored in system memory 110, and then executes the program instructions through cluster management platform service 201. The result of the setting or management of the node host is displayed through the display device 130.
According to the node host resource management method 200 provided by the embodiment of the invention, the problem that the states of an equivalent node and a node operating system are inconsistent and are difficult to reconstruct can be solved; separating the operating system of the node host from the operating system configuration; the consistency of the operating system states of all node hosts in the cluster is ensured by configuring the operating system of the node hosts on a master control device or a server of the Kubernets cluster, and the operating system of the node hosts is brought into management of Kubernets cluster resources based on the above; the functions of managing the version resources of the operating system of the node host, managing the configuration resources of the operating system, controlling the state of the operating system and guarding the state of the operating system are realized. Fig. 2 shows a flowchart of setting the configuration of the node host on the central control device or the server to ensure the consistency of the operating system states of the node hosts in the cluster according to an embodiment of the present invention. Method 200 is performed in a computing device, such as computing device 100 described above, for ensuring consistency of operating system states of each node host within a cluster. As shown in fig. 2, method 200 begins at 210.
In 210, request information for joining the cluster sent by the node host is received.
In the embodiment of the invention, when the node host sends the request information, the node host can communicate with the master control equipment through an interface or a communication standard.
In the embodiment of the present invention, the request information may include terminal information of the node host or identification information of the pre-joining cluster, the pre-joining cluster may be selected at the node host, or which one or more node hosts join the corresponding cluster may be set at a master control device or a server of the cluster, and then the node host sends the request information for joining the cluster.
In 220, the os version image and the os configuration file corresponding to the cluster are obtained, and the os version image and the os configuration file are sent to the node host, so that the node host configures the os according to the os version image and the os configuration file, and keeps the os state consistent with the os states of other node machines in the cluster.
According to an implementation manner of the present invention, when the os version image and the os configuration file corresponding to the cluster are obtained in 220, first, the latest os version image or the os version image corresponding to the added cluster is pulled; and then acquiring the latest operating system configuration file or the operating system configuration file corresponding to the added cluster.
In the embodiment of the invention, the operating system version mirror image and the operating system configuration file of each node in the cluster are maintained at the master control device or the server side of the cluster, so that the consistency of the operating system state of each node machine in the cluster is ensured.
In the embodiment of the invention, after the node host receives the corresponding operating system version image and the operating system configuration file, the operating system is installed and configured on the node host according to the received operating system version image and the operating system configuration file.
At 230, it is determined that the node host configuration operating system is complete and cluster binding is performed on the node host.
According to one implementation of the present invention, determining that the node host configures the operating system completion at 230 includes: receiving application information which is sent by a node host configuration operating system; or periodically communicating with the node host, detecting the operating system configuration condition of the node host, and determining that the node host completes the configuration of the operating system under the condition that the operating system configuration condition indicates that the node host completes the configuration of the operating system.
In the embodiment of the present invention, when it is determined that the node host configures the operating system, the node host may actively report the configuration condition of the operating system, or a master control device or a server of the cluster may actively inquire the configuration condition of the operating system of the node host, so that it is known that the node host configures the operating system.
In the embodiment of the invention, the cluster binding can be carried out through the IP address, the password or other account numbers of the node host. The host list in the embodiment of the invention can be set on a master control device or a server of the cluster, and can also be set by an IT administrator remotely logging in the cluster management platform on any computer through a management and control account.
According to one implementation manner of the present invention, before the cluster binding is performed on the node host in 230, the method may include: authenticating the node host, wherein the authentication process comprises the following steps: judging whether the node host is in a host list of the cluster; when the node host is in the host list of the cluster, the authentication is successful; authentication fails when the node host is not in the host list of the cluster.
In the embodiment of the present invention, whether the host list includes information of the current node host for authentication may be queried, or other determination forms may be used to authenticate the current node host, and determine whether the current node host belongs to the current cluster, for example, first, whether the host list includes information of the current node host, and then further determine whether the current node host has been added to another cluster, or whether the number of nodes in the current cluster reaches an upper limit of point control; and when the node host is in the host list of the cluster, the current node host is not added into other clusters, and the number of the nodes in the current cluster does not reach the upper limit of the point control, the authentication is successful.
In the embodiment of the invention, after the authentication is successful, the node host is subjected to cluster binding, and the node host is added into a Kubernetes cluster.
At 240, the operating system state of the node host is registered.
In the embodiment of the present invention, the operating system state of the node host is registered on the general control device or the server of the cluster, and after the node host joins the kubernets cluster, the operation system state can be divided into the following steps according to the role and function of the node host: the system comprises a basic node, a guide node, a control plane node and a working node; the basic node is responsible for providing DNS service, load balancer and time synchronization service required by the cluster; the guide node is responsible for temporarily maintaining and coordinating the cluster state in the cluster deployment guide stage, and after the deployment is completed, the work is transferred to the control plane node; the control plane node is responsible for maintaining and coordinating the cluster state; the worker node is responsible for running the workload.
In the embodiment of the invention, the guide node is a node which temporarily exists in the guide stage of cluster deployment and is temporarily used as a control plane node to maintain and coordinate the cluster state, after the cluster deployment is finished, the work of maintaining and coordinating the cluster state is transferred to the control plane node, and the guide node is cancelled. That is, a certain node host is set as a boot node and a working node, and respectively works at different stages of cluster deployment.
In the embodiment of the invention, in a preset host list, a corresponding role is set for each node host, namely, a certain node host is used as a basic node, a guide node, a control plane node or a working node after being added into a cluster. Then, the operating system state of each node host in the cluster is recorded and registered, and the operating system state comprises the operating system version and the operating system configuration.
According to one implementation manner of the present invention, after the node host is cluster-bound in 230, the method further includes: obtaining an operating system version and operating system configuration of a node host; and when the operating system version or the operating system configuration of the node host does not match with the operating system version or the operating system configuration corresponding to the cluster, updating the operating system version and the operating system configuration of the node host.
In this embodiment of the present invention, an administrator may update the os version resource/configuration resource through an operation interface (e.g., browser 301) of the display device 130, at this time, the cluster may periodically or triggered perform an operation of checking the os version and os configuration of the node host, where during the periodic checking, a detection period is set according to an application scenario or experience of the actual cluster, during the triggered checking, when the os version resource/configuration resource is updated, an operation of acquiring the os version and os configuration of the node host may be triggered and executed, and when the os version or os configuration of the node host is not matched with the os version or os configuration corresponding to the cluster, an os state of the node host is updated.
According to one implementation of the present invention, updating the os version and os configuration of the node host comprises: setting the node host machine to be in a non-scheduling state, and expelling a container on the node host machine in the non-scheduling state; acquiring an operating system version image and an operating system configuration file corresponding to the cluster, and sending the operating system version image and the operating system configuration file to the node host so as to enable the node host to configure an operating system; and in response to the normal state of the operating system of the node host, canceling the non-dispatchable state of the node host.
In the embodiment of the invention, as for the whole Kubernets cluster, one or more node hosts may need to update the state of the operating system, and at this time, the node hosts (which can be called target node hosts) which need to update the state of the operating system in the cluster can be screened out, and the node hosts are coordinated to update the state of the operating system one by one according to a preset strategy; and screening out the node hosts needing the operating system state updating in the cluster, and simultaneously updating the operating system state. Firstly, setting a target node host to be in a non-dispatchable state; then evicting a container on the non-dispatchable node; pulling the latest operating system version mirror image/configuration so that the target node host updates the operating system version/configuration; triggering a target node host machine to restart; updating the state of the host operating system of the target node; and canceling the non-dispatchable state of the target node host after the operating system state of the target node host is normal.
In the embodiment of the invention, a certain node host can be moved out of a cluster, an exit node for exiting the cluster is preset in a host list, and then the corresponding terminal information of the exit node for exiting the cluster is deleted in a master control device or a server of the cluster, so that the binding relationship between the exit node and the cluster is removed.
The embodiment of the present invention takes a cluster architecture shown in fig. 3 as an example to describe a process of bringing an operating system of a node host into a Kubernetes cluster to perform resource management of the node host, where the cluster architecture includes three control plane nodes (control plane node 1, control plane node 2, and control plane node 3), a plurality of working nodes (working node 1, working node 2 … … working node n), and one base node. The basic node provides DNS service, load balancer and time synchronization service required by the cluster; the control plane nodes form a control plane of the cluster and are responsible for maintaining and coordinating the cluster state; the worker node is responsible for running the workload. The work for each type of node in the cluster and the requirement for the node host may be limited in advance by the specific requirement of the cluster, which is not the requirement for the resource management method for the node host in the embodiment of the present invention.
FIG. 4 is a logic flow diagram illustrating initialization of an operating system when a new node host joins a cluster. The following steps may be included.
410: and the master control equipment or the server side of the cluster pulls the latest operating system version mirror image.
420: and the master control equipment or the server side of the cluster acquires the latest operating system configuration file.
430: the operating system is installed and configured at the node host.
440: the node host joins the Kubernetes cluster.
450: and the master control equipment or the server side of the cluster checks the operating system version and the operating system configuration of the node host.
460: and registering the state of the node host operating system on the master control equipment or the server side of the cluster.
After checking the operating system version and operating system configuration of the node host, which relates to the process of updating the operating system state of the node host, fig. 5 is a logic flow diagram of the node host operating system state update. The following steps may be included.
501: the administrator updates the operating system version resources/configuration resources through a kubernets management interface.
502: the operating system version/configuration of each node host is obtained.
503: and screening out node hosts (target node hosts) which need to be subjected to state updating in the cluster, and coordinating the target node hosts to carry out state updating one by one.
504: and setting the target node host to be in a non-scheduling state.
505: a container on the non-dispatchable node is evicted.
506: the latest operating system version image/configuration is pulled.
507: updates are made to the operating system version/configuration of the target node host.
508: triggering the target node host machine to restart.
509: and updating the state of the host operating system of the target node.
510: and canceling the non-dispatchable state of the target node host after checking that the operating system state of the target node host is normal.
As shown in fig. 6, an embodiment of the present invention further provides a node host resource management apparatus 600, including: the system comprises a communication module 610, a resource management module 620, a binding module 630 and a registration module 640, wherein the communication module 610 is adapted to receive request information for applying for joining a cluster, which is sent by a node host; the resource management module 620 is adapted to acquire an operating system version image and an operating system configuration file corresponding to the cluster, and send the operating system version image and the operating system configuration file to the node host, so that the node host configures the operating system according to the operating system version image and the operating system configuration file, and the operating system state is kept consistent with the operating system states of other node machines in the cluster; a binding module 630, adapted to determine that the node host is configured with the operating system, and perform cluster binding on the node host; a registration module 640 adapted to register an operating system state of the node host.
The device in the embodiment of the invention further comprises: the updating module is suitable for acquiring the operating system version and the operating system configuration of the node host; and when the operating system version or the operating system configuration of the node host does not match with the operating system version or the operating system configuration corresponding to the cluster, updating the operating system version and the operating system configuration of the node host.
In the embodiment of the present invention, the update module is adapted to update the os version and os configuration of the node host: setting the node host machine to be in a non-scheduling state, and expelling a container on the node host machine in the non-scheduling state; acquiring an operating system version image and an operating system configuration file corresponding to the cluster, and sending the operating system version image and the operating system configuration file to the node host so as to enable the node host to configure an operating system; and in response to the normal state of the operating system of the node host, canceling the non-dispatchable state of the node host.
An embodiment of the present invention further provides a computing device, including: at least one processor and a memory storing program instructions; the program instructions, when read and executed by a processor, cause the computing device to perform the above-described node host resource management method.
Embodiments of the present invention further provide a readable storage medium storing program instructions, and when the program instructions are read and executed by a computing device, the computing device is enabled to execute the above node host resource management method.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to perform the node host resource management method of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose preferred embodiments of the invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed to reflect the intent: rather, the invention as claimed requires more features than are expressly recited in each claim.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore, may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Moreover, those skilled in the art will appreciate that although some embodiments described herein include some features included in other embodiments, not others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter.
Claims (6)
1. A node host resource management method, comprising:
receiving request information which is sent by a node host and applies for joining a cluster;
acquiring an operating system version image and an operating system configuration file corresponding to the cluster, and sending the operating system version image and the operating system configuration file to the node host, so that the node host configures an operating system according to the operating system version image and the operating system configuration file and keeps consistent with the operating system state of other node machines in the cluster;
determining that the node host is configured with an operating system, and performing cluster binding on the node host;
registering an operating system state of the node host;
after the cluster binding is performed on the node host, the method further comprises the following steps:
obtaining an operating system version and an operating system configuration of the node host;
when the operating system version or the operating system configuration of the node host is not matched with the operating system version or the operating system configuration corresponding to the cluster, updating the operating system version and the operating system configuration of the node host;
updating the operating system version and the operating system configuration of the node host comprises:
setting the node host to be in a non-dispatchable state, and evicting a container on the node host in the non-dispatchable state;
acquiring an operating system version image and an operating system configuration file corresponding to the cluster, and sending the operating system version image and the operating system configuration file to the node host so as to enable the node host to configure an operating system;
in response to the node host operating system state being normal, canceling the non-dispatchable state of the node host;
before cluster binding is carried out on the node host, the method comprises the following steps: authenticating the node host, wherein the authentication process comprises the following steps: judging whether the node host is in a host list of the cluster; when the node host is in the host list of the cluster, the authentication is successful; authentication fails when the node host is not in the host list of the cluster.
2. The method of claim 1, wherein determining that the node host configures the operating system to completion comprises:
receiving application information which is sent by a node host configuration operating system; or,
periodically communicating with the node host, detecting the operating system configuration condition of the node host, and determining that the node host is configured with the operating system under the condition that the operating system configuration condition indicates that the node host is configured with the operating system.
3. The method of claim 1, wherein when executing the exit of the node host from the cluster service, deleting the information of the node host, releasing the binding relationship between the node host and the cluster, and restoring the operating system configuration of the node host.
4. A node host resource management apparatus comprising:
the communication module is suitable for receiving request information which is sent by the node host and applies for joining the cluster;
the resource management module is suitable for acquiring an operating system version image and an operating system configuration file corresponding to the cluster, and sending the operating system version image and the operating system configuration file to the node host, so that the node host configures an operating system according to the operating system version image and the operating system configuration file and keeps consistent with the operating system state of other node machines in the cluster;
the binding module is suitable for determining that the configuration of the operating system by the node host is completed and performing cluster binding on the node host;
a registration module adapted to register an operating system state of the node host;
obtaining an operating system version and an operating system configuration of the node host;
when the operating system version or the operating system configuration of the node host is not matched with the operating system version or the operating system configuration corresponding to the cluster, updating the operating system version and the operating system configuration of the node host;
the update module is adapted to update the operating system version and the operating system configuration of the node host as follows:
setting the node host to be in a non-dispatchable state, and evicting a container on the node host in the non-dispatchable state;
acquiring an operating system version image and an operating system configuration file corresponding to the cluster, and sending the operating system version image and the operating system configuration file to the node host so as to enable the node host to configure an operating system;
in response to the node host operating system state being normal, canceling the non-dispatchable state of the node host;
before the binding module performs cluster binding on the node host, the method comprises the following steps: authenticating the node host, wherein the authentication process comprises the following steps: judging whether the node host is in a host list of the cluster; when the node host is in the host list of the cluster, the authentication is successful; authentication fails when the node host is not in the host list of the cluster.
5. A computing device, comprising:
at least one processor and a memory storing program instructions;
the program instructions, when read and executed by the processor, cause the computing device to perform the node host resource management method of any of claims 1-3.
6. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the node host resource management method of any of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211402041.4A CN115454580B (en) | 2022-11-10 | 2022-11-10 | Node host resource management method and device and computing equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211402041.4A CN115454580B (en) | 2022-11-10 | 2022-11-10 | Node host resource management method and device and computing equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115454580A CN115454580A (en) | 2022-12-09 |
CN115454580B true CN115454580B (en) | 2023-03-24 |
Family
ID=84295842
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211402041.4A Active CN115454580B (en) | 2022-11-10 | 2022-11-10 | Node host resource management method and device and computing equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115454580B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109167687B (en) * | 2018-09-05 | 2021-06-15 | 浪潮云信息技术股份公司 | Method and system for initializing physical server cluster network configuration in batch |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1848787A (en) * | 2006-04-30 | 2006-10-18 | 西安交通大学 | Automatic fast dispositioning method for aggregated server system node |
CN105119732A (en) * | 2015-06-30 | 2015-12-02 | 中标软件有限公司 | Device and method for distributing hosts in cluster environment |
CN105912371A (en) * | 2016-05-11 | 2016-08-31 | 广东浪潮大数据研究有限公司 | Method for automatically deploying operation systems on basis of CS mode |
CN109067599B (en) * | 2018-09-25 | 2021-06-18 | 浪潮云信息技术股份公司 | Cluster deployment method and device |
CN113645300B (en) * | 2021-08-10 | 2023-11-28 | 上海道客网络科技有限公司 | Intelligent node scheduling method and system based on Kubernetes cluster |
CN115048238A (en) * | 2022-06-29 | 2022-09-13 | 济南浪潮数据技术有限公司 | Node automatic recovery method, device, equipment and medium |
CN115268951A (en) * | 2022-07-22 | 2022-11-01 | 中科曙光国际信息产业有限公司 | Installation method, device, equipment and storage medium of operating system |
-
2022
- 2022-11-10 CN CN202211402041.4A patent/CN115454580B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109167687B (en) * | 2018-09-05 | 2021-06-15 | 浪潮云信息技术股份公司 | Method and system for initializing physical server cluster network configuration in batch |
Also Published As
Publication number | Publication date |
---|---|
CN115454580A (en) | 2022-12-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20240223563A1 (en) | Automatically Deployed Information Technology (IT) System and Method | |
CN108089913B (en) | Virtual machine deployment method of super-fusion system | |
CN106991035B (en) | Host monitoring system based on micro-service architecture | |
US10635423B2 (en) | Methods and apparatus for software lifecycle management of a virtual computing environment | |
US9307019B2 (en) | Apparatus, systems and methods for deployment and management of distributed computing systems and applications | |
CN105656646B (en) | A kind of dispositions method and device of Virtual NE | |
EP3618352B1 (en) | Virtual machine management | |
CN111273871B (en) | Method and device for dynamically allocating storage resources on container platform | |
WO2012054160A2 (en) | High availability of machines during patching | |
JP2003114801A (en) | System and method to automate management of computer services and programmable devices | |
EP3879875A1 (en) | Resource change method and device, apparatus, and storage medium | |
CN112035062B (en) | Migration method of local storage of cloud computing, computer equipment and storage medium | |
CN117908904B (en) | K8S cluster deployment and operation and maintenance management method and system | |
CN115480910A (en) | Multi-cluster resource management method and device and electronic equipment | |
US11609845B2 (en) | Configurable memory device connected to a microprocessor | |
US11295018B1 (en) | File system modification | |
CN115454580B (en) | Node host resource management method and device and computing equipment | |
EP4130982A1 (en) | Network-based solution module deployment platform | |
US11290318B2 (en) | Disaster recovery of cloud resources | |
CN106803786B (en) | Network element updating method and system based on network function virtualization | |
CN117389713B (en) | Storage system application service data migration method, device, equipment and medium | |
JP5781652B1 (en) | Stack management device, stack management method, and stack management program | |
CN116614323B (en) | Cloud storage enterprise network management method and system based on Rclone | |
CN113542019B (en) | Upgrading method and system for transfer control separation distributed CP | |
CN115484231B (en) | Pod IP distribution method and related device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |