Physical machine initialization method and apparatus, computer device, and storage medium

By acquiring physical machine information, issuing initialization scripts, and implementing atomic tasks, the problem of difficulty in locating anomalies during physical machine initialization was solved, achieving an efficient initialization process.

CN114637617BActive Publication Date: 2026-02-10SF TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202011478308.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-15
Publication Date
2026-02-10
Estimated Expiration
2040-12-15

AI Technical Summary

Technical Problem

Existing technologies cannot effectively locate anomalies during physical machine initialization, resulting in low initialization efficiency.

Method used

By obtaining the physical machine initialization request, the information of the physical machine to be initialized is determined, the initialization script command is issued according to the storage type, and after receiving the download success message, the initialization interface is called to find the initialization job package, and atomic tasks are issued in sequence to complete the initialization, and anomalies are located in real time.

Benefits of technology

It improves the efficiency of physical machine initialization and ensures the smooth completion of the initialization process through real-time anomaly location and handling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114637617B_ABST
    Figure CN114637617B_ABST
Patent Text Reader

Abstract

The application relates to a physical machine initialization method and device, computer equipment and a storage medium. A physical machine initialization request is acquired, and physical machine information of a to-be-initialized physical machine is determined; a download initialization script command is issued to the to-be-initialized physical machine according to a storage type of the to-be-initialized physical machine; when a download success message fed back by the to-be-initialized physical machine is received, a physical machine initialization interface corresponding to the to-be-initialized physical machine is called, and an initialization job package corresponding to the to-be-initialized physical machine is searched; and atomic tasks in the initialization job package are sequentially issued to the to-be-initialized physical machine to complete physical machine initialization. The application uses the form of an initialization job package to complete the induction of atomic tasks in an initialization task, and when the physical machine is initialized, initialization abnormal conditions can be acquired in real time according to the feedback of the atomic tasks, so that rapid abnormal positioning is realized, and the physical machine initialization efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a physical machine initialization method, apparatus, computer equipment, and storage medium. Background Technology

[0002] A physical machine, or physical server, refers to an independent server, that is, a physical standalone server. The components of a physical server include a processor, hard disk, memory, system bus, etc., which are similar to general computer architecture. However, because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.

[0003] Currently, physical machine initialization is typically handled by running shell scripts using Ansible, a batch operation and maintenance tool. However, this method cannot locate errors that occur during physical machine initialization, thus affecting the efficiency of physical machine initialization. Summary of the Invention

[0004] Therefore, it is necessary to provide a physical machine initialization method, apparatus, computer equipment, and storage medium to improve the efficiency of physical machine initialization in order to address the above-mentioned technical problems.

[0005] A physical machine initialization method, the method comprising:

[0006] Obtain the physical machine initialization request and determine the physical machine information of the physical machine to be initialized;

[0007] A command to download the initialization script is issued to the physical machine to be initialized based on the storage type of the physical machine to be initialized;

[0008] When a download success message is received from the physical machine to be initialized, the physical machine initialization interface corresponding to the physical machine to be initialized is called to find the initialization job package corresponding to the physical machine to be initialized.

[0009] The atomic tasks within the initialization job package are sequentially sent to the physical machine to be initialized in order to complete the physical machine initialization.

[0010] In one embodiment, obtaining the physical machine initialization request and determining the physical machine information of the physical machine to be initialized includes:

[0011] Obtain the physical machine initialization request;

[0012] A physical machine request request is sent to a third-party server according to the physical machine initialization request;

[0013] Obtain the physical machine information of the physical machine to be initialized from the feedback, and set the custom attributes of the physical machine to be initialized to determine the physical machine information of the physical machine to be initialized.

[0014] In one embodiment, the step of sequentially issuing atomic tasks within the initialization job package to the physical machine to be initialized to complete the physical machine initialization includes:

[0015] Send the atomic task of the current item in the initialization job package to the physical machine to be initialized;

[0016] Obtain the check return of the atomic task of the current item executed by the physical machine to be initialized;

[0017] When the check returns that the atomic task representing the current item has been completed, the next atomic task corresponding to the atomic task of the current item is sent to the physical machine to be initialized.

[0018] In one embodiment, before sequentially sending the atomic tasks within the initialization job package to the physical machine to be initialized, the method further includes:

