System deployment method, computer equipment and storage medium

By determining the network boot mode and bootloader, and combining them with the operating system type, automatic configuration of multiple system types is achieved, solving the problem of low configuration efficiency of a single operating system in existing technologies and improving the deployment efficiency of server operating systems.

CN121832974APending Publication Date: 2026-04-10SHANGHAI LONGSYS DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, Preboot Execution Environment (PXE) technology only supports configuration for a single operating system and cannot be compatible with the installation and booting of multiple operating systems, resulting in low deployment efficiency for the corresponding operating system on the server and failing to meet actual production and testing needs.

Method used

By determining the network boot mode, obtaining the preset bootloader and system configuration policy, utilizing the location information of multiple bootloaders, ensuring compatibility with multiple test servers, and automatically configuring the system configuration file according to the operating system type, the deployment of operating systems of various system types can be achieved.

Benefits of technology

It improves the deployment efficiency of the server's corresponding operating system, realizes automatic configuration of multiple system types, and meets the needs of actual production and testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121832974A_ABST
    Figure CN121832974A_ABST
Patent Text Reader

Abstract

The invention provides a system deployment method, computer equipment and a storage medium, and the method comprises the steps: determining a network starting mode in response to a network starting signal, and determining a preset bootstrap program according to the network starting mode; obtaining a network address and a storage position of the preset bootstrap program; acquiring the preset bootstrap program according to the network address; acquiring a preset system file according to the preset bootstrap program; loading the preset system file, and obtaining a system configuration file according to the preset bootstrap program; and determining a system configuration strategy corresponding to the system configuration file, and deploying the system configuration file in the test server according to the system configuration strategy. According to the method, the system deployment efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet, and particularly relates to a system deployment method, a computer device and a storage medium. BACKGROUND

[0002] With the development of big data, the demand for servers of enterprises is increasing. Before a server is officially put into operation, the server needs to be configured with a corresponding operating system.

[0003] In the related art, the operating system of the server is mainly configured by using a pre-boot execution environment (PXE) technology. However, the above method only supports the configuration of a single operating system, and cannot be compatible with the installation and booting of multiple operating systems, resulting in low deployment efficiency of the server corresponding to the operating system, and failing to meet the actual production and test requirements. SUMMARY

[0004] In view of the above, it is necessary to provide a system deployment method, a computer device and a storage medium, which can solve the problem of low deployment efficiency of the server corresponding to the operating system.

[0005] In a first aspect, an embodiment of the present application provides a system deployment method applied to a test server, the system deployment method comprising: determining a network boot mode in response to a network boot signal, and determining a preset boot program according to the network boot mode; obtaining a network address and a storage location of the preset boot program; obtaining the preset boot program according to the network address; obtaining a preset system file according to the preset boot program; loading the preset system file, and obtaining a system configuration file according to the preset boot program; determining a system configuration strategy corresponding to the system configuration file, and deploying the system configuration file to the test server according to the system configuration strategy.

[0006] Further, in the above system deployment method provided by the embodiment of the present application, the determination of the network boot mode and the determination of the preset boot program according to the network boot mode comprise: when the network boot mode is a first boot mode, determining a first boot program corresponding to the first boot mode; when the network boot mode is a second boot mode, determining a server architecture corresponding to the test server, and determining a second boot program according to the server architecture.

[0007] Further, in the above system deployment method provided by the embodiment of the present application, the determination of the second boot program according to the server architecture comprises: determining the second boot program corresponding to the server architecture according to a preset correspondence between the server architecture and the preset boot program.

[0008] Further, in the system deployment method provided by the embodiment of the present application, the method further comprises: determining a system type of an operating system corresponding to the test server; and determining the system configuration strategy based on the system type.

[0009] Further, in the system deployment method provided by the embodiment of the present application, after the system configuration file is deployed on the test server according to the system configuration strategy, the method further comprises: configuring a test environment corresponding to the test server based on the obtained environment configuration information.

[0010] Further, in the system deployment method provided by the embodiment of the present application, the environment configuration information comprises an environment file, and before the test environment corresponding to the test server is configured based on the obtained environment configuration information, the method further comprises: determining a server architecture corresponding to the test server and a system type of an operating system; determining a preset environment file identifier based on the server architecture and the system type; and obtaining the environment file corresponding to the environment file identifier based on the environment file identifier.

