Equipment configuration method and computing equipment
By automating the execution of bare-metal operating system, system configuration, and application deployment through computing devices, the problem of low bare-metal deployment efficiency is solved, achieving efficient and accurate bare-metal configuration, and making it suitable for large-scale bare-metal management and deployment.
Patent Information
- Application Number
- CN202511398617.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2026-02-10
AI Technical Summary
In existing technologies, bare-metal deployment relies on manual intervention, resulting in low deployment efficiency and a high risk of errors, which affects product delivery.
By parsing configuration requests through computing devices, parameter configuration is automatically executed in the order of multiple deployment stages, including operating system deployment, system configuration, and application deployment, thus achieving automated bare-metal configuration.
It improves the efficiency and accuracy of bare-metal deployment, ensures data consistency and accuracy during the deployment process, lowers the technical threshold, and has high scalability and flexibility.
Smart Images

Figure CN121509219A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computing device technology, and in particular to a device configuration method and a computing device. Background Technology
[0002] As enterprises continue their digital transformation, the scale and complexity of data centers and private cloud environments are constantly expanding. Against this backdrop, enterprises are placing higher demands on the efficient management of large-scale bare metal server resources, while also requiring rapid deployment of these bare metal servers to enable them to provide business services and facilitate the delivery of products that meet customers' personalized needs.
[0003] Currently, the deployment of bare metal largely relies on manual intervention, which is a cumbersome process that leads to low deployment efficiency and a high risk of errors, affecting product delivery. Summary of the Invention
[0004] This application provides a device configuration method and a computing device, which can improve the efficiency and accuracy of deployment in bare-metal deployment scenarios.
[0005] In a first aspect, the device configuration method provided in this application embodiment is applied to a computing device, which is communicatively connected to a bare machine. The method includes: responding to a received configuration request and parsing the configuration request to obtain configuration parameters; wherein the configuration request is used to request configuration of the bare machine; the configuration parameters include: multiple deployment stages required to configure the bare machine, and parameters corresponding to each deployment stage; configuring the bare machine sequentially using the parameters corresponding to each deployment stage according to the deployment order of the multiple deployment stages, and the configured bare machine has the ability to provide business services.
[0006] The device configuration method provided in this application embodiment involves a computing device parsing a configuration request to obtain multiple deployment stages and parameters corresponding to each deployment stage. Further, the computing device configures the bare metal according to the deployment order of the multiple deployment stages, sequentially using the parameters corresponding to each deployment stage, so that the bare metal has the ability to provide business services. This application embodiment's solution links multiple deployment stages into a continuous process, allowing the computing device to automatically execute multiple deployment stages in the deployment order to configure the bare metal, thereby effectively improving deployment efficiency. In addition, this application embodiment configures parameters for multiple deployment stages simultaneously with a single configuration request, avoiding the need for manual configuration by the user at each stage as in the prior art. This ensures the consistency and accuracy of data throughout the deployment process, thereby guaranteeing the correct deployment of the bare metal.
[0007] In one possible implementation, the deployment phases include a first deployment phase, a second deployment phase, and a third deployment phase. Following the deployment order of these phases, the bare metal is configured sequentially using the parameters corresponding to each deployment phase. This includes: deploying an operating system on the bare metal according to the first configuration parameters corresponding to the first deployment phase; after the operating system deployment is complete, configuring the bare metal with the deployed operating system according to the second configuration parameters corresponding to the second deployment phase; and after system configuration, deploying applications on the bare metal according to the third configuration parameters corresponding to the third deployment phase.
[0008] In another possible implementation, the first deployment phase deploys the operating system on bare metal, the second deployment phase configures the bare metal with the operating system deployed, and the third deployment phase deploys applications on the configured bare metal. During the operating system deployment process, the use of an operating system template ensures deployment quality and configuration consistency. By employing the first configuration parameters, the ability to customize according to specific user needs is retained, achieving a balance between standardization and flexibility.
[0009] In another possible implementation, the operating system is deployed on bare metal according to the first configuration parameters corresponding to the first deployment stage in the configuration parameters. This includes: generating a first configuration file based on the first configuration parameters and the operating system template; running the first configuration file to transfer a boot file and an operating system image file to the bare metal, so that the bare metal runs the operating system image file according to the boot file to deploy the operating system on the bare metal. Through the above steps, a specific method for automatically deploying an operating system on bare metal is provided to improve the feasibility of this solution.
[0010] In another possible implementation, the computing device is configured with DHCP, TFTP, and HTTP services; a first configuration file is run to transfer boot files and operating system image files to the bare metal, including: running the first configuration file, assigning an IP address to the bare metal via DHCP service after the bare metal boots up; transferring boot files to the bare metal via TFTP service based on the IP address; and transferring the image file to the bare metal via HTTP service based on the IP address.
[0011] In another possible implementation, system configuration is performed on the bare metal machine with the operating system deployed, based on the second configuration parameters corresponding to the second deployment stage in the configuration parameters. This includes: generating a second configuration file based on the second configuration parameters and the system configuration template; running the second configuration file and configuring the second configuration parameters to take effect on the bare metal machine via the Secure Shell SSH protocol, thereby performing system configuration on the bare metal machine with the operating system deployed. Through the above steps, a specific method for automating system configuration on bare metal is provided to improve the feasibility of this solution.
[0012] In another possible implementation, the bare metal machine forms a distributed management system with other bare metal machines. Based on the third configuration parameters corresponding to the third deployment phase in the configuration parameters, the application is deployed on the bare metal machine, including: determining the node type of the bare metal machine in the distributed management system based on the third configuration parameters; and deploying the application on the bare metal machine according to the deployment strategy corresponding to the node type. Through the above steps, a specific method for automatically deploying applications on bare metal machines is provided to improve the feasibility of this solution.
[0013] In another possible implementation, the application is installed on the operating system according to the deployment strategy corresponding to the node type, including: if the node type is a management node, the application's management component is deployed on the bare metal; if the node type is a worker node, the application's worker component is deployed on the bare metal; and if the node type is a storage node, the application's storage component is deployed on the bare metal.
[0014] Another possible implementation includes: detecting whether each deployment stage in multiple deployment phases was successful; and, in the event of a failure in the target deployment stage, aborting the deployment process on the bare metal and outputting a first result. This first result indicates the target deployment stage and the reason for the deployment failure. Through these steps, when the target deployment stage fails, the computing device aborts the entire deployment process, preventing errors from propagating to the next deployment stage and causing larger problems. Furthermore, outputting the first result allows users to understand the problem promptly and fix it, improving the maintainability of the integrated deployment system.
[0015] In another possible implementation, before parsing the configuration request to obtain the configuration parameters in response to the received configuration request, the method further includes: displaying an input interface through a front-end device; the input interface is used to input parameters corresponding to each deployment stage in multiple deployment stages; and receiving a configuration request in response to operations on the input interface.
[0016] In other words, the computing device can display an input interface through a front-end device, allowing users to directly operate on the input interface to input configuration parameters. This ensures that different users can configure parameters according to the content specified on the input interface, guaranteeing a unified format for configuration parameters, avoiding omissions, and thus ensuring correct configuration of the bare machine subsequently.
[0017] In another possible implementation, the computing device includes multiple execution modules, each used to configure the bare metal at different deployment stages. Through this modular design, each execution module is developed and runs independently, facilitating subsequent replacement or updates of its functionality (e.g., adding new deployable operating systems, new system configurations, etc.). This makes the integrated deployment system of this application more flexible, meeting the diverse and evolving needs of enterprises.
[0018] Secondly, this application provides a device configuration apparatus, which includes one or more functional modules for implementing the method described in the first aspect above.
[0019] Thirdly, embodiments of this application provide a computing device including a processor and a memory; the processor is coupled to the memory; the memory is used to store computer instructions, which are loaded and executed by the processor to enable the computing device to implement the method described in the first aspect.
[0020] Fourthly, embodiments of this application provide a computer-readable storage medium comprising: computer software instructions; when the computer software instructions are executed in a computing device, they cause the computing device to implement the method described in the first aspect.
[0021] Fifthly, embodiments of this application provide a computer program product that, when run on a computing device, causes the computing device to execute the steps of the relevant method described in the first aspect above, so as to implement the method of the first aspect above.
[0022] The beneficial effects of the second to fifth aspects mentioned above can be referred to the corresponding description of the first aspect, and will not be repeated here. Attached Figure Description
[0023] Figure 1 A schematic diagram illustrating the composition of an application scenario provided in this application embodiment;
[0024] Figure 2 This is a schematic diagram of the composition of a computing device provided in an embodiment of this application;
[0025] Figure 3 This is a schematic diagram illustrating the composition of an integrated deployment system provided in an embodiment of this application;
[0026] Figure 4 A schematic flowchart illustrating a device configuration method provided in an embodiment of this application;
[0027] Figure 5 A flowchart illustrating another device configuration method provided in an embodiment of this application;
[0028] Figure 6A flowchart illustrating another device configuration method provided in this application embodiment;
[0029] Figure 7 A schematic diagram illustrating the composition of another application scenario provided in this application embodiment;
[0030] Figure 8 This is a schematic diagram illustrating the configuration of a device provided in an embodiment of this application. Detailed Implementation
[0031] 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 skilled in the art without creative effort are within the scope of protection of this application.
[0032] It should be noted that in the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0033] To facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish the same or similar items with essentially the same function and effect. Those skilled in the art can understand that the terms "first" and "second" are not intended to limit the quantity or execution order.
[0034] The following is a brief explanation of the technical terms used in the embodiments of this application:
[0035] 1. Bare metal server: Also known as a bare metal server, it refers to a physical server without any operating system or applications installed. Bare metal only contains basic physical components such as a central processing unit (CPU), memory, hard drive, motherboard, network card, etc., but has not undergone any software initialization configuration.
[0036] 2. Operating System (OS): This is the core system software in a computer system. It is the first layer of software configured on the computer hardware, responsible for managing and controlling computer hardware and software resources, and providing basic services and a runtime environment for upper-layer applications.
[0037] This application provides a device configuration method that configures the bare metal according to the deployment order of multiple deployment stages by using the parameters corresponding to each deployment stage, thereby improving the efficiency and accuracy of deployment in bare metal deployment scenarios.
[0038] In some implementations, the computing device parses a configuration request to obtain multiple deployment stages and parameters corresponding to each deployment stage. Further, the computing device configures the bare metal according to the deployment order of the multiple deployment stages, sequentially using the parameters corresponding to each deployment stage, so that the bare metal has the ability to provide business services. The solution in this application embodiment links multiple deployment stages into a continuous process, allowing the computing device to automatically execute multiple deployment stages in the deployment order to configure the bare metal, thereby effectively improving deployment efficiency. In addition, this application embodiment configures parameters for multiple deployment stages in a single configuration request, avoiding the need for manual configuration by the user at each stage as in the prior art. This ensures the consistency and accuracy of data throughout the deployment process, thereby guaranteeing the correct deployment of the bare metal.
[0039] The embodiments provided in this application will now be described in detail with reference to the accompanying drawings.
[0040] Figure 1 This is a schematic diagram illustrating the composition of an application scenario provided in an embodiment of this application. It includes a computing device 101 and a bare machine 102, with the computing device 101 and the bare machine 102 communicatively connected.
[0041] The computing device 102 runs an integrated deployment system that can automate the deployment of bare metal. This involves configuring the bare metal through multiple deployment stages so that the configured bare metal has the ability to provide business services (such as running specific applications to provide business services).
[0042] The relevant description of the aforementioned integrated deployment system is provided below. Figure 3 Description of the corresponding embodiments.
[0043] Optionally, the number of bare machines in the above application scenarios can be multiple, that is, the computing device 101 can perform batch configuration of multiple bare machines. Figure 1 The example shown is a bare machine.
[0044] For example, both the computing device 101 and the bare metal 102 described above can be servers. The difference between the two is that the computing device 101 runs an operating system and has the ability to run applications, while the bare metal 102 does not run an operating system and does not have the ability to run applications.
[0045] When the computing device 101 is specifically a server, in terms of form, the server can be a blade server, a high-density server, a rack server, or a full-rack server; in terms of function, the server can be a general-purpose server, a graphics processing unit (GPU) server, an artificial intelligence (AI) server, etc.
[0046] Figure 2 This is a schematic diagram illustrating the composition of a computing device provided in an embodiment of this application. Figure 2 As shown, the computing device may include a processor 201 and a memory 202; the memory 202 stores instructions executable by the processor 201; when the processor 201 is configured to execute instructions, it causes the computing device to execute the device configuration method in the embodiments of this application.
[0047] Figure 3 This is a schematic diagram illustrating the composition of an integrated deployment system provided in an embodiment of this application. For example... Figure 3 As shown, the integrated deployment system 300 includes the following modules: a configuration parsing module 301, a scheduling module 302, an operating system deployment module 303, a system configuration module 304, and an application deployment module 305. The scheduling module 302 serves as the "central brain" of the integrated deployment system 300, managing the entire workflow and distributing tasks to other modules at different deployment stages. Specifically, each execution module can provide an application program interface (API), which the scheduling module 302 calls to distribute tasks. Furthermore, the scheduling module 302 can manage the lifecycle of the entire workflow, such as detecting whether the workflow has been successfully executed and outputting the reason for failure if execution fails.
[0048] Combination Figure 3 The functions of each module described above are explained. First, when a user needs to configure the bare metal, they can send a configuration request to the integrated deployment system 300 via a front-end device (e.g., a mobile phone) or directly on the computing device. This configuration request requests configuration of the bare metal. The configuration parsing module 301 parses the configuration request to obtain configuration parameters. These parameters include the multiple deployment stages required to configure the bare metal, and the parameters corresponding to each of these stages. Specifically, the first deployment stage is used to deploy the operating system on the bare metal, the second deployment stage is used to configure the system on the bare metal with the operating system deployed, and the third deployment stage is used to deploy the application on the bare metal after system configuration.
[0049] Furthermore, the configuration parsing module 301 sends the configuration parameters to the scheduling module 302. The scheduling module 302 initiates a workflow based on the configuration parameters, which includes multiple deployment stages. After initiating the workflow, the scheduling module 302 assigns tasks to different execution modules sequentially according to the deployment order to configure the bare metal.
[0050] Specifically, in the first deployment phase, the scheduling module 302 sends a first instruction to the operating system deployment module 303. This first instruction includes first configuration parameters for the first deployment phase (parameters related to the operating system installation process, such as operating system type and version). The operating system deployment module 303 deploys the operating system on the bare metal according to the first configuration parameters. After the operating system deployment is complete, the operating system deployment module 303 sends a response message to the scheduling module 302 indicating that the operating system deployment was successful.
[0051] Then, the scheduling module 302 sends a second instruction to the system configuration module 304. This second instruction includes second configuration parameters for the second deployment phase (parameters related to the operating system's system configuration, such as network configuration and firewall configuration). The system configuration module 304 performs system configuration on the bare metal machine with the operating system deployed based on the second configuration parameters. After configuration is complete, the system configuration module 304 sends a response message to the scheduling module 302 indicating that the system configuration is complete.
[0052] Finally, the scheduling module 302 sends a third instruction to the application deployment module 305. This third instruction includes third configuration parameters for the third deployment phase (configurations related to application installation, such as application type and version). The application deployment module 305 deploys the application on the configured bare metal according to the third configuration parameters. After application deployment is complete, the application deployment module 305 sends a response to the third instruction to the scheduling module 302, informing the system that configuration is complete. Thus, the configuration of the bare metal is complete, resulting in the configured bare metal.
[0053] It should be noted that the system architecture and application scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0054] Figure 4 This is a schematic flowchart illustrating a device configuration method provided in an embodiment of this application. Exemplarily, the device configuration method provided in this embodiment can be applied to... Figure 2 In the computing device shown, in other words, it can be used... Figure 2The computing device executes the method; specifically, the processor of the computing device may execute the method.
[0055] S401. In response to the received configuration request, parse the configuration request to obtain the configuration parameters.
[0056] The configuration request is used to request configuration of the bare metal. Configuration parameters include: the multiple deployment phases required to configure the bare metal, and the parameters corresponding to each deployment phase.
[0057] The deployment process includes three phases: a first deployment phase, a second deployment phase, and a third deployment phase. The first deployment phase is used to deploy the operating system on the bare metal, the second deployment phase is used to configure the bare metal with the operating system deployed, and the third deployment phase is used to deploy applications on the bare metal after system configuration.
[0058] In some implementations, if a user needs to configure the bare metal, they can initiate a configuration request to the computing device through a front-end device (such as a mobile phone) or directly on the computing device.
[0059] In some implementations, prior to S401, the computing device also performs:
[0060] S400a: The input interface is displayed through the front-end device.
[0061] The input interface is used to input parameters corresponding to each of the multiple deployment phases.
[0062] S400b receives configuration requests in response to operations on the input interface.
[0063] In other words, the computing device can display an input interface through a front-end device, allowing users to operate on the input interface to input configuration parameters. After the input is completed, the front-end device generates a configuration request based on the input content and sends the configuration request to the computing device. This method of inputting configuration parameters through the interface ensures that different users can configure the parameters according to the content specified on the input interface, ensuring the uniformity of the configuration parameter format, avoiding the omission of parameters, and thus ensuring the correct configuration of the bare metal afterwards.
[0064] For example, the input interface may include at least three areas. The first area is used to input parameters corresponding to the first deployment phase, such as the type and version of the operating system. The second area is used to input parameters corresponding to the second deployment phase, such as setting the hostname, network time protocol (NTP) synchronization, whether the firewall is enabled, disk formatting and mounting, and installing general dependency packages. The third area is used to input parameters corresponding to the third deployment phase, such as the type and version of the applications to be installed. Optionally, the input interface can also configure some basic information about the bare metal, such as the bare metal identifier and media access control (MAC) address.
[0065] The above S401 can be made by Figure 3 The configuration parsing module is responsible for execution. This module provides a RESTful API, which allows the user's front-end device to display the input interface by calling it. RESTful is an architecture-based design style that uses the Hypertext Transfer Protocol (HTTP) to facilitate interaction between the front-end device and the back-end server. Its core principle is to leverage the native features of HTTP (such as request methods and status codes) to standardize data transmission and manipulation, offering characteristics such as simplicity, scalability, and statelessness.
[0066] Furthermore, after the user completes the operation on the input interface, the configuration parsing module receives the configuration request. The configuration parameters in the configuration request can exist in JSON format, which makes it easier for the configuration parsing module to extract the configuration parameters in the configuration request.
[0067] Optionally, the configuration parsing module can also perform syntax and logic analysis on the configuration request to determine whether the user has omitted or incorrectly entered a parameter, and prompt the user to re-enter it through the front-end device.
[0068] In the above steps, the parameters required for each deployment stage are defined through a single configuration request. This eliminates the need for users to manually configure the parameters required for the current deployment stage at the beginning of each stage, ensuring configuration consistency and data accuracy from the source and effectively improving deployment efficiency.
[0069] S402. Following the deployment order of multiple deployment phases, the bare metal is configured sequentially using the parameters corresponding to each deployment phase. The configured bare metal then has the capability to provide business services.
[0070] The configured bare metal can run specific applications to provide business services.
[0071] In one possible implementation, the computing device includes multiple execution modules, each used to configure the bare metal at different deployment stages. For example, in Figure 3 In this architecture, the operating system deployment module configures the bare metal in the first deployment phase, the system configuration module configures it in the second deployment phase, and the application deployment module configures it in the third deployment phase. Each of these modules can be considered an execution module. The scheduling module interacts with each module to perform its functions, thereby enabling the configuration of the bare metal.
[0072] Through the modular design described above, each execution module is developed and runs independently, which makes it easy for users to replace or update the functions of each execution module in the future (such as adding a new deployable operating system, new system configuration, etc.), making the integrated deployment system of this application more flexible and meeting the diverse and evolving needs of enterprises.
[0073] like Figure 5 As shown, the above S402 can be specifically implemented as S4021-S4023 as follows:
[0074] S4021. Deploy the operating system on the bare metal according to the first configuration parameters corresponding to the first deployment stage in the configuration parameters.
[0075] The first configuration parameter is the relevant parameter required for deploying the operating system, such as setting the type and version of the operating system.
[0076] In some implementations, S5021 above can be implemented as follows: generating a first configuration file based on the first configuration parameters and the operating system template; running the first configuration file to transfer the boot file and the operating system image file to the bare machine, so that the bare machine runs the operating system image file according to the boot file to deploy the operating system on the bare machine.
[0077] The operating system template can be pre-defined, indicating the standardized settings required for deploying the operating system. As an example, the operating system template might include a series of commands for deploying the operating system, along with the execution order of these commands. The computing device can populate the operating system template with first configuration parameters (for example, the template might include a command to install an operating system, but lack a specific operating system type. After being populated with the first configuration parameters, this command can then be used to install a specified type of operating system), resulting in a first configuration file (e.g., a script file) specifically for the current bare metal. The computing device then runs this first configuration file to automatically deploy the operating system on the bare metal.
[0078] During operating system deployment, the use of an operating system template ensured deployment quality and configuration consistency. By adopting primary configuration parameters, the ability to customize according to specific user needs was retained, achieving a balance between standardization and flexibility.
[0079] In some implementations, there can be multiple operating system templates, such as different operating system templates corresponding to different types of bare metal. Multiple operating system modules can be stored together in a first template library (which can be set inside the computing device or outside the computing device, such as in the cloud), so that the computing device can obtain and use them when deploying bare metal.
[0080] For example, a computing device can use PXE network booting to deploy an operating system on a bare metal machine.
[0081] Specifically, the computing device is configured with Dynamic Host Configuration Protocol (DHCP) service, Private File Transfer Protocol (TFTP) service, and HTTP service. The computing device runs the first configuration file. After the bare-metal boot process is complete, it assigns an Internet Protocol (IP) address to the bare-metal machine via the DHCP service; it then transfers the boot file to the bare-metal machine via the TFTP service based on the IP address; and finally, it transfers the bare-metal image file to the bare-metal machine via the HTTP service based on the IP address.
[0082] After booting from bare metal, the bare metal sends a DHCP broadcast request to find a DHCP service on the network. Upon receiving the request, the DHCP service assigns a temporary IP address to the bare metal, enabling it to communicate and transfer data with other devices on the network. Additionally, the DHCP service sends the IP address of the TFTP service to the bare metal, allowing it to access the TFTP service and obtain the boot file. The boot file is crucial for the bare metal to transition from "hardware boot" to "loading the operating system kernel," enabling it to recognize and run the operating system's installation files (generally called an image file). Since image files are relatively large, a more efficient protocol is needed for transmission; therefore, an HTTP service is used to manage them. The TFTP service also sends the IP address of an HTTP server to the bare metal, allowing it to retrieve the image file from the HTTP service. The bare metal then uses the boot file to identify the image file, thus deploying the operating system on the bare metal.
[0083] Optionally, when the DHCP service, TFTP service, and HTTP service are deployed independently on other devices, the deployment of the DHCP service can be called a DHCP server, the deployment of the TFTP service can be called a TFTP server, and the deployment of the HTTP service can be called an HTTP server.
[0084] As an example, computing devices can use relevant operating system deployment tools (such as Autoinstall) to deploy the operating system on bare metal, thereby improving the efficiency of operating system deployment.
[0085] The above steps provide a specific method for automatically deploying an operating system on bare metal, thereby improving the feasibility of this solution.
[0086] S4022. After the operating system is deployed, the bare metal with the operating system deployed is configured according to the second configuration parameters corresponding to the second deployment stage in the configuration parameters.
[0087] The second configuration parameter is related to the operating system's system configuration, such as setting the hostname, NTP synchronization, enabling or disabling the firewall, formatting and mounting the disk, and installing common dependency packages. Additionally, the second configuration parameter may include the secure shell (SSH) username and password for the bare machine, allowing the computing device to access the bare machine via SSH and perform system configuration.
[0088] In some implementations, S4022 can be specifically implemented as follows: generating a second configuration file based on the second configuration parameters and the system configuration template; running the second configuration file to configure the second configuration parameters to take effect on the bare metal via the SSH protocol, so as to perform system configuration on the bare metal on which the operating system is deployed.
[0089] The system configuration template can be pre-set, indicating standardized settings required after operating system installation. As an example, the system configuration template might include a series of system configuration commands and their execution order. The computing device can populate the system configuration template with first configuration parameters (e.g., the template includes a command to set the hostname, but lacks specific parameters—specifically, the hostname to be set. After being populated with second configuration parameters, this command can then be used to set the bare metal's hostname to the user-specified hostname), resulting in a second configuration file (e.g., a script file) specifically for the current bare metal.
[0090] Then, the computing device runs the second configuration file, connects to the bare metal via SSH, and modifies the relevant parameters of the bare metal according to the system configuration template, so that the third configuration parameters take effect on the bare metal, thereby realizing the system configuration of the bare metal with the operating system deployed.
[0091] In some implementations, there can be multiple system configuration templates. For example, different types of operating systems may correspond to different system configuration templates, and different types of bare metal may correspond to different system configuration templates. Multiple system configuration templates can be stored together in a second template library (which can be set inside the computing device or outside the computing device, such as in the cloud), so that the computing device can obtain and use them when deploying bare metal.
[0092] As an example, computing devices can use relevant system configuration tools (such as Ansible, SaltStack, or Puppet) to perform system configuration on the bare metal to improve the efficiency of system configuration.
[0093] The above steps provide a specific method for automating system configuration on bare metal, thereby improving the feasibility of this solution.
[0094] S4023. After system configuration, deploy the application on the bare metal according to the third configuration parameters corresponding to the third deployment stage in the configuration parameters.
[0095] The third configuration parameter is a set of parameters required for deploying the application, such as setting the application type and version.
[0096] In some implementations, the bare machine forms a distributed management system with other bare machines. That is, in the scenario of building a cluster, the above S4023 can be specifically implemented as follows: determine the node type of the bare machine in the distributed management system according to the third configuration parameter; and deploy the application on the bare machine according to the deployment strategy corresponding to the node type.
[0097] In cluster scenarios, different computing devices correspond to different functions within the cluster, i.e., different node types. For example, some computing devices may act as management nodes, while others may act as worker nodes (e.g., in a cluster of five servers, one server is the management node, one server is the storage node, and the other three servers are worker nodes). When a user initiates a configuration request, they can set the node type of the bare metal to be configured in the third configuration parameter. This allows the computing device to determine the appropriate deployment strategy based on the node type.
[0098] Specifically, when the node type is a management node, the application's management component is deployed on bare metal;
[0099] When the node type is worker node, deploy the worker components of the application on bare metal;
[0100] When the node type is a storage node, the storage component of the application is deployed on bare metal.
[0101] Because different node types require different functionalities, the applications installed on different nodes in a cluster also differ. For example, management nodes need management components to enable global scheduling, data visualization, and other management functions. Worker nodes need worker components to enable business operations and data processing. Storage nodes need storage components to enable data storage and data consistency coordination.
[0102] Similarly, different applications require different application templates. Therefore, the computing device can obtain the corresponding application template from a third template library, populate it with third configuration parameters to obtain a third configuration file, and run the third configuration file to deploy the application on the bare metal.
[0103] The above steps provide a specific method for automating application deployment on bare metal, thereby improving the feasibility of this solution.
[0104] In one possible implementation, the computing device can also monitor the entire deployment process to ensure the accuracy of automated deployment, such as... Figure 6 As shown, the computing device also performs the following steps:
[0105] S601. Detect whether each deployment stage in multiple deployment stages has been successfully deployed.
[0106] As mentioned earlier, each deployment stage is automated by the computing device calling script files (such as the first configuration file and the second configuration file mentioned above). During the process of calling the script files, the computing device can determine whether each deployment stage has been successfully deployed based on the return values and output information of the commands in the script files (if the return values or output information do not meet expectations, the deployment is determined to have failed).
[0107] S602. If the deployment fails during the target deployment phase, abort the deployment process on the bare metal and output the first result.
[0108] The first result indicates the target deployment phase and the reason for deployment failure.
[0109] For example, if deployment fails during the target deployment phase, the computing device can obtain the log files related to the target deployment phase, analyze the log files (e.g., using a large language model) to find the reason for the deployment failure, and then output the first result.
[0110] By following the steps described above, if the target deployment phase fails, the computing device will abort the entire deployment process. This prevents errors from being propagated to the next deployment phase and causing larger problems. Furthermore, outputting the initial result allows users to quickly understand the problem and fix it, improving the maintainability of the integrated deployment system.
[0111] The device configuration method provided in this application can be applied to scenarios such as data centers and enterprise private clouds that require large-scale, standardized deployment and management of bare metal. In a typical application scenario, such as... Figure 7 As shown, a user wants to quickly deploy a complete distributed management program on a rack consisting of three newly delivered bare metal machines. The user doesn't need to log in to each bare metal machine individually; they only need to submit a configuration request to the integrated deployment system, defining the bare metal information, operating system type, system configuration, etc. Upon receiving the configuration request, the integrated deployment system will automatically complete the configuration of all bare metal machines, resulting in the configured bare metals. For bare metals that fail to configure, the system will output the reason for the failure for subsequent maintenance (e.g., bare metal 2 failed during application deployment, and bare metal 3 failed during system configuration).
[0112] The device configuration method provided in this application embodiment involves a computing device parsing a configuration request to obtain multiple deployment stages and parameters corresponding to each deployment stage. Further, the computing device configures the bare metal according to the deployment order of the multiple deployment stages, sequentially using the parameters corresponding to each deployment stage, so that the bare metal has the ability to provide business services. This application embodiment's solution links multiple deployment stages into a continuous process, allowing the computing device to automatically execute multiple deployment stages in the deployment order to configure the bare metal, thereby effectively improving deployment efficiency. In addition, this application embodiment configures parameters for multiple deployment stages simultaneously with a single configuration request, avoiding the need for manual configuration by the user at each stage as in the prior art. This ensures the consistency and accuracy of data throughout the deployment process, thereby guaranteeing the correct deployment of the bare metal.
[0113] Furthermore, the device configuration method provided in this application embodiment only requires users to focus on business-level operations (which parameters need to be configured), without needing to worry about configuration details (how to do it), which greatly reduces the technical threshold.
[0114] In summary, the integrated deployment system and device configuration method provided in this application have the following advantages:
[0115] 1. Unifying parameters across multiple deployment phases ensures consistency and accuracy in configuration from the outset.
[0116] 2. It enables fully automated deployment, with each deployment stage being controllable, which can avoid error propagation and ensure system stability.
[0117] 3. Each module in the integrated deployment system is developed and runs independently, which makes the integrated deployment system highly scalable and flexible, avoids technology lock-in, and meets the diverse and evolving needs of enterprises.
[0118] 4. During the operating system deployment process, the use of an operating system template ensured deployment quality and configuration consistency. By adopting the primary configuration parameters, the ability to customize according to specific user needs was retained, achieving a balance between standardization and flexibility.
[0119] As can be seen, the above mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the embodiments of this application provide corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the modules and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware 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.
[0120] In an exemplary embodiment, this application also provides a device configuration apparatus. The device configuration apparatus may be the aforementioned computing device or a processor within the computing device. The device configuration apparatus may include one or more functional modules for implementing the device configuration method of the above method embodiments.
[0121] For example, Figure 8 This is a schematic diagram of a device configuration apparatus provided in an embodiment of this application. Figure 8 As shown, the configuration device includes a parsing module 801 and a configuration module 802. The parsing module 801 and the configuration module 802 are interconnected.
[0122] The parsing module 801 is used to parse the configuration request to obtain configuration parameters in response to the received configuration request; wherein, the configuration request is used to request configuration of the bare metal; the configuration parameters include: the multiple deployment stages required to configure the bare metal, and the parameters corresponding to each deployment stage;
[0123] The configuration module 802 is used to configure the bare machine according to the deployment order of multiple deployment stages, using the parameters corresponding to each deployment stage in sequence. The configured bare machine has the ability to provide business services.
[0124] Other optional implementation methods are described in the above method embodiments.
[0125] This application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware; for example, the related hardware can be a processor of a computing device. The program instructions can be stored in the above-described computer-readable storage medium, and when executed, they can implement the processes of the above method embodiments. The computer-readable storage medium can be memory. The above-described computer-readable storage medium can also be an external storage device, such as a hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Further, the above-described computer-readable storage medium can include both memory and external storage devices. The above-described computer-readable storage medium is used to store the above-described computer program instructions and other programs and data required for the configuration of the above-described device.
[0126] This application also provides a computer program product, which includes a computer program that, when run on a computing device, causes the computing device to execute any of the device configuration methods provided in the above embodiments.
[0127] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple components. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0128] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.
[0129] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for configuring a device, characterized in that, Applied to a computing device that is communicatively connected to bare metal, the method includes: In response to a received configuration request, the configuration request is parsed to obtain configuration parameters; wherein, the configuration request is used to request configuration of the bare metal; the configuration parameters include: multiple deployment stages that the bare metal needs to go through to configure, and parameters corresponding to each of the multiple deployment stages; According to the deployment order of the multiple deployment stages, the bare machine is configured sequentially using the parameters corresponding to each deployment stage, and the configured bare machine has the ability to provide business services.
2. The method according to claim 1, characterized in that, The multiple deployment phases include a first deployment phase, a second deployment phase, and a third deployment phase; The step of configuring the bare metal according to the deployment order of the multiple deployment phases, using the parameters corresponding to each deployment phase in sequence, includes: Based on the first configuration parameters corresponding to the first deployment stage in the configuration parameters, deploy the operating system on the bare metal; After the operating system is deployed, the bare metal with the operating system deployed is configured according to the second configuration parameters corresponding to the second deployment stage in the configuration parameters; After the system configuration is performed, the application is deployed on the bare metal according to the third configuration parameters corresponding to the third deployment stage in the configuration parameters.
3. The method according to claim 2, characterized in that, Deploying the operating system on the bare metal according to the first configuration parameters corresponding to the first deployment stage in the configuration parameters includes: Generate a first configuration file based on the first configuration parameters and the operating system template; The first configuration file is run to transfer a boot file and an image file of the operating system to the bare metal, so that the bare metal runs the image file of the operating system according to the boot file to deploy the operating system on the bare metal.
4. The method according to claim 3, characterized in that, The computing device is equipped with DHCP service, TFTP service and HTTP service; Running the first configuration file to transfer the boot file and the operating system image file to the bare metal includes: After the bare metal boots up, the first configuration file is run, and an IP address is assigned to the bare metal via the DHCP service. The boot file is transmitted to the bare metal via the TFTP service according to the IP address; The image file is sent to the bare metal via the HTTP service based on the IP address.
5. The method according to any one of claims 2-4, characterized in that, The step of configuring the bare metal with the deployed operating system according to the second configuration parameters corresponding to the second deployment stage in the configuration parameters includes: A second configuration file is generated based on the second configuration parameters and the system configuration template; Run the second configuration file to configure the second configuration parameters to take effect on the bare metal via the Secure Shell SSH protocol, thereby performing system configuration on the bare metal on which the operating system is deployed.
6. The method according to any one of claims 2-4, characterized in that, The bare machine forms a distributed management system with other bare machines; the step of deploying the application on the bare machine according to the third configuration parameters corresponding to the third deployment stage in the configuration parameters includes: The node type of the bare machine in the distributed management system is determined based on the third configuration parameter. The application is deployed on the bare metal according to the deployment strategy corresponding to the node type.
7. The method according to claim 6, characterized in that, The step of installing the application on the operating system according to the deployment strategy corresponding to the node type includes: When the node type is a management node, the management component of the application is deployed on the bare metal. When the node type is a worker node, the worker components of the application are deployed on the bare metal. When the node type is a storage node, the storage component of the application is deployed on the bare metal.
8. The method according to any one of claims 1-7, characterized in that, The method further includes: The system checks whether each of the multiple deployment phases was successfully deployed. If the deployment fails during the target deployment phase, the deployment process on the bare metal is aborted, and a first result is output; the first result is used to indicate the target deployment phase and the reason for the deployment failure.
9. The method according to any one of claims 1-8, characterized in that, Before parsing the configuration request to obtain configuration parameters in response to the received configuration request, the method further includes: The input interface is displayed through a front-end device; the input interface is used to input parameters corresponding to each deployment stage in multiple deployment stages. In response to an operation on the input interface, the configuration request is received.
10. A computing device, characterized in that, The computing device includes a processor and a memory; the processor is coupled to the memory. The memory is used to store computer instructions; The computer instructions are loaded and executed by the processor to enable the computing device to implement the configuration method of the device as described in any one of claims 1-9.