[0019] Based on the successful download message, construct a physical machine cluster from the physical machines to be initialized.

[0020] The step of sequentially issuing atomic tasks from the initialization job package to the physical machine to be initialized to complete the physical machine initialization includes:

[0021] The atomic tasks within the initialization job package are sequentially sent to the physical machines to be initialized within the physical machine cluster to complete the physical machine initialization of the physical machines to be initialized within the physical machine cluster.

[0022] In one embodiment, before sequentially sending the atomic tasks within the initialization job package to the physical machine to be initialized, the method further includes:

[0023] Obtain atomic task adjustment instructions, and update the atomic tasks within the initialization job package according to the atomic task adjustment instructions;

[0024] The step of sequentially issuing the atomic tasks within the initialization job package to the physical machine to be initialized includes:

[0025] The updated atomic tasks within the initialization job package are sequentially sent to the physical machine to be initialized.

[0026] In one embodiment, the step of sequentially issuing atomic tasks within the initialization job package to the physical machine to be initialized, after completing the physical machine initialization, includes:

[0027] Obtain the initialization check instruction;

[0028] According to the initialization check instruction, the check interface corresponding to the physical machine to be initialized is called to find the initialization check package corresponding to the physical machine to be initialized.

[0029] The atomic tasks within the initialization check package are sequentially sent to the physical machine to be initialized in order to complete the physical machine initialization check.

[0030] A physical machine initialization device, the device comprising:

[0031] The request acquisition module is used to acquire physical machine initialization requests and determine the physical machine information of the physical machine to be initialized;

[0032] The command issuing module is used to issue a download initialization script command to the physical machine to be initialized according to the storage type of the physical machine to be initialized;

[0033] The package lookup module is used to call the physical machine initialization interface to look up the initialization job package corresponding to the physical machine to be initialized when a download success message is received from the physical machine to be initialized.

[0034] The atomic task distribution module is used to sequentially distribute the atomic tasks within the initialization job package to the physical machine to be initialized, so as to complete the physical machine initialization.

[0035] In one embodiment, the request acquisition module is specifically used to: acquire a physical machine initialization request; send a physical machine application request to a third-party server according to the physical machine initialization request; acquire the physical machine information of the physical machine to be initialized, and set the custom attributes of the physical machine to be initialized.

[0036] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:

[0037] Obtain the physical machine initialization request and determine the physical machine information of the physical machine to be initialized;

[0038] A command to download the initialization script is issued to the physical machine to be initialized based on the storage type of the physical machine to be initialized;

[0039] When a download success message is received from the physical machine to be initialized, the physical machine initialization interface corresponding to the physical machine to be initialized is called to find the initialization job package corresponding to the physical machine to be initialized.

[0040] The atomic tasks within the initialization job package are sequentially sent to the physical machine to be initialized in order to complete the physical machine initialization.

[0041] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0042] Obtain the physical machine initialization request and determine the physical machine information of the physical machine to be initialized;

[0043] A command to download the initialization script is issued to the physical machine to be initialized based on the storage type of the physical machine to be initialized;

[0044] When a download success message is received from the physical machine to be initialized, the physical machine initialization interface corresponding to the physical machine to be initialized is called to find the initialization job package corresponding to the physical machine to be initialized.

[0045] The atomic tasks within the initialization job package are sequentially sent to the physical machine to be initialized in order to complete the physical machine initialization.

[0046] The aforementioned physical machine initialization method, apparatus, computer equipment, and storage medium determine the physical machine information of the physical machine to be initialized by obtaining a physical machine initialization request; issue a download initialization script command to the physical machine to be initialized according to its storage type; when a download success message is received from the physical machine to be initialized, the corresponding physical machine initialization interface is called to find the corresponding initialization job package; and atomic tasks within the initialization job package are sequentially issued to the physical machine to complete the physical machine initialization. This application uses an initialization job package to summarize the atomic tasks in the initialization task. During physical machine initialization, feedback from the atomic tasks can be used to obtain initialization anomalies in real time, thereby enabling rapid anomaly localization and improving the efficiency of physical machine initialization. Attached Figure Description

[0047] Figure 1 This is a diagram illustrating the application environment of the physical machine initialization method in one embodiment;

[0048] Figure 2 This is a flowchart illustrating the physical machine initialization method in one embodiment;

[0049] Figure 3 In one embodiment Figure 2 A schematic diagram of the sub-process of step 201;