[0011] Further, in the system deployment method provided by the embodiment of the present application, the environment configuration information comprises a software source, and before the test environment corresponding to the test server is configured based on the obtained environment configuration information, the method further comprises: determining a preset software source identifier based on the system type; and obtaining the software source corresponding to the software source identifier based on the software source identifier.

[0012] Further, in the system deployment method provided by the embodiment of the present application, the environment configuration information comprises a preset test program and preset compilation information, and the test environment corresponding to the test server is configured based on the obtained environment configuration information, comprising: determining a first test software group based on the preset test program; determining a second test software group based on the environment file and the software source; determining a third test software group based on the environment file and the preset compilation information; and determining the test environment corresponding to the test server based on the first test software group, the second test software group and the third test software group.

[0013] In a second aspect, an embodiment of the present application provides a system deployment apparatus applied to a test server, the system deployment apparatus comprising: a mode determining module configured to determine a network starting mode in response to a network starting signal, and determine a preset boot program according to the network starting mode; a location obtaining module configured to obtain a network address and a storage location of the preset boot program; a program obtaining module configured to obtain the preset boot program according to the network address; a file obtaining module configured to obtain a preset system file according to the preset boot program; a file loading module configured to load the preset system file, and obtain a system configuration file according to the preset boot program; and a file deployment module configured to determine a system configuration strategy corresponding to the system configuration file, and deploy the system configuration file to the test server according to the system configuration strategy.

[0014] In a third aspect, an embodiment of the present application further provides a computer device, which comprises a processor and a memory, and the processor is configured to execute a computer program stored in the memory to implement the system deployment method in any of the above aspects.

[0015] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the system deployment method in any of the above aspects.

[0016] In the system deployment method provided by the embodiment of the present application, the network starting mode is determined in response to the network starting signal, and the preset boot program is determined according to the network starting mode; the network address and the storage location of the preset boot program are obtained; the preset boot program is obtained according to the network address; the preset system file is obtained according to the preset boot program; the preset system file is loaded, and the system configuration file is obtained according to the preset boot program; the system configuration strategy corresponding to the system configuration file is determined, and the system configuration file is deployed to the test server according to the system configuration strategy. The above method can make the boot program compatible with multiple test servers by deploying the location information of multiple boot programs, determining the preset boot program according to the network starting mode corresponding to the test server, and guiding the deployment of the operating system according to the preset boot program. The application can automatically configure the operating system of multiple system types by determining the system configuration strategy of the system type corresponding to the operating system and the system configuration file corresponding to the operating system, and configuring the system configuration file by using the system configuration strategy, thereby improving the deployment efficiency of the operating system corresponding to the server. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 FIG. 1 is an application scenario diagram of the system deployment method provided by the embodiment of the present application.

[0018] Figure 2 FIG. 1 is a flow diagram of a system deployment method according to an embodiment of the present application.

[0019] Figure 3 FIG. 2 is an interaction diagram of a test server and a preset server according to an embodiment of the present application.

[0020] Figure 4 FIG. 3 is a flow diagram of a determination of a preset boot program according to an embodiment of the present application.

[0021] Figure 5 FIG. 4 is a flow diagram of a system configuration policy determination method according to an embodiment of the present application.

[0022] Figure 6 FIG. 5 is a flow diagram of an environment file determination method according to an embodiment of the present application.

[0023] Figure 7 FIG. 6 is a flow diagram of a software source determination method according to an embodiment of the present application.

[0024] Figure 8 FIG. 7 is a flow diagram of a test environment determination method according to an embodiment of the present application.

[0025] Figure 9 FIG. 8 is a structural diagram of a system deployment apparatus according to an embodiment of the present application.

[0026] Figure 10 FIG. 9 is a structural diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to more clearly understand the above objectives, features and advantages of the present application, the present application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0028] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present application. The described embodiments are part of the present application, but not all embodiments.

