Cluster deployment method, master server, target device and storage medium
Patent Information
- Application Number
- CN202211468746.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-22
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2042-11-22
AI Technical Summary
[0004]现有技术工具kubeadm、开源版kubespray都无法基于国产操作系统进行直接交付
[0037] This invention provides a cluster deployment method, a master control server, target devices, and a storage medium. The method includes: sending initialization instruction information to at least one target device, instructing the at least one target device to form an initial cluster; receiving initial metadata of the target device from any one target device in the initial cluster; the initial metadata being initialization parameters of the target device; if a preset operating system is identified based on the initial metadata, sending configuration information to the target device; the configuration information instructing the target device to configure dependency libraries and offline repositories; if the installation of dependency libraries and offline repositories of the target device is detected as complete, sending a parameter optimization instruction to the target device; obtaining the system parameter optimization result fed back by the target device in response to the parameter optimization instruction; and sending a cluster deployment instruction to the target device based on the parameter optimization result to complete the deployment of the target device, continuing the deployment of the next target device until the cluster deployment is completed. Using this scheme, an offline repository supporting a preset operating system can be deployed on the target device, and parameter optimization can be performed, enabling delivery within the preset operating system during cluster deployment on the target device.
Smart Images

Figure CN115729566B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computers, and more particularly to a cluster deployment method, a master control server, a target device, and a storage medium. Background Technology
[0002] The development of domestically developed operating systems is accelerating, and they are becoming increasingly stable. Government agencies, state-owned enterprises, central enterprises, and security and confidentiality units are explicitly requiring the use of domestically developed operating systems in their tenders. The goal is to leverage these systems for production deployment. Currently, representative domestic operating systems include KylinOS and OpenEuler, but there is relatively little practical application of these systems in cloud-native environments. In particular, there is very little production-level automated delivery based on domestically developed operating systems.
[0003] Delivering Kubernetes clusters using domestically developed operating systems presents several challenges. Firstly, the software dependencies are complex, and existing delivery and deployment tools cannot automate dependency resolution. Secondly, the delivery tools themselves have specific requirements regarding the operating system. Finally, there are practical and implementation challenges; the tools themselves need to be refined through extensive practical experience.
[0004] Existing technical tools such as kubeadm and the open-source version of kubespray cannot be directly delivered based on domestic operating systems. Summary of the Invention
[0005] The present invention aims to provide a cluster deployment method, a master control server, a target device, and a storage medium that can be directly delivered based on a domestically developed operating system.
[0006] The technical solution of this invention is implemented as follows:
[0007] This invention provides a cluster deployment method applied to a master control server, the method comprising:
[0008] Send initialization instruction information to at least one target device, instructing the at least one target device to form an initial cluster;
[0009] For any target device in the initial cluster, receive the initial metadata of the target device fed back by the target device; the initial metadata is the initialization parameters of the target device.
[0010] If a preset operating system is identified based on the initial metadata, configuration information is sent to the target device; the configuration information is used to instruct the target device to configure the dependency libraries and offline repositories.
[0011] If the installation of the target device's dependent libraries and offline repository is detected to be complete, a parameter optimization instruction is sent to the target device.
[0012] Obtain the system parameter optimization result of the target device in response to the parameter optimization instruction; and send a cluster deployment instruction to the target device according to the parameter optimization result to complete the deployment of the target device, and continue to deploy the next target device until the cluster deployment is completed.
[0013] This invention provides a cluster deployment method applied to a target device, the method comprising:
[0014] In response to the initialization instruction information, initialization is performed, and the device joins the initial cluster;
[0015] When joining the initial cluster is complete, the user sends its initial metadata to the master server.
[0016] In response to the configuration information sent by the main control server, the dependency libraries and offline repositories are configured;
[0017] If the dependent libraries and offline repository are installed, then in response to the parameter optimization instruction sent by the main control server, parameter optimization is performed to obtain the parameter optimization result; and the parameter optimization result is sent to the main control server.
[0018] In response to the cluster deployment instruction sent by the master control server, the system completes its own cluster deployment. The cluster deployment instruction is a feedback from the master control server based on the parameter optimization results.
[0019] This invention provides a master control server, comprising: a first sending unit and a first receiving unit, wherein,
[0020] The first sending unit is configured to send initialization indication information to at least one target device, instructing the at least one target device to form an initial cluster;
[0021] The first receiving unit is configured to receive initial metadata of the target device fed back by the target device for any one of the target devices in the initial cluster; the initial metadata is the initialization parameters of the target device;
[0022] The first sending unit is further configured to: if a preset operating system is identified based on the initial metadata, send configuration information to the target device; the configuration information is used to instruct the target device to configure the dependency library and offline repository; if the installation of the dependency library and offline repository of the target device is detected to be complete, send a parameter optimization instruction to the target device; obtain the system parameter optimization result fed back by the target device in response to the parameter optimization instruction; and send a cluster deployment instruction to the target device according to the parameter optimization result, complete the deployment of the target device, and continue the deployment of the next target device until the cluster deployment is completed.
[0023] This invention provides a target device, comprising: a second sending unit, an initialization unit, a configuration unit, and a deployment unit, wherein...
[0024] The initialization unit is used to perform initialization and join the initial cluster in response to the initialization instruction information;
[0025] The second sending unit is used to send its own initial metadata to the master control server when joining the initial cluster is completed;
[0026] The configuration unit is used to configure the dependency library and offline repository in response to the configuration information sent by the main control server.
[0027] The second sending unit is further configured to, if the dependent library and offline repository are installed, respond to the parameter optimization instruction sent by the main control server, perform parameter optimization, obtain parameter optimization results, and send the parameter optimization results to the main control server;
[0028] The deployment unit is used to respond to the cluster deployment instruction sent by the master control server and complete its own cluster deployment. The cluster deployment instruction is the result of parameter optimization fed back by the master control server.
[0029] This invention provides a master control server, comprising:
[0030] The first memory is used to store executable instructions;
[0031] The first processor is used to execute executable instructions stored in the memory, and when the executable instructions are executed, to execute the cluster deployment method on the main control server side.
[0032] This invention provides a target device, comprising:
[0033] The second memory is used to store executable instructions;
[0034] The second processor is used to execute executable instructions stored in the memory, and when the executable instructions are executed, to execute the cluster deployment method on the target device side.
[0035] This invention provides a computer-readable storage medium storing executable instructions, which, when executed, cause a first processor to execute a cluster deployment method on the master control server side.
[0036] This invention provides a computer-readable storage medium storing executable instructions, which, when executed, cause a second processor to execute a cluster deployment method on the target device side.
[0037] This invention provides a cluster deployment method, a master control server, target devices, and a storage medium. The method includes: sending initialization instruction information to at least one target device, instructing the at least one target device to form an initial cluster; receiving initial metadata of the target device from any one target device in the initial cluster; the initial metadata being initialization parameters of the target device; if a preset operating system is identified based on the initial metadata, sending configuration information to the target device; the configuration information instructing the target device to configure dependency libraries and offline repositories; if the installation of dependency libraries and offline repositories of the target device is detected as complete, sending a parameter optimization instruction to the target device; obtaining the system parameter optimization result fed back by the target device in response to the parameter optimization instruction; and sending a cluster deployment instruction to the target device based on the parameter optimization result to complete the deployment of the target device, continuing the deployment of the next target device until the cluster deployment is completed. Using this scheme, an offline repository supporting a preset operating system can be deployed on the target device, and parameter optimization can be performed, enabling delivery within the preset operating system during cluster deployment on the target device. Attached Figure Description
[0038] Figure 1 This invention provides an optional flowchart of a cluster deployment method. Figure 1 ;
[0039] Figure 2 This invention provides an optional flowchart of a cluster deployment method. Figure 2 ;
[0040] Figure 3 This invention provides an optional flowchart of a cluster deployment method. Figure 3 ;
[0041] Figure 4 This invention provides an optional flowchart of a cluster deployment method. Figure 4 ;
[0042] Figure 5 This invention provides an optional flowchart of a cluster deployment method. Figure 5 ;
[0043] Figure 6 This invention provides an optional flowchart of a cluster deployment method. Figure 6 ;
[0044] Figure 7 A schematic diagram of the structure of a master control server is provided for an embodiment of the present invention. Figure 1;
[0045] Figure 8 A schematic diagram of the structure of a target device is provided for an embodiment of the present invention. Figure 1 ;
[0046] Figure 9 A schematic diagram of the structure of a master control server is provided for an embodiment of the present invention. Figure 2 ;
[0047] Figure 10 A schematic diagram of the structure of a target device is provided for an embodiment of the present invention. Figure 2 . Detailed Implementation
[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0049] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The present invention provides a cluster deployment method applied to a master control server. Figure 1 This is an optional flowchart illustrating a cluster deployment method provided by an embodiment of the present invention. Figure 1 , will combine Figure 1 The steps shown are explained.
[0050] S101. Send initialization instruction information to at least one target device, instructing at least one target device to form an initial cluster.
[0051] In some embodiments of the present invention, the initialization instruction information is an instruction used to instruct the target device to perform initialization.
[0052] In some embodiments of the present invention, the master control server sends initialization instruction information to the current target device; if the current target device is detected to be initialized, the master control server sends initialization information to the next target device until the initialization information is sent to the last target device; if the last target device is detected to be initialized, at least one target device is obtained to form an initial cluster.
[0053] In some embodiments of the present invention, S101 can be implemented by S301-S303, as follows:
[0054] S301. Send initialization instruction information to the current target device.
[0055] S302. If the initialization of the current target device is detected to be complete, the initialization information is sent to the next target device until the initialization information is sent to the last target device.
[0056] In some embodiments of the present invention, after the master control server detects that the current target device has been initialized, it sends initialization information to the next target device, instructing the next target device to perform initialization, until initialization information is sent to the last target device.
[0057] S303. If the initialization of the last target device is detected to be complete, at least one target device is obtained to form an initial cluster.
[0058] In some embodiments of the present invention, the master control server detects that the last target device has completed initialization and receives feedback from the target device that at least one target device has formed an initial cluster.
[0059] Understandably, the master control server sends initialization instruction information to the current target device; if it detects that the current target device has completed initialization, it sends initialization information to the next target device, until it sends initialization information to the last target device; if it detects that the last target device has completed initialization, at least one target device has formed an initial cluster, which facilitates subsequent cluster deployment.
[0060] S102. For any target device in the initial cluster, receive the initial metadata of the target device fed back by the target device; the initial metadata is the initialization parameters of the target device.
[0061] In some embodiments of the present invention, the master control server can receive initial metadata of the target device fed back by the target device. The initial metadata consists of parameters of the target device, and the initial metadata differs for different target devices. The initial metadata is obtained by the target device in response to the initialization instruction information sent by the master control server.
[0062] S103. If a preset operating system is identified based on the initial metadata, configuration information is sent to the target device. The configuration information is used to instruct the target device to configure the dependency library and offline repository.
[0063] In some embodiments of this invention, the default operating system is a domestically developed operating system; these domestic operating systems are Kylin and openEuler. Kylin is a Chinese-developed operating system with independent intellectual property rights, a major achievement of the National High Technology Research and Development Program (863 Program). It is a Linux-based system jointly designed and developed by the National University of Defense Technology, in collaboration with companies such as China Software and Lenovo. Kylin supports multiple microprocessors and computer architectures, boasts high performance, high availability, and high security, and is binary compatible with Linux applications. openEuler, through an open community, collaborates with global developers to build an open, diverse, and architecturally inclusive software ecosystem, incubating systems supporting multiple processor architectures, covering all scenarios of digital infrastructure, and promoting the prosperous development of enterprise digital infrastructure hardware and software, as well as application ecosystems.
[0064] In some embodiments of the present invention, the master control server can identify the operating system based on the initial metadata of the target device; if the operating system is identified as a preset operating system based on the initial metadata, configuration information is sent to the target device. The configuration information includes path information, which is mainly used to instruct the target device to configure dependency libraries and offline repositories.
[0065] In some embodiments of the present invention, the initial metadata of the target device is shown in Table 1.
[0066] Table 1 Initial Metadata
[0067]
[0068] In some embodiments of the present invention, the initial metadata consists of the parameters in Table 1, namely Architecture, Distribution, Distribution_version, and Distribution_major_version. Architecture refers to the operating system architecture, which is either amd64 or arm64; Distribution is the operating system distribution, with the identifier for the domestic operating system kylin being Kylin Linux Advanced Server; and the identifier for the domestic operating system openEuler being openEuler; Distribution_version is the full version of the operating system distribution, with the identifier for the domestic operating system kylin being V10 and the identifier for the domestic operating system openEuler being 21.09; Distribution_major_version is the major version of the operating system distribution, with the identifier for the domestic operating system kylin being V10 and the identifier for the domestic operating system openEuler being 21.
[0069] It should be noted that dependency libraries are software dependencies established for different preset operating systems.
[0070] In some embodiments of the present invention, S103 can be implemented by S1031-S1034, as follows:
[0071] S1031. If the preset operating system is identified based on the initial metadata, then the initial metadata is converted into characters to obtain the processing result.
[0072] In some embodiments of the present invention, when the master control server identifies the operating system as a preset operating system through the initial metadata of the target device fed back by the target device, it converts the uppercase characters in the initial metadata to lowercase characters, and converts the null characters and punctuation characters in the initial metadata to underscore characters; and uses the converted lowercase characters, underscore characters and unprocessed characters as the processing result.
[0073] S1032. The processing results are spliced together to obtain the splicing result of the preset operating system.
[0074] In some embodiments of the present invention, the master control server can perform concatenation processing on the processing result, that is, the processed characters, to obtain a concatenation result with a preset operating system.
[0075] S1033. Based on the splicing result, generate configuration information. Send the configuration information to the target device.
[0076] In some embodiments of the present invention, the master control server can generate configuration information based on the value corresponding to the concatenation result (the concatenated characters) and send the configuration information to the target device.
[0077] S1034. Send configuration information to the target device.
[0078] Understandably, if the master control server identifies the preset operating system based on the initial metadata, it performs character conversion processing on the initial metadata to obtain the processing result; it then concatenates the processing result to obtain the concatenated result of the preset operating system; based on the concatenated result, it generates configuration information; and sends the configuration information to the target device; the generated configuration information contains the concatenated result, which can be used by the target device to establish dependency libraries and offline repositories.
[0079] S104. If the installation of the target device's dependent libraries and offline repository is detected to be complete, a parameter optimization instruction is sent to the target device.
[0080] In some embodiments of the present invention, if the master control server detects that the target device's dependent libraries and offline repositories have been installed, it sends a parameter optimization instruction to the target device. The parameter optimization instruction is used by the target device to optimize its internal parameters.
[0081] S105. Obtain the system parameter optimization results from the target device in response to the parameter optimization instruction; and based on the parameter optimization results, send a cluster deployment instruction to the target device to complete the deployment of the target device, and continue the deployment of the next target device until the cluster deployment is completed.
[0082] In some embodiments of the present invention, the master control server can obtain the system parameter optimization results fed back by the target device in response to the parameter optimization instruction; render the address information corresponding to the target device based on the parameter optimization results and initial metadata; obtain the mapping relationship based on the address information corresponding to the target device; generate a cluster deployment instruction based on the address information and the mapping relationship; send the cluster deployment instruction to the target device to complete the deployment of the target device, and continue to deploy the next target device until the cluster deployment is completed.
[0083] In some embodiments of the present invention, S105 can be implemented by S1051-S1054, as follows:
[0084] S1051. Based on the parameter optimization results and initial metadata, render the address information corresponding to the target device.
[0085] In some embodiments of the present invention, the master control server can render the address information corresponding to the target device based on the parameter optimization results and the initial metadata.
[0086] S1052. Obtain the mapping relationship based on the address information corresponding to the target device.
[0087] For example, if the target device's default operating system is Kylin Linux Advanced Server, version V10, and the CPU architecture is amd64, executing `Configure requirement packages repository for Kylinv10 x86_64` will generate `requirement-packages-kylinv10.repo` on all target devices; if the target device's default operating system is Kylin Linux Advanced Server, version V10, and the CPU architecture is arm64, executing `Configure requirement packages repository for Kylin v10 aarch64` will generate `requirement-packages-kylinv10.repo` on all target devices.
[0088] Generate `requirement-packages-kylinv10.repo` on all target devices. The default operating system of the target devices is openEuler, version 21, and the CPU architecture is amd64. Execute `Configure requirement packagesrepository for OpenEuler 21.09amd64`, which generates `requirement-packages-openeuler.repo` on all target devices. This file provides an offline software repository for automated deployment. Alternatively, execute `Configure requirement packagesrepository for OpenEuler 21.09aarch64`, which generates `requirement-packages-openeuler.repo` on all target devices. All `.repo` files are mappings to yum repo directories.
[0089] It should be noted that Httpd provides HTTP services to enable yum (package management tool) source download services for all devices to be deployed.
[0090] S1053. Generate cluster deployment instructions based on address information and mapping relationships.
[0091] In some embodiments of the present invention, the master control server can perform information fusion on address information and mapping relationships to obtain cluster deployment instructions.
[0092] S1054. Send a cluster deployment instruction to the target device, complete the deployment of the target device, and continue to deploy the next target device until the cluster deployment is completed.
[0093] In some embodiments of the present invention, the master control server can send a cluster deployment instruction to the target device, complete the deployment of the target device, and continue to deploy the next target device until the cluster deployment is completed.
[0094] Understandably, the master control server can send initialization instructions to at least one target device, instructing it to form an initial cluster. For any target device in the initial cluster, it receives initial metadata from the target device. If a preset operating system is identified based on the initial metadata, configuration information is sent to the target device. If the installation of dependent libraries and offline repositories on the target device is detected, a parameter optimization instruction is sent to the target device. The system parameter optimization results are obtained from the target device in response to the parameter optimization instructions. Based on the parameter optimization results, a cluster deployment instruction is sent to the target device to complete the deployment of the target device, and the deployment of the next target device continues until the cluster deployment is complete. In this scheme, an offline repository supporting a preset operating system can be deployed on the target device, and parameter optimization can be performed. During cluster deployment on the target device, delivery can be performed within the preset operating system.
[0095] In some embodiments of the present invention, S106-S107 are executed before S103, as follows:
[0096] S106. Send an unload instruction to the target device.
[0097] S107. Receive the unloading completion information obtained by the target device in response to the unloading instruction, and identify the initial metadata.
[0098] In some embodiments of the present invention, the uninstallation completion information is obtained by the target device after responding to the uninstallation instruction sent by the master control server.
[0099] In some embodiments of the present invention, the master control server receives uninstallation completion information sent by the target device, identifies the initial metadata, and if a preset operating system is identified, executes S103.
[0100] Understandably, the master control server instructs the target device to unload before sending configuration information, which can provide a deployment environment for the cluster deployment and avoid conflicts during the deployment process.
[0101] In some embodiments of the present invention, S108-S1011 are executed before S103, as follows:
[0102] S108. Obtain the historical initial metadata of the target device.
[0103] S109. When the preset operating system is identified based on the historical initial metadata, the historical initial metadata is converted to obtain the identification value of the preset operating system.
[0104] In some embodiments of the present invention, when the master control server identifies a preset operating system based on historical initial metadata, it transforms the historical initial metadata to obtain an identification value for the preset operating system. Different preset operating systems result in different historical initial metadata, and thus different identification values for the corresponding preset operating systems.
[0105] S1010. Add the identification value of the preset operating system to the first operating system list to obtain the second operating system list.
[0106] In some embodiments of the present invention, the first operating system list represents a logical method that cannot process a preset operating system; the second operating system list represents a logical method that can process a preset operating system.
[0107] In some embodiments of the present invention, the master control server can add the identification value of a preset operating system to a first operating system list to obtain a second operating system list for the preset operating system identification value.
[0108] For example, the first operating system list is: ['RedHat','CentOS','Fedora','Ubuntu','Debian','Flatcar Container Linux by Kinvolk','Suse','ClearLinux','OracleLinux']; the second operating system list is: ['RedHat','CentOS','Fedora','Ubuntu','Debian','Flatcar Container Linux by Kinvolk','Suse','ClearLinux','OracleLinux','Kylin Linux Advanced Server','openEuler']; 'Kylin Linux Advanced Server' and 'openEuler' in the second operating system list are the default operating system identification values.
[0109] S1010. If the initial metadata exists in the second operating system list, the preset operating system is identified.
[0110] In some embodiments of the present invention, the master control server identifies the initial metadata according to the second operating system list. If the initial metadata is in the second operating system list, the preset operating system is identified.
[0111] Understandably, before instructing the target device to initialize, the master control server adds the identification value of the preset operating system to the first operation list, which enables the target device to have operating permissions for the preset operating system, facilitating delivery under the preset operating system.
[0112] This invention provides a cluster deployment method for target devices. Figure 2 This is an optional flowchart illustrating a cluster deployment method provided by an embodiment of the present invention. Figure 2 , will combine Figure 2 The steps shown are explained in detail.
[0113] S201. In response to the initialization instruction information, perform initialization and join the initial cluster.
[0114] In some embodiments of the present invention, the initialization instruction information carries the current target device information and the number of devices.
[0115] In some embodiments of the present invention, in response to initialization instruction information, the database is initialized through the asset module configuration file; after initializing the database, the current target device is initialized according to the current target device information; the initialization information of the next target device is received, and the next target device is initialized, until the last target device in the number of devices is initialized, so that at least one target device is obtained to form an initial cluster.
[0116] In some embodiments of the present invention, S201 can be implemented by S2011-S2013, as follows:
[0117] S2011. In response to the initialization instruction information, initialize the database through the asset module configuration file.
[0118] In some embodiments of the present invention, the target device responds to the initialization instruction information by deploying Docker through the asset module configuration file, and initializes the database after deploying Docker.
[0119] S2012. After initializing the database, initialize the current target device based on the current target device information.
[0120] In some embodiments of the present invention, after initializing the database, the current target device is initialized according to the current target device information sent by the master control server.
[0121] S2013. Receive the initialization information of the next target device, initialize the next target device, and continue until the last target device in the number of devices is initialized, so as to obtain at least one target device to form an initial cluster.
[0122] In some embodiments of the present invention, after the current target device is initialized, initialization information for the next target device is received, and the process continues to initialize the next target device until the last target device in the total number of devices is initialized, resulting in at least one target device forming an initial cluster. The initial cluster is optimized, specifically including improvements to the iterative format of log files and service maintenance, to make the deployment environment of the initial cluster more suitable.
[0123] Understandably, under the guidance of the master server, in response to initialization instructions, the database is initialized through the asset module configuration file. After initializing the database, the current target device is initialized based on the current target device information. The system then receives initialization information for the next target device and initializes that next target device, continuing until the last target device in the total number of devices has been initialized, resulting in at least one target device forming the initial cluster. Optimizing the initial cluster can prevent parameter errors during cluster deployment, thus avoiding situations where cluster deployment fails.
[0124] S202. When joining the initial cluster is complete, send its initial metadata to the master server.
[0125] S203. In response to the configuration information sent by the master control server, configure the dependency libraries and offline repositories.
[0126] In some embodiments of the present invention, the configuration information carries path information.
[0127] In some embodiments of the present invention, the target device responds to the configuration information sent by the main control server, downloads the software package, installs the software package according to the path information, and completes the configuration of the dependency library and offline repository.
[0128] In some embodiments of the present invention, S203 can be implemented by S2031 and S2032, as follows:
[0129] S2031. In response to the configuration information sent by the master control server, download the software package.
[0130] In some embodiments of the present invention, the software package includes an offline image repository package and an offline software repository package.
[0131] In some embodiments of the present invention, the target device downloads a software package in response to configuration information sent by the master control server.
[0132] S2032. Install the software package according to the path information and complete the configuration of the dependency library and offline repository.
[0133] In some embodiments of the present invention, the target device installs the downloaded software package according to the path information and completes the configuration of the dependency library and offline repository on the target device.
[0134] Understandably, the target device responds to the configuration information, downloads the software package, installs the software package according to the path information, and completes the configuration of the dependency libraries and offline repositories, enabling the target device to deliver the software even when the default operating system is offline.
[0135] S204. If the dependent libraries and offline repositories are installed, then in response to the parameter optimization instruction sent by the main control server, perform parameter optimization, obtain the parameter optimization result, and send the parameter optimization result to the main control server.
[0136] In some embodiments of the present invention, if the dependent libraries and offline repositories are installed, parameter optimization is performed in response to the parameter optimization instruction sent by the main control server. For a preset operating system, a first utility tool and a second utility tool are run. If the preset operating system is identified as a first preset operating system, the firewall is disabled and system parameters are processed after the second utility tool is run to obtain the parameter optimization result. Alternatively, if the preset operating system is identified as a second preset operating system, a third utility tool is run after the second utility tool is run. After the third utility tool is run, system parameters are processed to obtain the parameter optimization result.
[0137] In some embodiments of the present invention, if the dependent libraries and offline repositories are installed in S204, parameter optimization is performed in response to the parameter optimization instruction sent by the main control server, and the parameter optimization result can be obtained through S2041-S2044, as follows:
[0138] S2041. In response to the parameter optimization instruction sent by the master control server, perform parameter optimization and run the first and second usage tools on the preset operating system.
[0139] In some embodiments of the present invention, the target device responds to the parameter optimization instruction sent by the master control server, performs parameter optimization, and runs the first and second tools on the preset operating system.
[0140] For example, the second tool used is sshpaass.
[0141] S2042. If the preset operating system is represented as the first preset operating system, then after running the second tool, disable the firewall and process the system parameters to obtain the parameter optimization results.
[0142] In some embodiments of the present invention, the preset operating system of the target device is characterized as a first preset operating system. After running the second tool, the firewall is disabled and the system parameters are processed to obtain parameter optimization results.
[0143] It should be noted that the first preset operating system is the Kylin domestic operating system.
[0144] S2043. If the preset operating system is represented as the second preset operating system, then after running the second tool, the third tool is run.
[0145] In some embodiments of the present invention, the preset operating system of the target device is characterized as a second preset operating system, and after the second tool is run, the third tool is run.
[0146] For example, the third tool used is libcgroup; libcgroup integrates the cgroup user tool suite, which is provided to other programs through static or dynamic libraries.
[0147] It should be noted that the second preset operating system is the openEuler domestic operating system.
[0148] S2044. After running the third tool, process the system parameters and obtain the parameter optimization results.
[0149] In some embodiments of the present invention, after the target device runs the third tool, it processes the system parameters and obtains parameter optimization results.
[0150] It should be noted that S2042 and S2043 are executed selectively. If S2042 is executed, S2043 will not be executed. However, for specific domestic operating systems, only S2042 or S2043 will be executed, and S2044 will be executed after S2043.
[0151] Understandably, when the target device completes the installation of dependency libraries and offline repositories, it responds to the parameter optimization instructions sent by the master control server and performs parameter optimization. For the preset operating system, it runs the first and second usage tools. If the preset operating system is identified as the first preset operating system, then after running the second usage tool, the firewall is disabled and system parameters are processed to obtain the parameter optimization results. Alternatively, if the preset operating system is identified as the second preset operating system, then after running the second usage tool, a third usage tool is run. After running the third usage tool, system parameters are processed to obtain the parameter optimization results. Parameter optimization can filter out unsupported parameters, making cluster deployment smoother.
[0152] S205. In response to the cluster deployment instruction sent by the master control server, complete its own cluster deployment. The cluster deployment instruction is the feedback from the master control server based on the parameter optimization results.
[0153] In some embodiments of the present invention, the cluster deployment instruction carries the address and mapping relationship of the target device.
[0154] In some embodiments of the present invention, in response to a cluster deployment instruction sent by the master control server, the mapping relationship is distributed to each target device according to the address and configuration information of the target device; according to the software package management tool, each target device installs the mapping relationship and downloads and installs the software; after the software is installed, an initial cluster is obtained; and the initial cluster is optimized to complete the cluster deployment.
[0155] Understandably, the target device can gradually complete the cluster deployment according to the instructions sent by the master control server, enabling the target device to be delivered using a preset operating system.
[0156] In some embodiments of the present invention, S205 can be implemented by S2051-S2054, as follows:
[0157] S2051. In response to the cluster deployment instruction sent by the master control server, the mapping relationship is distributed to each target device according to the address and configuration information of the target device.
[0158] In some embodiments of the present invention, the target device responds to the cluster deployment instruction sent by the master control server and distributes the mapping relationship to each target device according to the address and configuration information of the target device.
[0159] S2052. Based on the software package management tool and the installation mapping relationship of each target device, download and install the software.
[0160] In some embodiments of the present invention, the target device downloads and installs software according to the software package management tool and the installation mapping relationship of each target device.
[0161] S2053. After the software is installed, the target cluster is obtained; and the target cluster is optimized to complete the cluster deployment.
[0162] In some embodiments of the present invention, after the target device installs the software, it obtains a target cluster; and the target cluster is optimized to complete the cluster deployment.
[0163] Understandably, in response to the cluster deployment instruction, the target device distributes the mapping relationship to each target device based on the address and configuration information of different target devices. According to the package management tool, each target device installs the mapping relationship and downloads and installs the software. After the software is installed, the target cluster is obtained. The target cluster is then optimized to complete the cluster deployment. Installing software according to the mapping relationship can avoid incompatibility issues and quickly complete the cluster deployment.
[0164] In some embodiments of the present invention, S206-S208 are also executed after S201, as follows:
[0165] S206. Disable the firewall of the target device in the initial cluster.
[0166] For example, disabling the firewall on the target device in the initial cluster can be achieved using the following code:
[0167]
[0168] In this configuration, name:Disable firewalld service is the module name; systemd is the calling module; name:firewalld is the service name, i.e., the firewall module, firewalld; state:stopped indicates the action is stopped, i.e., stopped; enabled:no means not to set it to start on boot; daemon-reload:no means not to reload.
[0169] S207. With the firewall disabled, install the first-use tool on the target device.
[0170] In some embodiments of the present invention, a first tool is installed on the target device when the protective wall is closed.
[0171] For example, the first tool used is the libselinux python package.
[0172] S208. After the first tool is installed, the parameters inside the target device are filtered to obtain parameters that support the preset operating system, and the initialization is completed.
[0173] In some embodiments of the present invention, after the first tool is installed, the parameters inside the target device are filtered to remove unsupported parameters and obtain parameters that support the preset operating system, thus completing the initialization.
[0174] Understandably, the firewall of the target device in the initial cluster is turned off; with the firewall off, the first-use tool is installed on the target device; after the first-use tool is installed, the parameters inside the target device are filtered to remove unsupported parameters and obtain parameters that support the preset operating system, thus completing the initialization; this facilitates subsequent cluster deployment.
[0175] In some embodiments of the present invention, S209-S2011 are also executed before S203, as follows:
[0176] S209, Receive unload instruction.
[0177] S2010, In response to the uninstallation instruction, uninstall the fourth utility and generate uninstallation completion information.
[0178] In some embodiments of the present invention, the target device, in response to an uninstallation instruction, downloads a fourth utility tool and generates uninstallation completion information.
[0179] For example, the fourth tool used is podman.
[0180] S2011. Send the uninstallation completion information to the main control server.
[0181] Understandably, the target device responds to the uninstallation instruction, uninstalls the fourth tool, and generates uninstallation completion information, which can provide a good environment for cluster deployment and avoid incompatibility issues.
[0182] This invention provides a cluster deployment method, such as... Figure 3 As shown, the following steps will provide a detailed explanation.
[0183] S1. The main control server sends initialization instruction information to the target device.
[0184] S2. The target device responds to the initialization instruction information, performs initialization, and generates the initial metadata of the target device.
[0185] S3. The target device sends the initial metadata to the master control server.
[0186] S4. The master server identifies the initial metadata.
[0187] S5. If the master control server identifies the preset operating system based on the initial metadata, it sends configuration information to the target device.
[0188] S6. The target device responds to the configuration information and configures the dependency libraries and offline repository.
[0189] S7. The target device sends real-time installation information to the main control server.
[0190] S8. The main control server analyzes the real-time installation information and detects that the dependent libraries of the target device have been installed. Then, it sends a parameter optimization instruction to the target device.
[0191] S9. The target device responds to the parameter optimization instruction, performs parameter optimization, and obtains the parameter optimization result.
[0192] S10. The target device sends the parameter optimization results to the main control server.
[0193] S11. The master control server sends a cluster deployment instruction to the target device based on the parameter optimization results.
[0194] S12. In response to the cluster deployment instruction, perform cluster deployment.
[0195] This invention provides a cluster deployment method, such as... Figure 4 As shown, the master control server instructs the target device to initialize and obtain metadata (equivalent to the target device's initial metadata); if the master control server does not identify the preset operating system based on the metadata, it will terminate directly; if the preset operating system is identified, it instructs the target device to automatically resolve software dependencies (specifically including: deploying offline image repositories and offline software repositories); after resolving software dependencies, the master control server instructs the target device to optimize system parameters; after the system parameter optimization is completed, the master control server instructs the target device to perform cluster deployment.
[0196] This invention provides a cluster deployment method, such as... Figure 5 As shown, the master control server instructs the target device to initialize and obtain metadata (equivalent to the target device's initial metadata). If the master control server does not identify the preset operating system based on the metadata, it will end directly. If the preset operating system is identified, the metadata will be converted to obtain the identification value, which will be added to the first operating system list to support system processing (equivalent to supporting the preset operating system). Then, the necessary software will be installed. After the software installation is completed, parameter conversion and filtering will be performed to obtain the parameter optimization results, and then the process will end.
[0197] This invention provides a cluster deployment method, such as... Figure 6 As shown, the master control server instructs the target device to initialize and obtain metadata (equivalent to the target device's initial metadata); if the master control server does not identify the preset operating system based on the metadata, it will terminate directly; if the preset operating system is identified, it will instruct the target device to automatically deploy the software repository (equivalent to an offline software repository) and distribute the software repository.
[0198] Understandably, by deploying an offline repository that supports the preset operating system on the target device and optimizing its parameters, delivery can be achieved within the preset operating system when the target device is deployed in a cluster.
[0199] This invention provides a schematic diagram of the structure of a master control server. Figure 1 ,like Figure 7 As shown, the master control server 7 includes: a first sending unit 701 and a first receiving unit 702, wherein the first sending unit 701 is used to send initialization indication information to at least one target device, instructing the at least one target device to form an initial cluster;
[0200] The first receiving unit 702 is configured to receive initial metadata of the target device fed back by the target device for any target device in the initial cluster; the initial metadata is the initialization parameters of the target device;
[0201] The first sending unit 701 is further configured to: if a preset operating system is identified based on the initial metadata, send configuration information to the target device; the configuration information is used to instruct the target device to configure the dependency library and offline repository; if the installation of the dependency library and offline repository of the target device is detected to be complete, send a parameter optimization instruction to the target device; obtain the system parameter optimization result fed back by the target device in response to the parameter optimization instruction; and send a cluster deployment instruction to the target device according to the parameter optimization result, complete the deployment of the target device, and continue the deployment of the next target device until the cluster deployment is completed.
[0202] In some embodiments of the present invention, the master control server 7 further includes a first acquisition unit 703; the first sending unit 701 is further configured to send initialization indication information to the current target device; if it is detected that the current target device has been initialized, then initialization information is sent to the next target device until initialization information is sent to the last target device;
[0203] The first acquisition unit 703 is used to obtain the initial cluster of the at least one target device if the initialization of the last target device is detected to be complete.
[0204] In some embodiments of the present invention, the first acquisition unit 703 is further configured to, if a preset operating system is identified based on the initial metadata, perform character conversion processing on the initial metadata to obtain a processing result; concatenate the processing result to obtain a concatenated result of the preset operating system; and generate configuration information based on the concatenated result.
[0205] The first sending unit 701 is also used to send the configuration information to the target device.
[0206] In some embodiments of the present invention, the main control server 7 further includes a conversion unit 704 and a determination unit 705; wherein, the conversion unit 704 is used to convert uppercase characters in the initial metadata to lowercase characters and convert empty characters and punctuation characters in the initial metadata to underscore characters if a preset operating system is identified based on the initial metadata;
[0207] The determining unit 705 is used to take the converted lowercase character, the underscore character, and the unprocessed character as the processing result.
[0208] In some embodiments of the present invention, the first acquisition unit 703 is further configured to: acquire historical initial metadata of the target device before sending configuration information to the target device if a preset operating system is identified based on the initial metadata; when a preset operating system is identified based on the historical initial metadata, convert the historical initial metadata to obtain an identification value of the preset operating system; add the identification value of the preset operating system to a first operating system list to obtain a second operating system list; wherein, the first operating system list represents a logical method that cannot process the preset operating system; the second operating system list represents a logical method that can process the preset operating system; if the initial metadata exists in the second operating system list, the preset operating system is identified.
[0209] In some embodiments of the present invention, the first sending unit 701 is further configured to send an unloading instruction to the target device;
[0210] The first receiving unit 702 is further configured to receive uninstallation completion information obtained by the target device in response to the uninstallation instruction, and to identify the initial metadata.
[0211] This invention provides a schematic diagram of the structure of a target device. Figure 1 ,like Figure 8 As shown, the target device 8 includes a second sending unit 801, an initialization unit 802, a configuration unit 803, and a deployment unit 804, wherein...
[0212] The initialization unit 802 is used to perform initialization and join the initial cluster in response to the initialization instruction information;
[0213] The second sending unit 801 is used to send its own initial metadata to the master control server when joining the initial cluster is completed;
[0214] The configuration unit 803 is used to configure the dependency library and offline repository in response to the configuration information sent by the main control server.
[0215] The second sending unit 802 is further configured to, if the dependent library and offline repository are installed, respond to the parameter optimization instruction sent by the main control server, perform parameter optimization, obtain parameter optimization results, and send the parameter optimization results to the main control server;
[0216] The deployment unit 804 is used to respond to the cluster deployment instruction sent by the master control server and complete its own cluster deployment. The cluster deployment instruction is the result of parameter optimization fed back by the master control server.
[0217] In some embodiments of the present invention, the initialization instruction information carries current target device information and the number of devices; the target device 8 further includes a second acquisition unit 805; wherein, the initialization unit 802 is further configured to, in response to the initialization instruction information, initialize the database through the asset module configuration file; after initializing the database, initialize the current target device according to the current target device information;
[0218] The second acquisition unit 805 is used to receive initialization information of the next target device, initialize the next target device, and continue until the last target device in the number of devices is initialized, so as to obtain the at least one target device forming an initial cluster.
[0219] In some embodiments of the present invention, the target device 8 further includes a first shutdown unit 806; wherein, the shutdown unit 806 is configured to perform initialization in response to the initialization instruction information, and after joining the initial cluster, shut down the firewall of the target device;
[0220] The deployment unit 804 is also configured to install a first tool on the target device when the firewall is turned off;
[0221] The second acquisition unit 805 is further configured to filter the parameters inside the target device after the first tool is installed, obtain parameters that support the preset operating system, and complete the initialization.
[0222] In some embodiments of the present invention, the configuration information carries path information; the deployment unit 804 is further configured to download a software package in response to the configuration information sent by the master control server; the software package includes an offline image repository package and an offline software repository package; the software package is installed according to the path information to complete the configuration of the dependency library and the offline repository.
[0223] In some embodiments of the present invention, the deployment unit 804 is further configured to, in response to the parameter optimization instruction sent by the main control server, perform parameter optimization and run the first and second usage tools if the dependent library and offline repository are installed;
[0224] The second acquisition unit 805 is further configured to, if the preset operating system is characterized as a first preset operating system, disable the firewall and process system parameters after running the second utility tool to obtain the parameter optimization result; or, if the preset operating system is characterized as a second preset operating system, run the third utility tool after running the second utility tool; and process system parameters after running the third utility tool to obtain the parameter optimization result.
[0225] In some embodiments of the present invention, the cluster deployment instruction carries the address and mapping relationship of the target devices; the deployment unit 804 is further configured to, in response to the cluster deployment instruction sent by the master control server, distribute the mapping relationship to each target device according to the address of the target device and the configuration information; according to the software package management tool, each target device installs the mapping relationship and performs software download and installation; after the software is installed, a target cluster is obtained; and the target cluster is optimized to complete the cluster deployment.
[0226] In some embodiments of the present invention, the target device 8 further includes a second receiving unit 807; wherein the second receiving unit 807 is further configured to receive an uninstallation instruction before configuring the dependency library and offline repository in response to the configuration information sent by the main control server.
[0227] The second acquisition unit 805 is further configured to, in response to the uninstallation instruction, uninstall the fourth utility tool and generate uninstallation completion information;
[0228] The second sending unit 802 is also used to send the unloading completion information to the main control server.
[0229] Based on the methods described in the above embodiments, this invention provides a schematic diagram of the structure of a master control server. Figure 2 ,like Figure 9 As shown, the master control server 9 includes a first processor 901 and a first memory 902; the first memory 902 stores one or more programs executable by the first processor 901, and when one or more programs are executed, the cluster deployment method as described in the embodiments of the present invention is executed through the first processor 901.
[0230] Based on the methods described in the above embodiments, the present invention provides a schematic diagram of the structure of a target device. Figure 2 ,like Figure 10 As shown, the target device 10 includes: a second processor 1001 and a second memory 1002; the second memory 1002 stores one or more programs executable by the second processor 1001, and when one or more programs are executed, the cluster deployment method as described in the embodiments of the present invention is executed by the second processor 1001.
[0231] This invention also provides a computer-readable storage medium applied to a master control server. The computer storage medium stores executable instructions, which, when executed, cause a first processor to execute the cluster deployment method as described in this invention.
[0232] This invention also provides a computer-readable storage medium applied to a target device. The computer storage medium stores executable instructions, which, when executed, cause a second processor to execute the cluster deployment method as described in this invention.
[0233] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0234] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0235] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0236] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0237] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention.
Claims
1. A cluster deployment method, characterized by, Applied to the main control server, including: Send initialization instruction information to at least one target device, instructing the at least one target device to form an initial cluster; For any target device in the initial cluster, receive the initial metadata of the target device fed back by the target device; the initial metadata is the initialization parameters of the target device. If a preset operating system is identified based on the initial metadata, configuration information is sent to the target device; the configuration information is used to instruct the target device to configure the dependency libraries and offline repositories. If the installation of the target device's dependent libraries and offline repository is detected to be complete, a parameter optimization instruction is sent to the target device. Obtain the system parameter optimization result of the target device in response to the parameter optimization instruction; and send a cluster deployment instruction to the target device according to the parameter optimization result to complete the deployment of the target device, and continue to deploy the next target device until the cluster deployment is completed; Before sending configuration information to the target device if a preset operating system is identified based on the initial metadata, the method further includes: obtaining historical initial metadata of the target device; when a preset operating system is identified based on the historical initial metadata, converting the historical initial metadata to obtain an identification value of the preset operating system; adding the identification value of the preset operating system to a first operating system list to obtain a second operating system list; wherein, the first operating system list represents logical methods that cannot process the preset operating system; the second operating system list represents logical methods that can process the preset operating system; if the initial metadata exists in the second operating system list, the preset operating system is identified.
2. The method of claim 1, wherein, Sending initialization instruction information to at least one target device, instructing the at least one target device to form an initial cluster, includes: Send initialization instruction information to the current target device; If the initialization of the current target device is detected to be complete, the initialization information is sent to the next target device until the initialization information is sent to the last target device. If the initialization of the last target device is detected to be complete, the at least one target device is obtained to form an initial cluster.
3. The method according to claim 1 or 2, characterized in that, If a preset operating system is identified based on the initial metadata, then configuration information is sent to the target device, including: If a preset operating system is identified based on the initial metadata, then the initial metadata is subjected to character conversion processing to obtain the processing result; The processing results are then spliced together to obtain the splicing result of the preset operating system; Based on the splicing result, configuration information is generated; The configuration information is sent to the target device.
4. The method according to claim 3, characterized in that, If a preset operating system is identified based on the initial metadata, then the initial metadata is subjected to character conversion processing to obtain a processing result, including: If a preset operating system is identified based on the initial metadata, then the uppercase characters in the initial metadata are converted to lowercase characters; Convert empty characters and punctuation characters in the initial metadata into underscore characters; The converted lowercase characters, underscore characters, and unprocessed characters are taken as the processing result.
5. The method according to claim 1 or 2, characterized in that, Before sending configuration information to the target device if a preset operating system is identified based on the initial metadata, the method further includes: Send an unload instruction to the target device; The system receives uninstallation completion information from the target device in response to the uninstallation instruction and identifies the initial metadata.
6. The method according to claim 1 or 2, characterized in that, The step of sending a cluster deployment instruction to the target device based on the parameter optimization result, completing the deployment of the target device, and continuing the deployment of the next target device until the cluster deployment is completed includes: Based on the parameter optimization results and the initial metadata, the address information corresponding to the target device is rendered. The mapping relationship is obtained based on the address information corresponding to the target device; Generate cluster deployment instructions based on the address information and the mapping relationship; Send a cluster deployment instruction to the target device to complete the deployment of the target device, and continue to deploy the next target device until the cluster deployment is completed.
7. A cluster deployment method, characterized in that, Applied to target devices, including: In response to the initialization instruction, perform initialization and join the initial cluster; When joining the initial cluster is complete, the user sends its initial metadata to the master server. In response to the configuration information sent by the main control server, the dependency libraries and offline repositories are configured; If the dependent libraries and offline repository are installed, then in response to the parameter optimization instruction sent by the main control server, parameter optimization is performed to obtain the parameter optimization result; and the parameter optimization result is sent to the main control server. In response to the cluster deployment instruction sent by the master control server, it completes its own cluster deployment. The cluster deployment instruction is the result of the master control server's optimization of the parameters. If the dependent libraries and offline repositories are installed successfully, then in response to the parameter optimization instruction sent by the main control server, parameter optimization is performed to obtain the parameter optimization result. This includes: if the dependent libraries and offline repositories are installed successfully, then in response to the parameter optimization instruction sent by the main control server, parameter optimization is performed by running a first utility tool and a second utility tool on a preset operating system; if the preset operating system is identified as a first preset operating system, then after running the second utility tool, the firewall is disabled and system parameters are processed to obtain the parameter optimization result; or, if the preset operating system is identified as a second preset operating system, then after running the second utility tool, a third utility tool is run; after running the third utility tool, system parameters are processed to obtain the parameter optimization result.
8. The method according to claim 7, characterized in that, The initialization instruction information carries the current target device information and the number of devices; The initialization process in response to the initialization instruction information, including initialization and joining the initial cluster, includes: In response to the initialization instruction information, the database is initialized through the asset module configuration file; After initializing the database, the current target device is initialized based on the current target device information; Receive initialization information for the next target device, initialize the next target device, and continue until the last target device in the number of devices is initialized, so as to obtain at least one target device to form an initial cluster.
9. The method according to claim 8, characterized in that, After initializing in response to the initialization instruction information and joining the initial cluster, the method further includes: Disable the firewall of the target device in the initial cluster; With the firewall disabled, install the first tool on the target device; After the first tool is installed, the parameters inside the target device are filtered to obtain parameters that support the preset operating system, and the initialization is completed.
10. The method according to claim 7, characterized in that, The configuration information carries path information; The configuration of dependency libraries and offline repositories in response to the configuration information sent by the main control server includes: In response to the configuration information sent by the master control server, a software package is downloaded; the software package includes an offline image repository package and an offline software repository package. Install the software package according to the path information to complete the configuration of the dependency library and the offline repository.
11. The method according to claim 7, characterized in that, The cluster deployment instruction carries the address and mapping relationship of the target device; The process of responding to the cluster deployment instruction sent by the master control server and completing its own cluster deployment includes: In response to the cluster deployment instruction sent by the master control server, the mapping relationship is distributed to each target device according to the address of the target device and the configuration information; According to the software package management tool, the target devices install the mapping relationship and perform software download and installation; After the software is installed, the target cluster is obtained; and the target cluster is optimized to complete the cluster deployment.
12. The method according to claim 7, characterized in that, Before configuring the dependency libraries and offline repositories in response to the configuration information sent by the master control server, the method further includes: Receive uninstallation instruction; In response to the uninstallation instruction, the fourth utility tool is uninstalled, and uninstallation completion information is generated; The uninstallation completion information is sent to the main control server.
13. A master control server, characterized in that, include: The first transmitting unit and the first receiving unit, wherein... The first sending unit is configured to send initialization indication information to at least one target device, instructing the at least one target device to form an initial cluster; The first receiving unit is configured to receive initial metadata of the target device fed back by the target device for any one of the target devices in the initial cluster; the initial metadata is the initialization parameters of the target device; The first sending unit is further configured to: if a preset operating system is identified based on the initial metadata, send configuration information to the target device; the configuration information is used to instruct the target device to configure the dependency library and offline repository; if the installation of the dependency library and offline repository of the target device is detected to be complete, send a parameter optimization instruction to the target device; obtain the system parameter optimization result fed back by the target device in response to the parameter optimization instruction; and send a cluster deployment instruction to the target device according to the parameter optimization result, complete the deployment of the target device, and continue the deployment of the next target device until the cluster deployment is completed; The first sending unit is further configured to acquire historical initial metadata of the target device; when a preset operating system is identified based on the historical initial metadata, the historical initial metadata is converted to obtain an identification value of the preset operating system; the identification value of the preset operating system is added to a first operating system list to obtain a second operating system list; wherein, the first operating system list represents logical methods that cannot process the preset operating system; the second operating system list represents logical methods that can process the preset operating system; if the initial metadata exists in the second operating system list, the preset operating system is identified.
14. A target device, characterized in that, include: The system comprises a second sending unit, an initialization unit, a configuration unit, and a deployment unit, wherein... The initialization unit is used to perform initialization and join the initial cluster in response to the initialization instruction information; The second sending unit is used to send its own initial metadata to the master control server when joining the initial cluster is completed; The configuration unit is used to configure the dependency library and offline repository in response to the configuration information sent by the main control server. The second sending unit is further configured to, if the dependent library and offline repository are installed, respond to the parameter optimization instruction sent by the main control server, perform parameter optimization, obtain parameter optimization results, and send the parameter optimization results to the main control server; The deployment unit is used to respond to the cluster deployment instruction sent by the master control server and complete its own cluster deployment. The cluster deployment instruction is the result of parameter optimization fed back by the master control server. The second sending unit is further configured to: if the dependent library and offline repository are installed, then in response to the parameter optimization instruction sent by the main control server, perform parameter optimization by running a first usage tool and a second usage tool on a preset operating system; if the preset operating system is identified as a first preset operating system, then after running the second usage tool, disable the firewall and process the system parameters to obtain the parameter optimization result; or, if the preset operating system is identified as a second preset operating system, then after running the second usage tool, run a third usage tool; after running the third usage tool, process the system parameters to obtain the parameter optimization result.
15. A master control server, characterized in that, include: The first memory is used to store executable instructions; The first processor, when executing executable instructions stored in the memory, implements the cluster deployment method according to any one of claims 1 to 6.
16. A target device, characterized in that, include: The second memory is used to store executable instructions; The second processor, when executing executable instructions stored in the memory, implements the cluster deployment method according to any one of claims 7 to 12.
17. A computer-readable storage medium, characterized in that, The device stores executable instructions for implementing the cluster deployment method according to any one of claims 1 to 6 when executed by a first processor; or for implementing the cluster deployment method according to any one of claims 7 to 12 when executed by a second processor.
Citation Information
Patent Citations
Subprogram running method and device based on microkernel system and electronic equipment
CN111737032A
Method and device for remotely deploying middleware, computer equipment and storage medium
CN112130871A