[0050] Figure 4 This is a flowchart illustrating the steps involved in building a physical machine cluster in one embodiment;

[0051] Figure 5 This is a flowchart illustrating the initialization check step in one embodiment;

[0052] Figure 6 This is a structural block diagram of the physical machine initialization device in one embodiment;

[0053] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0055] The physical machine initialization method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with initialization control server 104 via a network. The initialization control platform connects to multiple physical machines to be initialized. Specifically, initialization personnel can submit physical machine initialization requests from terminal 102. Initialization control server 104 receives the physical machine initialization request, determines the physical machine information of the physical machine to be initialized, issues a download initialization script command to the physical machine to be initialized based on its storage type, and when it receives a successful download message from the physical machine to be initialized, it calls the physical machine initialization interface to find the corresponding initialization job package for the physical machine to be initialized, and sequentially issues atomic tasks within the initialization job package to the physical machine to be initialized to complete the physical machine initialization. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. Initialization control server 104, preset automated testing platform 106, and preset cloud real machine control platform 108 can be implemented using independent servers or a server cluster composed of multiple servers.

[0056] In one embodiment, such as Figure 2 As shown, a physical machine initialization method is provided, which is applied to... Figure 1 Taking the initialization control server 104 as an example, the process includes the following steps:

[0057] Step 201: Obtain the physical machine initialization request and determine the physical machine information of the physical machine to be initialized.

[0058] In this context, a physical machine, or physical server, refers to an independent server, or a physically separate server. A physical server's components include a processor, hard drive, memory, and system bus, similar to a general-purpose computer architecture. However, due to the need to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability. A physical machine initialization request is a request submitted by the operator controlling the physical machine initialization via the operating terminal. The request contains the physical machine information, which may include the physical machine's serial number, model, storage type, and address. The initialization control server 104 can then use this physical machine information to locate the physical machine and perform other initialization preparations.

[0059] Specifically, when the physical machine server needs to perform initialization work, the operator can send a corresponding physical machine initialization request to the initialization control server 104 to request the server to initialize the specified physical machine to be initialized. Upon receiving the physical machine initialization request, the initialization control server 104 can parse the request and obtain the physical machine information contained within it. In one embodiment, the physical machine information may only include the physical machine's identification number. Then, based on the physical machine's identification number, the initialization control server 104 retrieves other physical machine information corresponding to the physical machine from a preset physical machine information database. In another embodiment, the initialization control server 104 can also set custom attributes for some physical machines.

[0060] Step 203: Send a command to download the initialization script to the physical machine to be initialized according to the storage type of the physical machine to be initialized.

[0061] The storage type of the physical machine to be initialized is a fixed attribute that indicates the storage format of files within the machine, which can include block storage, file storage, and object storage. Different storage types correspond to different initialization scripts. Therefore, a command to download the initialization script can be issued to the physical machine to be initialized based on its storage type, instructing the machine to download the corresponding script file. The initialization script then operates on the physical machine to respond to atomic tasks issued by the initialization control server 104, thereby completing the physical machine initialization process.

[0062] Specifically, upon receiving the physical machine information, the initialization control server 104 can perform the physical machine initialization work. First, it can issue a download initialization script command to the physical machine to be initialized according to the storage type of the physical machine to be initialized, so that the various atomic tasks in the initialization job package can be effectively executed in the future.

[0063] Step 205: When a download success message is received from the physical machine to be initialized, the physical machine initialization interface corresponding to the physical machine to be initialized is called to find the initialization job package corresponding to the physical machine to be initialized.

[0064] Step 207: Send atomic tasks from the initialization job package to the physical machine to be initialized in sequence to complete the physical machine initialization.

[0065] The physical machine initialization interface is used to find and select the initialization job package corresponding to the physical machine to be initialized. The initialization job package specifically contains multiple atomic physical machine initialization tasks. Atomizing the complete physical machine initialization task is equivalent to breaking down a complete initialization process into multiple different small steps for distributed processing. At the same time, the initialization control server 104 can receive the execution feedback after the physical machine to be initialized executes each initialization atomic task, thereby effectively locating errors in the execution process of atomic tasks. In a specific embodiment, the atomic tasks included in the physical machine initialization process may include the following steps: (1) Configure the app volume. (2) Configure the storage volume to use all remaining space. (3) Configure the glusterfs yum source. (4) Install dependency packages. (5) Install python3.6 and env. (6) Download and install the virtual-host code and create a canary directory. (7) Mount the glusterfs image volume. (8) Install the qemu-kvm package. (9) Install the libvirt package. (10) Install the guestfs package. (11) Install the tool script to / home / sfkvm. (12) Modify libvirt parameters to configure sfkvm login authentication. (13) Configure iptables parameters. (14) Configure kernel parameters. (15) Configure systemd parameters. (16) Install sfc. (17) Sync the image.