[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.

[0030] The key terms appearing in the embodiments of the present application are explained below.

[0031] Pre-boot Execution Environment (PXE) technology: provides a mechanism for booting a computer using a network interface, which allows the computer to boot without relying on local data storage (e.g., hard disk) or a locally installed operating system.

[0032] Dynamic Host Configuration Protocol (DHCP) service: provides an application-layer network management protocol for automatically assigning IP addresses and other network configuration parameters to devices on the network.

[0033] Trivial File Transfer Protocol (TFTP) service: a protocol for simple file transfer between clients and servers, providing uncomplicated and low-overhead file transfer services.

[0034] Network File System (NFS) provides a technology that enables different machines and operating systems to share files over a network. The main advantage of NFS is that it makes users feel as if they are accessing files on the network as if they were accessing a local hard drive, which greatly simplifies data sharing and management.

[0035] The Hypertext Transfer Protocol (HTTP) service defines the rules for exchanging data between a client (usually a web browser) and a server. The HTTP protocol is mainly used to transfer hypertext, such as HTML documents, from the server to the client, which constitutes the common web page content.

[0036] With the development of big data, enterprises have an increasing demand for servers. Before a server is officially launched, it needs to be configured with the appropriate operating system.

[0037] In related technologies, the Pre-boot Execution Environment (PXE) technology is mainly used to configure the server's operating system. PXE technology can be applied in client / server network modes, allowing clients (also referred to as "test servers" in this embodiment) to download images from remote servers over the network, thereby enabling the operating system to boot over the network. However, the above method only supports the configuration of a single operating system and cannot be compatible with the installation and booting of multiple operating systems, resulting in low deployment efficiency of the server's corresponding operating system and failing to meet actual production and testing needs.

[0038] In view of the above problems, embodiments of this application provide a system deployment method, computer equipment, and storage medium, which can improve the deployment efficiency of the server's corresponding operating system.

[0039] Figure 1 This is an application scenario diagram of the system deployment method provided in the embodiments of this application. For example... Figure 1 As shown, the application scenario of the system deployment method includes a test server and a preset server, which are connected via a network. The test server can be a server or computer device on which the operating system is to be deployed, and the preset server can be a server providing operating system deployment services. The number of test servers can be one or more, and the number can be set according to actual needs. This embodiment uses one test server as an example. The number of preset servers can be multiple. For example, the preset servers can include a first server, a second server, and a third server. The first server can be used to allocate network addresses to the test server and inform the test server of the storage location of the corresponding boot program; the first server can be a DHCP server. The second server can be used to provide the boot program and preset system files; the second server can be a TFTP server. The third server can be used to provide the files required for operating system installation; the third server can be an NFS server or an HTTP server.

[0040] In the application scenarios provided in the embodiments of this application, by connecting the test server to a preset server, the test server can load the files required for deploying the operating system from the preset server, thereby enabling the deployment of the operating system within the test server.

[0041] The technical solutions of this application will be described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0042] Figure 2 This is a flowchart illustrating a system deployment method provided in an embodiment of this application, which is applied to a computer device. Figure 2 As shown, it includes the following steps: S11, in response to the network startup signal, determine the network startup mode, and determine the preset boot program based on the network startup mode.

[0043] In at least one embodiment of this application, the test server and the first server are connected via a network. The network startup signal can be a signal emitted by the test server indicating that the network between the test server and the first server has been enabled. The network startup mode is used to indicate the startup mode of the network between the test server and the first server. The network startup mode can include Legacy mode and UEFI mode. Legacy mode, also known as traditional mode, is the standard Basic Input Output System (BIOS) startup method used since the birth of computers. Legacy mode primarily supports hard drives formatted with the Master Boot Record (MBR), supports hard drives up to 2.2TB, and supports the installation of 32-bit operating systems. UEFI mode is a newer startup mode with fast startup characteristics. It can shorten system startup time by pre-loading system loading modules. UEFI mode can support hard drive capacities up to 18EB and supports the installation of 64-bit operating systems.

[0044] In some embodiments, the Network Boot Program (NBP) is a pre-configured program used to boot and load the files required by the operating system. The NBP can guide the test server to interact with the network boot server. There can be one or more network boot programs, and the number of network boot programs is related to the network boot mode.

[0045] S12, obtain the network address and the storage location of the preset boot program from the first server.

[0046] In at least one embodiment of this application, combined with Figure 3 This application provides an embodiment illustrating the interaction between a test server and a preset server, as shown in the diagram. Figure 3 As shown, after the network between the test server and the first server is established, the test server can send a first request to the first server. This first request requests the network address and the storage location of the preset bootloader. Upon receiving the first request, the first server can return the network address and the storage location of the preset bootloader to the test server. The network address can be the test server's Internet Protocol (IP) address, which allows the test server to communicate with the second and third servers.

[0047] In some embodiments, the process by which the first server returns a network address to the test server may include four steps: DHCP Discovery, DHCP Offer, DHCP Request, and DHCP Acknowledgment. The specific execution of these four steps can be found in the descriptions of related technologies and will not be elaborated upon here.

