A method, system, electronic device, and storage medium for deploying bare metal nodes.
By pre-establishing a mapping table between bare metal nodes and configuration specifications, the target node can be directly searched and deployed from the table, solving the problem of cumbersome deployment process in existing technologies and achieving efficient bare metal node deployment.
Patent Information
- Application Number
- CN202511589560.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-11-03
AI Technical Summary
The deployment process of bare metal nodes in the existing technology is cumbersome, requiring multiple modules to interact repeatedly, resulting in low deployment efficiency.
A target mapping table is pre-established to record the correspondence between bare metal nodes and configuration specifications. When a user makes a request, the target bare metal node is directly searched from the table and deployed, reducing module interaction.
It improves the deployment efficiency and stability of bare metal nodes, reduces scheduling time consumption and service anomaly dependencies, and enhances the user experience.
Smart Images

Figure CN121050837B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a bare metal node deployment method, system, electronic device, and storage medium. Background Technology
[0002] With the rapid development of cloud computing technology, bare metal service is a computing service that combines the elasticity of virtual machines and the performance of physical machines. To realize bare metal service, the operating system needs to be remotely deployed to physical nodes such as bare metal nodes, so that the bare metal node can become a dedicated cloud physical server for individuals or enterprises.
[0003] In related technologies, the Nova service of the OpenStack cloud computing platform is typically used to sequentially filter the configurations of existing bare metal nodes by calling multiple related modules to select bare metal nodes that meet the specifications specified by the current user. The entire filtering process is cumbersome and requires multiple interactions between multiple related modules, which reduces the deployment efficiency of bare metal nodes. Summary of the Invention
[0004] This application provides a bare metal node deployment method, system, electronic device, and storage medium to at least solve the problem of reduced deployment efficiency of bare metal nodes in related technologies.
[0005] This application provides a method for deploying bare metal nodes, the method comprising:
[0006] Obtain attribute information and various configuration specifications for multiple bare metal nodes;
[0007] Based on the attribute information of multiple bare metal nodes and various configuration specifications, a target mapping table is established; the target mapping table includes the mapping relationship between each bare metal node and the configuration specification.
[0008] Obtain the user's bare metal node deployment request; wherein, the bare metal node deployment request includes at least the target configuration specification;
[0009] Search the target configuration specification in the target mapping table to identify the target bare metal nodes that correspond to the target configuration specification;
[0010] In response to a bare metal node deployment request, deploy the target bare metal node.
[0011] This application also provides a bare metal node deployment device, the device comprising:
[0012] The first acquisition module is used to acquire attribute information and various configuration specifications of multiple bare metal nodes;
[0013] A module is established to create a target mapping table based on the attribute information of multiple bare metal nodes and various configuration specifications; the target mapping table includes the mapping relationship between each bare metal node and the configuration specification.
[0014] The second acquisition module is used to acquire the user's bare metal node deployment request; wherein, the bare metal node deployment request includes at least the target configuration specification;
[0015] The determination module is used to search the target configuration specification in the target mapping table to determine the target bare metal node that has a corresponding relationship with the target configuration specification.
[0016] The deployment module is used to deploy the target bare metal node in response to a bare metal node deployment request.
[0017] This application also provides a bare metal node deployment system, which includes: multiple bare metal nodes and deployment devices;
[0018] The bare metal nodes are deployed using any of the bare metal node deployment methods described above.
[0019] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the bare metal node deployment methods described above.
[0020] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described bare metal node deployment methods.
[0021] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described bare metal node deployment methods.
[0022] By using this application, since a target mapping table is pre-established, which includes the mapping relationship between each bare metal node and the configuration specification, when a user needs to deploy a bare metal node for any target configuration specification, they can directly search for the target bare metal node corresponding to the target configuration specification from the target mapping table, and then deploy the target bare metal node. This process does not require multiple interactions between multiple related modules, thus improving the deployment efficiency of bare metal nodes. Attached Figure Description
[0023] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 A flowchart illustrating the bare metal node deployment method provided in this application embodiment;
[0025] Figure 2 A schematic diagram of the component interaction process in an exemplary bare metal node deployment method provided in this application embodiment;
[0026] Figure 3 This is a schematic diagram of the bare metal node deployment device provided in the embodiments of this application;
[0027] Figure 4 This is a schematic diagram of the bare metal node deployment system provided in the embodiments of this application;
[0028] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0030] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0031] The bare metal scheduling process is described below:
[0032] 1. The user first specifies the cloud physical machine specifications and sends a bare metal deployment request to nova-api (nova application programming interface).
[0033] 2. nova-api records basic information of cloud physical machines and calls nova-conductor (nova conductor) to issue bare metal node deployment requests.
[0034] 3. nova-conductor calls nova-scheduler (nova scheduler) to schedule bare metal nodes.
[0035] 4. nova-scheduler calls placement (resource placement service) to filter candidate bare metal nodes that meet the cloud physical machine specifications. Then, all candidate bare metal nodes are filtered by resources such as CPUFilter (Central Processing Unit Filter), MemFilter (Memory Filter), and DiskFilter (Disk Filter) to select a set of computing nodes with sufficient resources. Among the computing nodes that meet the resource requirements, a series of weight calculations are performed on CPUWeight (Central Processing Unit Weight), MemWeight (Memory Weight), and DiskWeight (Disk Weight). Finally, the bare metal node with the highest CPU, memory, and disk weights is selected and returned to nova-conductor.
[0036] 5. Nova-conductor receives the bare metal node information and calls nova-compute to deploy the bare metal.
[0037] 6. nova-compute sends bare metal deployment requests by calling ironic-api (ironic application programming interface) through ironicdriver.
[0038] The entire process involves calling multiple related modules of the Nova service to sequentially filter the configurations of existing bare metal nodes to select those that meet the user's specified specifications. This filtering process is cumbersome and requires multiple interactions between related modules, reducing the deployment efficiency of bare metal nodes.
[0039] To address the aforementioned technical problems, embodiments of this application provide a bare metal node deployment method, system, electronic device, and storage medium. The method includes: acquiring attribute information and multiple configuration specifications of multiple bare metal nodes; establishing a target mapping table based on the attribute information and configuration specifications of the multiple bare metal nodes; wherein the target mapping table includes the mapping relationship between each bare metal node and a configuration specification; acquiring a user's bare metal node deployment request; wherein the bare metal node deployment request includes at least a target configuration specification; searching the target configuration specification in the target mapping table to determine the target bare metal node that corresponds to the target configuration specification; and deploying the target bare metal node in response to the bare metal node deployment request. The method provided by the above solution, since a target mapping table is pre-established and includes the mapping relationship between each bare metal node and a configuration specification, allows a user to directly search for the target bare metal node corresponding to any target configuration specification when they need to deploy a bare metal node for any target configuration specification, and then deploy the target bare metal node. This process does not require multiple interactions between multiple related modules, thus improving the deployment efficiency of bare metal nodes.
[0040] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0041] This application provides a bare metal node deployment method for rapid deployment of bare metal nodes. The execution subject of this application embodiment is an electronic device, such as a server, desktop computer, laptop computer, tablet computer, or other electronic devices that can be used for bare metal node deployment.
[0042] like Figure 1 The diagram shown is a flowchart illustrating a bare metal node deployment method provided in an embodiment of this application. The method includes:
[0043] Step 101: Obtain the attribute information and various configuration specifications of multiple bare metal nodes.
[0044] Among them, bare metal nodes are physical servers without an operating system installed. Their hardware configuration determines the types of services they can support. Configuration specifications are used to uniformly describe the hardware configuration of bare metal nodes.
[0045] Step 102: Establish a target mapping table based on the attribute information of multiple bare metal nodes and various configuration specifications.
[0046] The target mapping table includes the mapping between each bare metal node and its configuration specifications. The attribute information of the bare metal node includes at least the hardware resource configuration details, such as CPU model, number of cores, memory capacity, memory type, disk capacity, disk type, and network card model.
[0047] Specifically, considering the limited number of bare metal nodes in the cloud platform and the relatively fixed specifications of cloud physical machines, to eliminate the need for scheduling bare metal nodes using the same methods as Nova modules for scheduling virtual machines, a bare metal hardware resource discovery function is used to store the correspondence between bare metal node information and bare metal specifications—essentially establishing a target object relationship table. Subsequently, the necessary bare metal nodes can be quickly retrieved and deployed based on this correspondence, significantly reducing the time consumption associated with bare metal scheduling. This also reduces the coupling between message queues and Nova components, minimizes abnormal dependencies between services, improves the efficiency and stability of bare metal deployment, and enhances the user experience. In other words, because the target correspondence table stores the mapping between nodes and specifications in advance, subsequent scheduling does not require calling nova-scheduler; it directly matches data through table queries, reducing scheduling time.
[0048] Step 103: Obtain the user's bare metal node deployment request.
[0049] The bare metal node deployment request must include at least the target configuration specification.
[0050] Specifically, users can initiate requests through the front-end interface or API of the OpenStack cloud platform. Instead of sending requests to nova-api as in the original logic, users can submit requests directly through the ironic-api interface (bare metal node deployment interface).
[0051] Step 104: Search the target configuration specification in the target correspondence table to determine the target bare metal node that has a corresponding relationship with the target configuration specification.
[0052] Specifically, by searching the target configuration specification in the target mapping table, at least one target bare metal node associated with the target configuration specification can be found in the pre-existing target mapping table;
[0053] Step 105: In response to the bare metal node deployment request, deploy the target bare metal node.
[0054] When the target bare metal node is not unique, it can be deployed according to the storage order of the table or by randomly selecting one of the target bare metal nodes.
[0055] Based on the above embodiments, as an implementable approach, in one embodiment, a target mapping table is established according to the attribute information of multiple bare metal nodes and various configuration specifications, including:
[0056] Step 1021: For any bare metal node, determine the configuration specifications corresponding to the bare metal node based on the specification information represented by the attribute information of the bare metal node.
[0057] Step 1022: Determine the unique identifier of the correspondence between the bare metal node and the configuration specification based on the unique identifier of the configuration specification and the unique identifier of the node represented by the attribute information of the bare metal node.
[0058] Step 1023: Establish a target correspondence table based on the unique identifier of the correspondence between bare metal nodes and configuration specifications, the unique identifier of the configuration specifications, and the unique identifier of the bare metal nodes.
[0059] Specifically, the system first performs bare metal hardware resource discovery, automatically collecting bare metal specification information. Two new tables are added to the existing logic: the `bare_flavor` table (bare metal specification information) and the `bare_node_flavor` table (target mapping). `bare_flavor` records the bare metal node specification information, and `bare_node_flavor` records the mapping between specifications and bare metal nodes; one specification can correspond to multiple bare metal nodes.
[0060] For example, the bare metal specification information table is shown in Table 1 below:
[0061] Table 1 Bare Metal Specifications
[0062]
[0063] The bare metal information table, bare_node, is shown in Table 2 below:
[0064] Table 2 Bare Metal Information Table
[0065]
[0066] The target correspondence table is shown in Table 3 below:
[0067] Table 3 Target Correspondence Table
[0068]
[0069] Specifically, first, the attribute information of any bare metal node is extracted from the `bare_node` table. Second, all preset configuration specifications are retrieved from the `bare_flavor` table, and the hardware parameters of each configuration specification are extracted. Finally, by comparing the node attribute information with the hardware parameters of each configuration specification, the configuration specification corresponding to each bare metal node is determined. The specification unique identifier (specification ID) is obtained from the `bare_flavor` table, and the node unique identifier is obtained from the `bare_node` table. A unique identifier for the corresponding relationship is generated through regularized encoding, such as using a combination encoding rule of specification unique identifier + node unique identifier, to ensure that each specification and node correspondence has a unique code. Finally, by establishing the correspondence between the unique identifiers for the correspondence between bare metal nodes and configuration specifications, the specification unique identifiers for configuration specifications, and the node unique identifiers for bare metal nodes, a target correspondence table is established.
[0070] Specifically, in one embodiment, a unique identifier for the target specification can be determined based on the target configuration specification; the unique identifier for the target specification can be searched in the target correspondence table to determine a unique identifier for the target correspondence (bare metal and specification association ID); the unique identifier for the target node (bare metal node ID) can be determined based on the unique identifier for the target correspondence; and the unique identifier for the target node can be determined based on the unique identifier for the target bare metal node that has a corresponding relationship with the target configuration specification.
[0071] For example, taking three bare metal nodes node1, node2, and node3 with specifications flavor1, flavor2, and flavor3 respectively, if the target configuration specification is determined to be flavor1, the unique identifier of the target specification corresponding to flavor1 is searched in the target correspondence table, and then the unique identifier of the target correspondence corresponding to the unique identifier of the target specification is determined, thereby determining the unique identifier of the target bare metal node that has a correspondence with the target configuration specification.
[0072] In this way, by converting the target configuration specification into a unique identifier for the target specification, matching errors caused by name ambiguity are avoided, thus ensuring the accuracy of the target bare metal node screening results.
[0073] Accordingly, in one embodiment, if there is no target bare metal node corresponding to the target configuration specification in the target mapping table, the bare metal node deployment process is terminated and a termination signal is reported.
[0074] Specifically, if there is no target bare metal node in the target mapping table that corresponds to the target configuration specification, it indicates that there is currently no target bare metal node that meets the user's configuration requirements. Therefore, the bare metal node deployment process is terminated and a termination signal is reported.
[0075] For example, when requesting to deploy a bare metal node using the bare metal specification flavor1, bare metal node1 is selected for deployment, and an operating system is installed. When deploying bare metal again using the flavor1 bare metal specification, if no bare metal node meets the requirements, the scheduling fails, terminating the bare metal node deployment process and issuing a termination signal. When deploying a bare metal node using the bare metal specification flavor2, bare metal node node2 is selected for deployment, and an operating system is installed. When deploying a bare metal node using the bare metal specification flavor3, bare metal node node3 is selected for deployment, and an operating system is installed.
[0076] Furthermore, in one embodiment, the popular and scarce configuration specification can be determined based on the termination status of the bare metal node deployment process; the remaining bare metal nodes are then configured according to the popular and scarce configuration specification to change their configuration to the popular and scarce configuration specification.
[0077] For example, we can periodically analyze which configuration has the most termination signals. For instance, if flavor3 (with an A100 GPU) terminates 10 times a day, while other configurations terminate at most 2 times, then flavor3 is the popular and scarce configuration. For example, if there are node1 (flavor1), node2 (flavor2), and node3 (flavor3), and many users want flavor3, but node3 is already in use, subsequent requests for flavor3 will be terminated. The system will then analyze this and find flavor3 to be the popular and scarce configuration. Since node1 was originally flavor1 without a GPU accelerator card, if it has a spare GPU slot (hardware expansion supported), it becomes a remaining node that can be reconfigured. We can then modify the hardware of node1 to flavor3, i.e., install an NVIDIA GPU A100 40G accelerator card in node1. After the modification, node1 changes from flavor1 to flavor3, solving the subsequent deployment needs of flavor3 users without waiting for new bare metal nodes, laying the foundation for further improving the deployment efficiency of bare metal nodes.
[0078] Specifically, in one embodiment, user bare metal deployment history, business trends, industry hotspots, and other information can be used as training samples for a machine learning model, enabling the trained model to predict which configuration will become popular and scarce within the next week. If it is predicted that flavor3 will become popular and scarce, instead of waiting until deployment ends to change nodes, some flexible remaining bare metal nodes, such as those with sufficient memory and pluggable GPUs, can be selected in advance. GPUs can then be added to these nodes in advance to convert them to flavor3 configuration, thus avoiding situations where user deployment needs cannot be met and further improving the configuration efficiency of bare metal nodes.
[0079] Accordingly, in one embodiment, when the configuration of any bare metal node is modified, the target mapping table is modified synchronously.
[0080] Specifically, first, in the target correspondence table, find the original record of node1. Since node1 is no longer flavor1, delete this record and add a new record to record the flavor3 corresponding to node1.
[0081] Furthermore, in one embodiment, before deploying the target bare metal node in response to the bare metal node deployment request, the state information of the target bare metal node is obtained; if the state information indicates that the target bare metal node is currently in the target state, the step of deploying the target bare metal node in response to the bare metal node deployment request is performed.
[0082] It should be noted that, in this embodiment of the application, the bare metal status in the bare_node table is first ensured to be in the manageable state (target state), and the bare metal specification bare_flavor, the correspondence between bare metal specification and bare metal node bare_node_flavor data is accurate.
[0083] Specifically, to further ensure the security of bare metal node deployment, before deploying the target bare metal node in response to a deployment request, the status information of the target bare metal node is obtained to further verify its status. If the status information indicates that the target bare metal node is currently in the target state, the steps of deploying the target bare metal node in response to the deployment request are executed. If the target bare metal node is not currently in the target state, but is in a powered-off or running state, an error message is reported to indicate that the current state of the target bare metal node does not meet the configuration requirements.
[0084] Based on the above embodiments, as one implementable approach, in one embodiment, in response to a bare metal node deployment request, deploying a target bare metal node includes:
[0085] Step 1051: Determine the operating system to be installed based on the bare metal node deployment request;
[0086] Step 1052: Call the bare metal node deployment interface;
[0087] Step 1053: Install the operating system to be installed to the target bare metal node through the bare metal node deployment interface.
[0088] The bare metal node deployment interface, also known as the ironic-api interface, is the dedicated command entry point for bare metal node deployment in OpenStack. All deployment operations, such as switching networks and installing operating systems, are initiated through it. The bare metal node deployment interface is also referred to as the deployment interface.
[0089] Specifically, in one embodiment, before installing the operating system to be installed onto the target bare metal node through the bare metal node deployment interface, a first deployment request is sent to a preset network component through the bare metal node deployment interface, so that the preset network component responds to the first deployment request and switches the network where the target bare metal node is located to a dedicated deployment network; a second deployment request is sent to the preset network component through the bare metal node deployment interface, so that the preset network component responds to the second deployment request and configures the Dynamic Host Configuration Protocol (DHCP) service; the target boot file is configured on a file server, so that the target bare metal node restarts based on the target boot file in a pre-boot execution environment; after the target bare metal node restarts, it broadcasts a target address allocation request to the dedicated deployment network, so that the DHCP service responds to the target address allocation request and allocates a network access address to the target bare metal node.
[0090] The default network component is Neutron, OpenStack's network management module, responsible for network switching of bare metal nodes, DHCP service (Dynamic Host Configuration Protocol) configuration, etc. The file server is TFTP Server, used to store PXE boot files (target boot files), supporting bare metal nodes to boot via the pre-boot execution environment (PXE).
[0091] For example, such as Figure 2The diagram illustrates the component interaction flow in an exemplary bare metal node deployment method provided in this application embodiment. First, a target mapping table is established based on the bare metal hardware resource discovery function. After the user initiates a deployment request through the interface, the bare metal node deployment interface sends a first deployment request to Neutron. Upon receiving the first deployment request, Neutron switches the target bare metal node's network to a dedicated deployment network. This network is an isolated network specifically designed for bare metal deployment, avoiding traffic conflicts with the business network during deployment. Further, the bare metal node deployment interface (Ironic) sends a second deployment request to Neutron. Neutron configures a Dynamic Host Configuration Protocol (DHCP) service in the dedicated deployment network. The DHCP service assigns temporary IP addresses to the bare metal node, enabling it to access the network and download image files during the deployment phase. Ironic uploads the target boot file (PXE boot file) to the TFTP Server and sends instructions to the bare metal node to boot from PXE and restart. After restarting, the bare metal node enters the pre-boot execution environment (PXE), downloads the boot file from the TFTP Server via the network, and completes initialization. PXE booting is the core technology of bare-metal diskless deployment, enabling nodes to start without relying on local disks, thus improving deployment efficiency. After restarting in a PXE environment, the bare-metal node broadcasts a target address allocation request to the dedicated deployment network. The Neutron-configured DHCP service responds to the request, assigning a temporary IP address (network access address) to the node.
[0092] Specifically, in one embodiment, the following steps can be taken: obtaining the image file of the operating system to be installed; writing the image file of the operating system to be installed to the local disk of the target bare metal node; switching the target bare metal node from a dedicated deployment network to a tenant network based on a preset network component; and controlling the target bare metal node to boot from the local disk through the bare metal node deployment interface, so as to install the operating system to be installed to the target bare metal node by loading the image file of the operating system to be installed from the local disk.
[0093] Specifically, in one embodiment, an initial memory disk can be loaded on the target bare metal node based on the target boot file; a temporary system can be deployed on the target bare metal node based on the initial memory disk; and an agent program based on the temporary system can download the operating system image file to be installed from the image service component.
[0094] For example, such as Figure 2As shown, after the bare metal node boots via PXE, it loads an initial ramdisk. The ramdisk is a small, temporary system running in memory, which deploys a temporary system (such as the Ironic Python Agent) on the node. The agent program in this temporary system (Ironic Python Agent, or IPA for short) requests Glance (the image service component) to download the operating system image file to be installed and writes the image to the bare metal node's local disk. After the image is written, Ironic sends a request to Neutron through the deployment interface to switch the bare metal node's network from the dedicated deployment network to the tenant network. Subsequently, Ironic sends instructions to the node to boot from the local disk, load the operating system image from the local disk, and complete the system installation. Figure 2 After each step of the process is completed, the backend will return feedback to the frontend that sent the request.
[0095] Specifically, such as Figure 2 As shown, the entire process drives Neutron, TFTP Server, and Glance to work together through Ironic's deployment interface, bypassing the complex links of nova-api, nova-conductor, and nova-scheduler in native OpenStack. This reduces component coupling and interaction time, decreases bare metal scheduling time, and reduces service anomaly dependencies. It automates network switching, DHCP configuration, PXE booting, and image downloading, reducing manual intervention and further improving deployment efficiency.
[0096] The bare metal node deployment method provided in this application involves: acquiring attribute information and various configuration specifications of multiple bare metal nodes; establishing a target mapping table based on the attribute information and configuration specifications of the multiple bare metal nodes; acquiring a user's bare metal node deployment request; the bare metal node deployment request including at least a target configuration specification; searching the target configuration specification in the target mapping table to determine the target bare metal node corresponding to the target configuration specification; and deploying the target bare metal node in response to the bare metal node deployment request. Because the above solution provides a pre-established target mapping table, which includes the correspondence between each bare metal node and configuration specification, when a user needs to deploy a bare metal node for any target configuration specification, they can directly search the target bare metal node corresponding to that target configuration specification from the target mapping table and then deploy the target bare metal node. This process does not require multiple interactions between multiple related modules, thus improving the deployment efficiency and stability of bare metal nodes.
[0097] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0098] Embodiments of this application also provide a bare metal node deployment apparatus for executing the bare metal node deployment method provided in the above embodiments.
[0099] like Figure 3 The diagram shown is a structural schematic of a bare metal node deployment device provided in an embodiment of this application. The bare metal node deployment device 30 includes: a first acquisition module 301, an establishment module 302, a second acquisition module 303, a determination module 304, and a deployment module 305.
[0100] The system comprises: a first acquisition module for acquiring attribute information and various configuration specifications of multiple bare metal nodes; an establishment module for establishing a target mapping table based on the attribute information and configuration specifications of the multiple bare metal nodes, wherein the target mapping table includes the mapping relationship between each bare metal node and the configuration specification; a second acquisition module for acquiring a user's bare metal node deployment request, wherein the bare metal node deployment request includes at least a target configuration specification; a determination module for searching for the target configuration specification in the target mapping table to determine the target bare metal node that has a corresponding relationship with the target configuration specification; and a deployment module for deploying the target bare metal node in response to the bare metal node deployment request.
[0101] For a description of the features in the embodiment corresponding to the bare metal node deployment device, please refer to the relevant description in the embodiment corresponding to the bare metal node deployment method, which will not be repeated here.
[0102] Embodiments of this application also provide a bare metal node deployment system for executing the bare metal node deployment method provided in the above embodiments.
[0103] like Figure 4 The diagram shown is a structural schematic of a bare metal node deployment system provided in an embodiment of this application. The bare metal node deployment system includes: multiple bare metal nodes and deployment devices.
[0104] The bare metal node is deployed using the bare metal node deployment method provided in the above embodiments.
[0105] For a description of the features in the embodiments corresponding to the bare metal node deployment system, please refer to the relevant descriptions in the embodiments corresponding to the bare metal node deployment method, which will not be repeated here.
[0106] Embodiments of this application also provide an electronic device, such as... Figure 5The diagram shown is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, including a processor 10 and a memory 20. The memory 20 stores a computer program, and the processor 10 is configured to run the computer program to execute the steps in any of the bare metal node deployment method embodiments described above.
[0107] Embodiments of this application also provide a computer-readable storage medium storing a computer program configured to execute the steps in any of the bare metal node deployment method embodiments described above when running.
[0108] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0109] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the bare metal node deployment method embodiments described above.
[0110] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the bare metal node deployment method embodiments described above.
[0111] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0112] The foregoing has provided a detailed description of a bare metal node deployment method, system, electronic device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to aid in understanding the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A bare metal node deployment method, characterized by, The method comprises: obtaining attribute information and multiple configuration specifications of multiple bare metal nodes; establishing a target correspondence table according to the attribute information and multiple configuration specifications of the multiple bare metal nodes; wherein the target correspondence table comprises a correspondence between each bare metal node and a configuration specification; Obtaining a bare metal node deployment request of a user; wherein the user directly submits the bare metal node deployment request through an ironic interface An API submits the bare metal node deployment request, which at least includes a target configuration specification; searching for the target configuration specification in the target correspondence table to determine a target bare metal node corresponding to the target configuration specification; in response to the bare metal node deployment request, deploying the target bare metal node; wherein all bare metal node deployment operations are through an ironic api initiation; the step of establishing a target correspondence table according to the attribute information and multiple configuration specifications of the multiple bare metal nodes comprises: for any bare metal node, determining a configuration specification corresponding to the bare metal node according to the specification information represented by the attribute information of the bare metal node; adding a bare metal specification information table to record the specification information of the bare metal node; generating a correspondence unique identifier between the bare metal node and the configuration specification through regular encoding according to the specification unique identifier of the configuration specification and the node unique identifier represented by the attribute information of the bare metal node; wherein the specification unique identifier is obtained from the bare metal specification information table, and the node unique identifier is obtained from a bare metal information table; establishing a target correspondence table according to the correspondence unique identifier between the bare metal node and the configuration specification, the specification unique identifier of the configuration specification, and the node unique identifier of the bare metal node.
2. The method of claim 1, wherein, the step of searching for the target configuration specification in the target correspondence table to determine a target bare metal node corresponding to the target configuration specification comprises: determining a target specification unique identifier corresponding to the target configuration specification; searching for the target specification unique identifier in the target correspondence table to determine a target correspondence unique identifier; determining a target node unique identifier corresponding to the target correspondence unique identifier; determining a target bare metal node corresponding to the target configuration specification according to the target node unique identifier.
3. The method of claim 1, wherein, The method further comprises: in the case where there is no target bare metal node corresponding to the target configuration specification in the target correspondence table, terminating a bare metal node deployment process and issuing a termination signal.
4. The method of claim 3, wherein, The method further comprises: determining a popular short configuration specification according to the termination of the bare metal node deployment process; modifying the configuration of the remaining bare metal nodes to the popular short configuration specification according to the popular short configuration specification.
5. The method of claim 4, wherein, The method further comprises: when any of the bare metal nodes is modified, synchronously modifying the target correspondence table.
6. The method of claim 1, wherein, Before deploying the target bare metal node in response to the bare metal node deployment request, the method further comprises: obtaining state information of the target bare metal node; in the case where the state information represents that the target bare metal node is currently in a target state, performing the step of deploying the target bare metal node in response to the bare metal node deployment request.
7. The method of claim 1, wherein, the step of deploying the target bare metal node in response to the bare metal node deployment request comprises: According to the bare metal node deployment request, determine an operating system to be installed; Call a bare metal node deployment interface; Install the operating system to be installed to the target bare metal node through the bare metal node deployment interface.
8. The method of claim 7, wherein, Before installing the operating system to be installed to the target bare metal node through the bare metal node deployment interface, the method further comprises: Through the bare metal node deployment interface, send a first deployment request to a preset network component, so that the preset network component switches a network where the target bare metal node is located to a deployment dedicated network in response to the first deployment request; Through the bare metal node deployment interface, send a second deployment request to a preset network component, so that the preset network component configures a dynamic host configuration protocol service in response to the second deployment request; Configure a target start file to a file server, so that the target bare metal node restarts in a pre-boot execution environment based on the target start file; After the target bare metal node restarts, broadcast a target address allocation request to the deployment dedicated network, so that the dynamic host configuration protocol service allocates a network access address for the target bare metal node in response to the target address allocation request.
9. The method of claim 8, wherein, The installing the operating system to be installed to the target bare metal node through the bare metal node deployment interface comprises: Obtain an operating system image file to be installed; Write the operating system image file to be installed to a local disk of the target bare metal node; Switch the target bare metal node from the deployment dedicated network to a tenant network based on the preset network component; Control the target bare metal node to start from the local disk through the bare metal node deployment interface, so as to install the operating system to be installed to the target bare metal node by loading the operating system image file to be installed from the local disk.
10. The method of claim 9, wherein, The obtaining the operating system image file to be installed comprises: Load an initial memory disk on the target bare metal node based on the target start file; Deploy a temporary system on the target bare metal node based on the initial memory disk; Download the operating system image file to be installed from an image service component based on an agent program of the temporary system.
11. A bare metal node deployment system, characterized by The system comprises a plurality of bare metal nodes and a deployment device; The deployment device adopts the bare metal node deployment method according to any one of claims 1 to 10 to deploy the bare metal nodes.
12. An electronic device, comprising: Comprise: A memory for storing a computer program; A processor for implementing the steps of the bare metal node deployment method according to any one of claims 1 to 10 when executing the computer program.
13. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, wherein the computer program is executed by the processor to implement the steps of the bare metal node deployment method according to any one of claims 1 to 10.
14. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the bare metal node deployment method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Method and device for issuing real-time application cluster instance resources
CN113656181A
Deployment method and device of bare metal server and computer equipment
CN119556947A