[0066] Specifically, after downloading the initialization script, the physical machine to be initialized will send a download success message to the initialization control server 104. Upon receiving this message, the initialization control server 104 will call the physical machine initialization interface to locate the initialization job package for initializing the physical machine. The initialization job package contains multiple atomic tasks executed sequentially. The initialization control server 104 sends these atomic tasks to the physical machine to be initialized in sequence. The physical machine can execute the atomic tasks based on the initialization script and send corresponding execution information back to the initialization control server 104 after completion. The initialization control server then verifies the execution process of the previous atomic task and issues the next atomic task. By executing the atomic tasks sequentially, the entire physical machine initialization process can be effectively completed. In one embodiment, the physical machine to be initialized can use ` / home / sfkvm / kinit.sh` to execute the received atomic tasks.

[0067] The aforementioned physical machine initialization method involves obtaining a physical machine initialization request to determine the physical machine information to be initialized; issuing a download initialization script command to the physical machine to be initialized based on its storage type; upon receiving a successful download message from the physical machine to be initialized, calling the corresponding physical machine initialization interface to find the corresponding initialization job package; and sequentially issuing atomic tasks within the initialization job package to the physical machine to complete the initialization. This application uses an initialization job package to summarize the atomic tasks in the initialization task. During physical machine initialization, feedback from the atomic tasks can be used to obtain initialization anomalies in real time, enabling rapid anomaly localization and improving physical machine initialization efficiency.

[0068] In one embodiment, such as Figure 3 As shown, step 201 includes:

[0069] Step 302: Obtain the physical machine initialization request.

[0070] Step 304: Send a physical machine request to the third-party server according to the physical machine initialization request.

[0071] Step 306: Obtain the physical machine information of the physical machine to be initialized and set the custom attributes of the physical machine to be initialized.

[0072] The third-party server specifically refers to a server containing a preset bare metal interface, which is used to control the bare metal physical machine of the entity. The bare metal physical machine is a bare metal server, which is similar to a dedicated physical server in the cloud. It has high-performance computing capabilities on the basis of elasticity and flexibility. Its computing performance is no different from that of traditional physical machines, and it has the characteristics of secure physical isolation. The physical machine initialization method of this application is applicable to the initialization process of bare metal physical machines. Some custom attributes of the physical machine can be set directly when requesting the physical machine. For example, (1) physical machine role. (2) CPU super-resolution rate. (3) Mem super-resolution rate. (4) Disk super-resolution rate. (5) VM number limit. (6) Storage type. (7) Resource pool type. These data can be set directly during initialization.

[0073] Specifically, when determining the physical machine corresponding to the physical machine initialization request, the system can first request the corresponding physical machine to be initialized from the preset bare metal interface based on information such as the physical machine number carried in the physical machine initialization request. This step is mainly used to establish a network connection with these unmanned aerial vehicles (UAVs) to be initialized through the preset bare metal interface. Then, based on the physical machine information of the physical machine to be initialized fed back by the preset bare metal interface, the system can set the custom attributes of the physical machine to be initialized, thereby ensuring that the initialization script can be obtained more effectively in the subsequent initialization process, and the corresponding initialization atomic tasks can be executed to complete the initialization of the physical machine. In this embodiment, sending a request for the physical machine to be initialized to the preset bare metal interface based on the physical machine initialization request, and then setting the custom attributes of the physical machine to be initialized, can effectively ensure the smooth progress of the subsequent physical machine initialization work and comprehensively improve the efficiency of physical machine initialization.

[0074] In one embodiment, step 407 includes: issuing the atomic task of the current item in the initialization job package to the physical machine to be initialized; obtaining the check return of the execution of the atomic task of the current item by the physical machine to be initialized; when the check return indicates that the atomic task of the current item has been completed, issuing the atomic task of the next sequence corresponding to the atomic task of the current item to the physical machine to be initialized.