[0048] In some embodiments, there may be multiple preset bootloaders, and different preset bootloaders are stored in a specified storage location within the second server. The first server feeds back the storage location of the preset bootloaders to the test server, enabling the test server to retrieve the preset bootloaders from the storage location of the second server based on the storage location.

[0049] S13, obtain the preset boot program from the second server based on the network address.

[0050] In at least one embodiment of this application, the test server establishes a communication connection with the second server based on the network address. Then, the test server sends a second request to the second server, requesting the retrieval of a preset bootloader located at a storage location. Upon receiving the second request, the second server can send the preset bootloader located at the storage location back to the test server.

[0051] S14, according to the preset boot program, obtain the preset system file from the second server.

[0052] In at least one embodiment of this application, the test server, by loading a preset bootloader, can determine that it needs to obtain system files required for configuring the operating system from the second server (hereinafter referred to as "preset system files" for ease of description). The test server sends a third request to the second server, the third request being used to request the preset system files. After receiving the third request, the second server returns the preset system files to the test server.

[0053] In some embodiments, the preset system files may include a system kernel file and module files. The system kernel file may be a vmlinuz file, which is an executable kernel file. The module files may be an initrd.img file, which is a temporary root file mounted during the operating system's boot process and includes various executable programs and drivers. By loading the preset system files, the test server can gradually load the necessary modules and services of the operating system, enabling the operating system to boot successfully.

[0054] S15, load the preset system file, and obtain the system configuration file from the third server according to the preset boot program.

[0055] In at least one embodiment of this application, the test server, by loading a preset bootloader, can determine that it needs to obtain the system configuration file corresponding to the operating system from the third server. The test server sends a fourth request to the third server, which requests the system configuration file. After receiving the fourth request, the third server returns the system configuration file to the test server.

[0056] In some embodiments, the system configuration file is a pre-configured key configuration file required for deploying the operating system. The system configuration file may include multiple installation setting options, including but not limited to the IP address, subnet mask, gateway, DNS server, and startup parameters assigned to the test server.

[0057] In some embodiments, the system configuration file is related to the operating system type; for each operating system type, there exists a corresponding system configuration file. The mapping between operating system types and system configuration files can be pre-defined, and by querying this mapping, the system configuration file corresponding to the operating system to be deployed can be determined.

[0058] S16, determine the system configuration policy corresponding to the system configuration file, and deploy the system configuration file on the test server according to the system configuration policy.

[0059] In at least one embodiment of this application, the system configuration strategy corresponding to the system configuration file differs depending on the operating system of the test server. The system configuration strategy may include, but is not limited to, Pressed, Kickstart, Cloud-init, and Autoyast methods. Specifically, the Pressed method eliminates the need for any manual configuration during operating system installation, as all configurations are preset before deployment; the Kickstart method allows system administrators to create a configuration file containing all settings options during system installation, thus achieving unattended automated installation; the Cloud-init method is designed specifically for cloud environments and can automatically configure the system when a virtual machine or container starts, supporting mainstream cloud service providers such as AWS, Azure, and Google Cloud; the Autoyast method can automatically answer prompts during installation using XML configuration files, achieving fully automated installation and basic system configuration.

[0060] In the system deployment method provided in the embodiments of this application, by deploying the location information of multiple boot programs in the first server, then determining the preset boot program according to the network boot mode corresponding to the test server, and booting and deploying the operating system according to the preset boot program, the boot program can be compatible with multiple test servers; and by determining the system configuration policy corresponding to the operating system type and the system configuration file corresponding to the operating system, and configuring the system configuration file using the system configuration policy, this application can realize automatic configuration of operating systems of multiple system types, thereby improving the deployment efficiency of the server corresponding to the operating system.

[0061] In at least one embodiment of this application, the preset bootloader is related to the network boot mode and server architecture of the test server, and the bootloader corresponding to the test server can be determined based on the network boot mode and server architecture of the test server. Figure 4 This is a schematic diagram of the process for determining the preset boot program provided in the embodiments of this application, such as... Figure 4 As shown, it includes the following steps: Step 1: When the network boot mode is the first boot mode, determine the first boot program corresponding to the first boot mode.