[0075] The initialization job package contains multiple atomic tasks of different types, arranged in sequence. The initialization control server 104 also issues the atomic tasks within the initialization job package in this order. The check return indicates the execution result of the current atomic task on the physical machine to be initialized. When the check return indicates that the current atomic task has been completed, the next atomic task in the sequence can be issued to execute the subsequent physical machine initialization.

[0076] Specifically, during the physical machine initialization process, since the execution consists of atomic tasks within the initialization job package, the execution results of each atomic task can be tracked after completion. This allows for fault location and repair based on the problematic atomic task during initialization, thereby improving initialization efficiency. When no problems occur, the next atomic task corresponding to the current task is directly sent to the physical machine to be initialized. This sequential execution of all atomic tasks within the initialization job package completes the entire physical machine initialization process. In this embodiment, by sequentially executing each atomic task within the initialization job package to perform the complete physical machine initialization job, and simultaneously checking the physical machine's execution of the atomic tasks during the process, the smooth completion of the initialization task can be effectively guaranteed, thus comprehensively improving the efficiency of physical machine initialization.

[0077] like Figure 4 As shown, in one embodiment, before step 207, the following steps are also included:

[0078] Step 401: Based on the successful download message, construct a physical machine cluster from the physical machines to be initialized.

[0079] Step 401 includes:

[0080] Step 403: Send atomic tasks from the initialization job package to the physical machines to be initialized in the physical machine cluster in sequence to complete the physical machine initialization of the physical machines to be initialized in the physical machine cluster.

[0081] In this context, a physical machine cluster refers to a collection of physical machines. Specifically, during initialization, to improve efficiency, a physical machine cluster can be constructed for batch processing. Specifically, when a download success message is received from a physical machine awaiting initialization, a predetermined number of these machines can be placed into a cluster and assigned a number within the cluster. When an atomic task is issued, the task is also simultaneously sent to the physical machines awaiting initialization within the cluster to notify them to perform initialization. In this embodiment, using a physical machine cluster for batch physical machine initialization management effectively improves the efficiency of physical machine initialization.

[0082] In one embodiment, before step 207, the method further includes: obtaining an atomic task adjustment instruction and updating the atomic tasks within the initialization job package according to the atomic task adjustment instruction; step 207 includes: sequentially sending the updated atomic tasks within the initialization job package to the physical machine to be initialized.

[0083] Specifically, in some cases, when performing physical machine initialization, it may be necessary to make personalized settings for each atomic task within the initialization job package. In this case, the initialization control server 104 can adjust the atomic tasks within the initialization job package accordingly after receiving the atomic task adjustment instruction. The physical machine to be initialized is also the adjusted atomic task, which can effectively ensure the accuracy of the initialization process.

[0084] like Figure 5 As shown, in one embodiment, after step 207, the following steps are included:

[0085] Step 502: Obtain the initialization check instruction.

[0086] Step 504: According to the initialization check instruction, call the check interface corresponding to the physical machine to be initialized, and find the initialization check package corresponding to the physical machine to be initialized.

[0087] Step 506: Send atomic tasks within the initialization check package to the physical machine to be initialized in sequence to complete the physical machine initialization check.

[0088] The check interface corresponding to the physical machine to be initialized is used to perform routine checks on the initialization settings of the physical machine to be initialized. The check process is similar to the initialization process. The atomic tasks corresponding to the check process can be executed based on the initialization check package to perform a complete check on the physical machine initialization settings. In one embodiment, the atomic tasks involved in the physical machine initialization check specifically include: (1) sfkvm user, (2) check app volume, (3) check storage volume, (4) check glusterfs yum source, (5) check dependency package installation, (6) check sfkvm group and user, set password, (7) check python3.6 and env, (8) check virtual-host code and canary directory, (9) check mounted glusterfs backup volume, (10) check installed qemu-kvm package, (11) check installed libvirt package, (12) check installed guestfs package, (13) check python3.6, (14) check python (15) Check virtualhost, (16) Check tool scripts under / home / sfkvm, (17) Check libvirt parameters, (18) Check iptables parameters, (19) Check kernel parameters, (20) Check systemd parameters, (21) Check installed sfc, (22) Check image synchronization. By executing the above atomic tasks once, the initialization settings of the physical machine can be effectively checked, thereby ensuring the effectiveness of the initialization process.

[0089] It should be understood that, although Figure 2-5 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2-5 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.

[0090] In one embodiment, such as Figure 6 As shown, a physical machine initialization device is provided, comprising:

[0091] The request acquisition module 601 is used to acquire the physical machine initialization request and determine the physical machine information of the physical machine to be initialized;

[0092] The command issuing module 603 is used to issue a download initialization script command to the physical machine to be initialized according to the storage type of the physical machine to be initialized;

[0093] The package lookup module 605 is used to call the physical machine initialization interface corresponding to the physical machine to be initialized when a download success message is received from the physical machine to be initialized, and to look up the initialization job package corresponding to the physical machine to be initialized.

[0094] The atomic task distribution module 607 is used to sequentially distribute atomic tasks within the initialization job package to the physical machine to be initialized, so as to complete the physical machine initialization.

[0095] In one embodiment, the request acquisition module 601 is specifically used to: acquire a physical machine initialization request; send a physical machine application request to a third-party server according to the physical machine initialization request; acquire the physical machine information of the physical machine to be initialized, and set the custom attributes of the physical machine to be initialized.

[0096] In one embodiment, the atomic task issuing module 607 is specifically used to: issue the atomic task of the current item in the initialization job package to the physical machine to be initialized; obtain the check return of the execution of the atomic task of the current item by the physical machine to be initialized; when the check return indicates that the atomic task of the current item has been completed, issue the atomic task of the next sequence corresponding to the atomic task of the current item to the physical machine to be initialized.

[0097] In one embodiment, a cluster building module is also included, which is used to: build a physical machine cluster based on the physical machines to be initialized according to the feedback download success message; the atomic task distribution module 607 is specifically used to: sequentially distribute atomic tasks in the initialization job package to the physical machines to be initialized in the physical machine cluster to complete the physical machine initialization of the physical machines to be initialized in the physical machine cluster.

[0098] In one embodiment, an atomic task adjustment module is further included, which is used to: obtain atomic task adjustment instructions and update the atomic tasks in the initialization job package according to the atomic task adjustment instructions; the atomic task distribution module 607 is specifically used to: sequentially distribute the updated atomic tasks in the initialization job package to the physical machine to be initialized.

[0099] In one embodiment, an initialization check module is further included, which is used to: obtain an initialization check instruction; call the check interface corresponding to the physical machine to be initialized according to the initialization check instruction, find the initialization check package corresponding to the physical machine to be initialized; and sequentially issue atomic tasks within the initialization check package to the physical machine to be initialized to complete the physical machine initialization check.

[0100] Specific limitations regarding the physical machine initialization device can be found in the limitations of the physical machine initialization method described above, and will not be repeated here. Each module in the aforementioned physical machine initialization device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the computer device, or stored in software in the memory of the computer device, so that the processor can call and execute the operations corresponding to each module.

[0101] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores physical machine initialization data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a physical machine initialization method.

[0102] Those skilled in the art will understand that Figure 7The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0103] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0104] Obtain the physical machine initialization request and determine the physical machine information of the physical machine to be initialized;

[0105] The command to download the initialization script is issued to the physical machine to be initialized based on its storage type.

[0106] When a download success message is received from the physical machine to be initialized, the physical machine initialization interface corresponding to the physical machine to be initialized is called to find the initialization job package corresponding to the physical machine to be initialized.

[0107] The atomic tasks within the initialization job package are sequentially sent to the physical machines to be initialized in order to complete the initialization of the physical machines.

[0108] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining a physical machine initialization request; sending a physical machine application request to a third-party server according to the physical machine initialization request; obtaining the physical machine information of the physical machine to be initialized, and setting the custom attributes of the physical machine to be initialized.

[0109] In one embodiment, when the processor executes the computer program, it further implements the following steps: sending the atomic task of the current item in the initialization job package to the physical machine to be initialized; obtaining the check return of the execution of the atomic task of the current item by the physical machine to be initialized; when the check return indicates that the atomic task of the current item has been completed, sending the atomic task of the next sequence corresponding to the atomic task of the current item to the physical machine to be initialized.

[0110] In one embodiment, when the processor executes the computer program, it also performs the following steps: constructing a physical machine cluster based on the physical machines to be initialized according to the feedback of the successful download message.