[0062] In at least one embodiment of this application, the first boot mode can be a traditional boot mode, such as Legacy mode. There is a correspondence between the first boot mode and the first bootloader; by querying this correspondence, the first bootloader corresponding to the first boot mode can be determined. For example, when the network boot mode is Legacy mode, the corresponding first bootloader can be the pxelinux.0 bootloader.

[0063] Step 2: When the network startup mode is the second startup mode, determine the server architecture corresponding to the test server, and determine the second boot program based on the server architecture.

[0064] In at least one embodiment of this application, the second boot mode can be a newer boot mode, for example, the second boot mode can be a UEFI mode. When the network boot mode is UEFI mode, the server architecture corresponding to the test server can be determined. The server architecture can include, but is not limited to, ARM architecture and X86_64 architecture. Each server architecture has a corresponding second boot program.

[0065] In one embodiment, the second boot program corresponding to the server architecture can be determined based on the pre-set correspondence between the server architecture and the preset boot program. The correspondence between the server architecture and the second boot program can be set according to actual needs. For example, when the server architecture is ARM architecture, the corresponding second boot program can be BOOTAA64.EFI boot program; when the server architecture is X86_64 architecture, the corresponding second boot program can be Grubx64.efi boot program.

[0066] In the system deployment method provided in the embodiments of this application, multiple bootloader storage locations are deployed in the first server. Then, a preset bootloader is determined according to the network boot mode and server architecture corresponding to the test server, and the operating system is deployed according to the preset bootloader, so that the bootloader can be compatible with multiple server architectures.

[0067] In at least one embodiment of this application, the system configuration strategy is related to the system type of the operating system corresponding to the test server, and the system configuration strategy can be determined based on the system type of the operating system. Figure 5 This is a flowchart illustrating the system configuration policy determination method provided in an embodiment of this application. The system configuration policy determination method is applied to computer devices. Figure 5 As shown, it includes the following steps: S21, determine the system type of the operating system corresponding to the test server.

[0068] In at least one embodiment of this application, the system type of the operating system may include, but is not limited to, Debian operating system, CentOS operating system, Red Hat operating system, UOS operating system, Euler operating system, Kylin operating system, Ubuntu operating system and SUSE operating system.

[0069] S22, Determine the system configuration strategy based on the system type.

[0070] In at least one embodiment of this application, a pre-defined correspondence between system types and system configuration policies is established. By querying this correspondence, the system configuration policy corresponding to the system type can be determined. System configuration policies may include, but are not limited to, Pressed, Kickstart, Cloud-init, and Autoyast methods.

[0071] For example, when the operating system is Debian, the corresponding system configuration strategy can be Pressed; when the operating system is CentOS, Red Hat, UOS, Euler, or Kylin, the corresponding system configuration strategy can be Kickstart; when the operating system is Ubuntu, the corresponding system configuration strategy can be Cloud-init; and when the operating system is SUSE, the corresponding system configuration strategy can be Autoyast.

[0072] In the system deployment method provided in the embodiments of this application, by determining the system configuration strategy corresponding to the operating system type and configuring the system configuration file using the system configuration strategy, automatic configuration of multiple types of operating systems can be achieved, thereby improving the deployment efficiency of the server corresponding to the operating system.

[0073] In at least one embodiment of this application, after deploying the system configuration file to the test server according to the system configuration policy, the method further includes: configuring the test environment corresponding to the test server based on environment configuration information obtained from the third server. After the system configuration file is deployed to the test server according to the system configuration policy, the operating system deployment is complete. To ensure the test server meets actual testing requirements, the operating system needs to be adapted, and the test environment of the test server needs to be configured. For example, the test server can send a request to the third server to request the environment configuration file. After receiving the request, the third server returns the environment configuration file to the test server.

[0074] In some embodiments, the environment configuration file can be the environment configuration information required for the test server to install the test software. The environment configuration file may include a preset test program, environment files, software sources, and preset compilation information. The preset test program is a pre-configured test environment program containing software content shared by operating systems of multiple system types. Environment files may include pre-configured scripts that automatically execute a series of commands or tasks on the test server, such as system configuration, software installation, or network settings. Software sources may include configuration information specifying the location of software package repositories. By parsing the software sources, the test server can obtain and update the required software. Software sources typically include a Uniform Resource Locator (URL) address, package type, verification method, etc., used for software installation, updates, and management. Preset compilation information includes the compiled source code and other information required by the test software. Using the preset compilation information, the test software can meet actual testing requirements.

[0075] In some embodiments, the order of requests for the preset test program, environment file, software source, and preset compilation information can be set according to actual needs and is not limited here. For example, the test server can send a fifth request to the third server to obtain the preset test program. After receiving the fifth request, the third server returns the preset test program to the test server. The test server loads the preset test program and sends a sixth request to the third server to obtain the environment file. After receiving the sixth request, the third server returns the environment file to the test server. The test server sends a seventh request to the third server to obtain the software source. After receiving the seventh request, the third server returns the software source to the test server. The test server sends an eighth request to the third server to obtain preset compilation information. After receiving the eighth request, the third server returns the preset compilation information to the test server. This embodiment of the application obtains environment configuration information from the third server and configures the environment required for installing the test software on the test server based on the environment configuration file, enabling the test server to meet testing requirements.

[0076] In at least one embodiment of this application, the environment configuration information may include an environment file. Before configuring the test environment corresponding to the test server based on the environment configuration information obtained from the third server, the environment file may be obtained from the third server. Figure 6 This is a flowchart illustrating the environment file determination method provided in an embodiment of this application. The environment file determination method is applied to computer devices. Figure 6 As shown, it includes the following steps: S31, determine the server architecture and operating system type corresponding to the test server.

[0077] In at least one embodiment of this application, the server architecture and operating system type of the test server can be set according to actual needs. The server architecture may include, but is not limited to, ARM architecture and X86_64 architecture, and the operating system may include, but is not limited to, Debian operating system, CentOS operating system, Red Hat operating system, UOS operating system, Euler operating system, Kylin operating system, Ubuntu operating system and SUSE operating system.

[0078] S32, Based on the server architecture and the system type, determine the preset environment file identifier.

[0079] In at least one embodiment of this application, a pre-defined correspondence between server architecture, system type, and environment file identifier is established. By querying this correspondence, the environment file identifier corresponding to the server architecture and system type can be determined. The environment file identifier is a pre-defined identifier used to represent an environment file. The environment file identifier can be a text identifier, a number identifier, or a color identifier, and there is no limitation herein.

[0080] S33, Based on the environment file identifier, obtain the environment file corresponding to the environment file identifier from the third server.

[0081] In at least one embodiment of this application, there is a correspondence between environment file identifiers and environment files. By querying this correspondence, the environment file corresponding to the test server can be obtained.

[0082] In some embodiments, the test server sends a request (e.g., a sixth request) to a third server, which requests the environment file corresponding to the environment file identifier. Upon receiving the sixth request, the third server returns the environment text to the test server.

[0083] The embodiments of this application determine the environment file based on the server architecture and operating system type corresponding to the test server, so that the environment file can meet the actual needs of the test server and improve the accuracy of server deployment.

[0084] In at least one embodiment of this application, the environment configuration information includes a software source, which is related to the system type of the operating system. Figure 7 This is a schematic flowchart of a method for determining a software source provided in an embodiment of this application. The method for determining a software source is applied to computer devices. Figure 7 As shown, it includes the following steps: S41, Based on the system type, determine a preset software source identifier.

[0085] S42, Based on the software source identifier, obtain the software source corresponding to the software source identifier from the third server.

[0086] In at least one embodiment of this application, a software source identifier is used to uniquely identify a software source, and the software source is related to the system type of the operating system in the test server. A pre-defined correspondence between software source identifiers and software sources allows the determination of the software source corresponding to a software source identifier by querying this correspondence.

[0087] In some embodiments, the test server sends a seventh request to the third server, the seventh request being used to request the software source corresponding to the software source identifier. Upon receiving the seventh request, the third server returns the software source to the test server.

[0088] For example, when the operating system is CentOS, Red Hat, UOS, Euler, or Kylin, the corresponding software repository is the yum software repository; when the operating system is Debian or Ubuntu, the corresponding software repository is the apt software repository; and when the operating system is SUSE, the corresponding software repository is the zypper software repository.

[0089] This application embodiment determines the software source based on the system type corresponding to the operating system, and combines the software source to realize the customization of the test software, so that the software source can meet the actual needs of the test server and improve the accuracy of server deployment.

[0090] In at least one embodiment of this application, when determining the test environment, multiple test software groups can be determined, and the test environment of the test server can be configured through the multiple test software groups, so that the test server can meet the test requirements based on the multiple test software groups. Figure 8 This is a flowchart illustrating the test environment determination method provided in an embodiment of this application. The test environment determination method is applied to computer equipment. Figure 8 As shown, it includes the following steps: S51, Based on the preset test program, determine the first test software group.