[0111] In one embodiment, when the processor executes the computer program, it also performs the following steps: obtaining atomic task adjustment instructions and updating the atomic tasks within the initial job package according to the atomic task adjustment instructions.

[0112] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining an initialization check instruction; calling the check interface corresponding to the physical machine to be initialized according to the initialization check instruction, and finding the initialization check package corresponding to the physical machine to be initialized; and sequentially sending atomic tasks within the initialization check package to the physical machine to be initialized to complete the physical machine initialization check.

[0113] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0114] Obtain the physical machine initialization request and determine the physical machine information of the physical machine to be initialized;

[0115] The command to download the initialization script is issued to the physical machine to be initialized based on its storage type.

[0116] When a download success message is received from the physical machine to be initialized, the physical machine initialization interface corresponding to the physical machine to be initialized is called to find the initialization job package corresponding to the physical machine to be initialized.

[0117] The atomic tasks within the initialization job package are sequentially sent to the physical machines to be initialized in order to complete the initialization of the physical machines.

[0118] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining a physical machine initialization request; sending a physical machine application request to a third-party server according to the physical machine initialization request; obtaining the physical machine information of the physical machine to be initialized and setting the custom attributes of the physical machine to be initialized.

[0119] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: issuing the atomic task of the current item in the initialization job package to the physical machine to be initialized; obtaining the check return of the execution of the atomic task of the current item by the physical machine to be initialized; when the check return indicates that the atomic task of the current item has been completed, issuing the atomic task of the next sequence corresponding to the atomic task of the current item to the physical machine to be initialized.

[0120] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: constructing a physical machine cluster based on the physical machines to be initialized based on the feedback of the successful download message.

[0121] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining atomic task adjustment instructions and updating the atomic tasks within the initial job package according to the atomic task adjustment instructions.

[0122] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining an initialization check instruction; calling the check interface corresponding to the physical machine to be initialized according to the initialization check instruction, and finding the initialization check package corresponding to the physical machine to be initialized; sequentially sending atomic tasks within the initialization check package to the physical machine to be initialized to complete the physical machine initialization check.

[0123] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0124] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0125] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A physical machine initialization method, the method comprising: Obtain the physical machine initialization request; According to the physical machine initialization request, a physical machine application request is sent to a third-party server. The third-party server is a server containing a preset bare metal interface, which is used to control the bare metal physical machine of the entity. The physical machine information of the physical machine to be initialized is obtained, and the custom attributes of the physical machine to be initialized are set to determine the physical machine information of the physical machine to be initialized. The physical machine to be initialized is a bare metal physical machine. The custom attributes include physical machine role, CPU super-resolution rate, Mem super-resolution rate, Disk super-resolution rate, VM number limit, storage type and resource pool type. A command to download the initialization script is issued to the physical machine to be initialized based on the storage type of the physical machine to be initialized; When a download success message is received from the physical machine to be initialized, the physical machine initialization interface corresponding to the physical machine to be initialized is called to find the initialization job package corresponding to the physical machine to be initialized. The initialization job package contains multiple atomic tasks that are executed in sequence. The atomic tasks are obtained by breaking down the initialization process into different small steps. The atomic tasks within the initialization job package are sequentially sent to the physical machine to be initialized to complete the physical machine initialization. During the physical machine initialization process, based on the execution feedback of the atomic tasks, initialization exceptions are obtained and the exception location and handling of initialization are completed. The step of sequentially issuing atomic tasks from the initialization job package to the physical machine to be initialized to complete the physical machine initialization includes: Send the atomic task of the current item in the initialization job package to the physical machine to be initialized; Obtain the check return of the atomic task of the current item executed by the physical machine to be initialized; When the check returns indicating that the atomic task of the current item has been completed, the next atomic task corresponding to the atomic task of the current item is sent to the physical machine to be initialized according to the execution order of the atomic tasks in the initialization job package.

2. The method according to claim 1, characterized in that, Before sequentially sending the atomic tasks within the initialization job package to the physical machine to be initialized, the process also includes: Based on the successful download message, construct a physical machine cluster from the physical machines to be initialized. The step of sequentially issuing atomic tasks from the initialization job package to the physical machine to be initialized to complete the physical machine initialization includes: The atomic tasks within the initialization job package are sequentially sent to the physical machines to be initialized within the physical machine cluster to complete the physical machine initialization of the physical machines to be initialized within the physical machine cluster.

3. The method according to claim 1, characterized in that, Before sequentially sending the atomic tasks within the initialization job package to the physical machine to be initialized, the process also includes: Obtain atomic task adjustment instructions, and update the atomic tasks within the initialization job package according to the atomic task adjustment instructions; The step of sequentially issuing the atomic tasks within the initialization job package to the physical machine to be initialized includes: The updated atomic tasks within the initialization job package are sequentially sent to the physical machine to be initialized.

4. The method according to claim 1, characterized in that, The step of sequentially issuing atomic tasks from the initialization job package to the physical machine to be initialized, to complete the physical machine initialization, includes: Obtain the initialization check instruction; According to the initialization check instruction, the check interface corresponding to the physical machine to be initialized is called to find the initialization check package corresponding to the physical machine to be initialized. The atomic tasks within the initialization check package are sequentially sent to the physical machine to be initialized in order to complete the physical machine initialization check.

5. A physical machine initialization device, characterized in that, The device includes: The request acquisition module is used to acquire physical machine initialization requests; send physical machine application requests to a third-party server based on the physical machine initialization requests, wherein the third-party server is a server containing a preset bare metal interface, the preset bare metal interface is used to control the bare metal physical machine of the entity; acquire the physical machine information of the physical machine to be initialized, and set the custom attributes of the physical machine to be initialized to determine the physical machine information of the physical machine to be initialized, wherein the physical machine to be initialized is a bare metal physical machine, and the custom attributes include physical machine role, CPU super-resolution rate, Mem super-resolution rate, Disk super-resolution rate, VM number limit, storage type and resource pool type; The command issuing module is used to issue a download initialization script command to the physical machine to be initialized according to the storage type of the physical machine to be initialized; The package lookup module is used to call the physical machine initialization interface when a download success message is received from the physical machine to be initialized, and to look up the initialization job package corresponding to the physical machine to be initialized. The initialization job package contains multiple atomic tasks that are executed in sequence. The atomic tasks are obtained by breaking down the initialization process into different small steps. The atomic task distribution module is used to sequentially distribute atomic tasks within the initialization job package to the physical machine to be initialized in order to complete the physical machine initialization. During the physical machine initialization process, based on the execution feedback of the atomic tasks, the module can obtain initialization exceptions and complete the exception location and handling of the initialization. The atomic task delivery module is specifically used for: delivering the atomic task of the current item in the initialization job package to the physical machine to be initialized; obtaining the check return of the execution of the atomic task of the current item by the physical machine to be initialized; when the check return indicates that the atomic task of the current item has been completed, delivering the atomic task corresponding to the next order of the atomic task of the current item to the physical machine to be initialized according to the execution order of the atomic tasks in the initialization job package.

6. The apparatus according to claim 5, characterized in that, It also includes a cluster building module, used to: build a physical machine cluster based on the physical machines to be initialized according to the feedback of the successful download message; the atomic task distribution module is specifically used to: sequentially distribute the atomic tasks in the initialization job package to the physical machines to be initialized in the physical machine cluster to complete the physical machine initialization of the physical machines to be initialized in the physical machine cluster.

7. The apparatus according to claim 5, characterized in that, It also includes an atomic task adjustment module, used to: obtain atomic task adjustment instructions and update the atomic tasks in the initialization job package according to the atomic task adjustment instructions; the atomic task distribution module is specifically used to: sequentially distribute the updated atomic tasks in the initialization job package to the physical machine to be initialized.

8. The apparatus according to claim 5, characterized in that, It also includes an initialization check module, used to: obtain an initialization check instruction; and, according to the initialization check instruction, call the check interface corresponding to the physical machine to be initialized and find the initialization check package corresponding to the physical machine to be initialized. The atomic tasks within the initialization check package are sequentially sent to the physical machine to be initialized in order to complete the physical machine initialization check.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Physical machine, configuration method and device of physical machine

    CN106911500A

  • Resource allocation method, device and apparatus, and computer readable storage medium

    CN110888732A

  • Application deployment method and device, computer equipment and storage medium

    CN111708550A

  • Operating system initialization method and system, computer equipment and storage medium

    CN111880852A