[0091] In at least one embodiment of this application, the environment configuration information includes a preset test program and preset compilation information. The preset test program is a pre-set test environment program that automatically executes a series of commands to configure the operating system. These commands may include installing software packages, setting environment variables, configuring services, etc. The test environment program contains software content common to multiple operating system types (for ease of description, this embodiment is referred to as a "general software package"). The preset compilation information includes the compiled source code and other information required by the test software. Using the preset compilation information, the test software can meet actual testing requirements.

[0092] In some embodiments, the test server can obtain a first test software group by loading a preset test program, and the first test software group can be a generic software package that does not require installation.

[0093] S52, Based on the environment file and the software source, determine the second test software group.

[0094] In at least one embodiment of this application, the second test software group can be a test software package that is supported by the software source for installation. The second test software group can be determined by loading the environment file and the software source.

[0095] S53, Based on the environment file and the preset compilation information, determine the third test software group.

[0096] In some embodiments, the test server can also compile and install a third test software group based on environment files and preset compilation information. The third test software group is a test package that requires compiling source code for installation.

[0097] S54, based on the first test software group, the second test software group and the third test software group, determine the test environment corresponding to the test server.

[0098] In some embodiments, after installing the first test software group, the second test software group, and the third test software group on the test server, the test server can also obtain preset test code from the third server. The test code is pre-set code used to perform relevant tests on the first test software group, the second test software group, and the third test software group. By installing the first test software group, the second test software group, and the third test software group on the operating system of the test server, and using the test code to test the aforementioned test software groups, the test server can meet actual testing requirements.

[0099] This application embodiment configures a first test software group, a second test software group, and a third test software group to ensure that the environmental information of the test server meets the actual needs of the test server, thereby improving the accuracy of server deployment.

[0100] Figure 9 This is a structural diagram of a system deployment apparatus provided in an embodiment of this application. In some embodiments, the system deployment apparatus 20 may include multiple functional modules composed of computer program segments. The computer programs of each program segment in the system deployment apparatus 20 may be stored in a memory and executed by at least one processor to perform (see details). Figure 2 (Description) The functions of the system deployment.

[0101] In this embodiment, the system deployment device 20 can be divided into multiple functional modules according to the functions it performs. These functional modules may include: a pattern determination module 201, a location acquisition module 202, a program acquisition module 203, a file acquisition module 204, a file loading module 205, and a file deployment module 206. The term "module" in this application refers to a series of computer program segments that can be executed by at least one processor and perform a fixed function, and which are stored in memory. In this embodiment, the functions of each module will be detailed in subsequent embodiments.

[0102] The mode determination module 201 can be used to determine the network startup mode in response to the network startup signal, and determine the preset boot program based on the network startup mode.

[0103] The location acquisition module 202 can be used to obtain the network address and the storage location of the preset boot program from the first server.

[0104] The program acquisition module 203 can be used to obtain the preset boot program from the second server based on the network address.

[0105] The file acquisition module 204 can be used to acquire a preset system file from the second server according to the preset boot program.

[0106] The file loading module 205 can be used to load the preset system file and obtain the system configuration file from the third server according to the preset boot program.

[0107] The file deployment module 206 can be used to determine the system configuration policy corresponding to the system configuration file, and deploy the system configuration file on the test server according to the system configuration policy.

[0108] Figure 10 This is a schematic diagram of the structure of the computer device provided in an embodiment of this application. Figure 10 As shown, the computer device 10 includes a memory 11, at least one processor 12, and at least one communication bus 13. The at least one communication bus 13 enables communication between the memory 11 and the at least one processor 12. The processor 12 is used to implement a system deployment method when executing a computer program stored in the memory 11. In one embodiment, the computer device 10 can be... Figure 1 The test server in the middle.

[0109] Those skilled in the art should understand that the structure of the computer device 10 can be either a bus topology or a star topology. The computer device 10 may also include more or fewer other hardware or software than shown in the figure, or different component arrangements.

[0110] In some embodiments, the computer device 10 is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The computer device 10 can also connect to client devices, which include, but are not limited to, any electronic product that can interact with a client via a keyboard, mouse, remote control, touchpad, or voice control device, such as personal computers, tablet computers, smartphones, and digital cameras.

[0111] It should be noted that computer equipment 10 is merely an example. Other existing or future electronic products that are suitable for this application should also be included within the scope of protection of this application and are incorporated herein by reference.

[0112] In some embodiments, the memory 11 stores a computer program that, when executed by the at least one processor 12, implements all or part of the steps in the system deployment method described above. The memory 11 includes read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0113] Furthermore, the computer-readable storage medium may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system, at least one application required for a function, etc.; and the data storage area may store data created based on the use of blockchain nodes, etc.

[0114] In some embodiments, at least one processor 12 is the control unit of the computer device 10, connecting various components of the computer device 10 via various interfaces and lines. It executes programs or modules stored in the memory 11 and calls data stored in the memory 11 to perform various functions of the computer device 10 and process data. For example, when at least one processor 12 executes a computer program stored in the memory 11, it implements all or part of the steps of the system deployment method in this embodiment; or it implements all or part of the functions of the system deployment apparatus. At least one processor 12 may be composed of integrated circuits, such as a single-packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips.

[0115] Although not shown, the computer device 10 may also include a power supply (such as a battery) to power various components. Preferably, the power supply can be logically connected to at least one processor 12 via a power management device, thereby enabling functions such as charging, discharging, and power consumption management. The power supply may also include one or more DC or AC power sources, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The computer device 10 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0116] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium. This software functional module, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, computer equipment, or network device, etc.) or processor to execute portions of the methods of the various embodiments of this application.

[0117] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0118] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0119] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0120] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that it can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other elements or, and the singular does not exclude the plural. Multiple elements or devices recited in the specification may also be implemented by a single element or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.

[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.

Claims

1. A system deployment method applied to a test server, characterized in that, The system deployment method includes: In response to a network startup signal, a network startup mode is determined, and a preset boot program is determined based on the network startup mode; Obtain the network address and the storage location of the preset bootloader; Based on the network address, obtain the preset boot program; Based on the preset boot program, obtain the preset system files; Load the preset system file and obtain the system configuration file according to the preset bootloader; Determine the system configuration policy corresponding to the system configuration file, and deploy the system configuration file on the test server according to the system configuration policy.

2. The system deployment method as described in claim 1, characterized in that, The step of determining the network boot mode and determining the preset boot program based on the network boot mode includes: When the network boot mode is the first boot mode, the first boot program corresponding to the first boot mode is determined; When the network startup mode is the second startup mode, the server architecture corresponding to the test server is determined, and the second boot program is determined based on the server architecture.

3. The system deployment method as described in claim 2, characterized in that, The determination of the second bootloader based on the server architecture includes: Based on the pre-set correspondence between the server architecture and the preset bootloader, the second bootloader corresponding to the server architecture is determined.

4. The system deployment method as described in claim 1, characterized in that, Determining the system configuration policy corresponding to the system configuration file includes: Determine the system type of the operating system corresponding to the test server; Based on the system type, determine the system configuration strategy.

5. The system deployment method as described in claim 1, characterized in that, After deploying the system configuration file to the test server according to the system configuration policy, the method further includes: Based on the obtained environment configuration information, configure the test environment corresponding to the test server.

6. The system deployment method as described in claim 5, characterized in that, The environment configuration information includes environment files. Before configuring the test environment corresponding to the test server based on the obtained environment configuration information, the method further includes: Determine the server architecture and operating system type corresponding to the test server; Based on the server architecture and the system type, a preset environment file identifier is determined; Based on the environment file identifier, obtain the environment file corresponding to the environment file identifier.

7. The system deployment method as described in claim 6, characterized in that, The environment configuration information includes software sources. Before configuring the test environment corresponding to the test server based on the acquired environment configuration information, the method further includes: Based on the system type, a preset software source identifier is determined; Based on the software source identifier, obtain the software source corresponding to the software source identifier.

8. The system deployment method as described in claim 7, characterized in that, The environment configuration information includes preset test programs and preset compilation information. The step of configuring the test environment corresponding to the test server based on the acquired environment configuration information includes: Based on the preset test program, the first test software group is determined; Based on the environment file and the software source, a second test software group is determined; Based on the environment file and the preset compilation information, the third test software group is determined; Based on the first test software group, the second test software group, and the third test software group, the test environment corresponding to the test server is determined.

9. A computer device, characterized in that, The computer device includes a processor and a memory, the processor being configured to implement the system deployment method as described in any one of claims 1 to 8 when executing a computer program stored in the memory.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the system deployment method as described in any one of claims 1 to 8.