Cluster creation method, cluster creation platform, equipment, medium and program product

The cluster creation method and platform address the complexity of Kubernetes deployment by verifying user inputs and pre-configurations, enhancing efficiency and reliability through automated and simplified cluster setup.

CN119149090APending Publication Date: 2024-12-17SUZHOU KEYUAN SOFTWARE TECH DEV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411361194.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The deployment of Kubernetes (K8S) clusters is complex, time-consuming, and error-prone, requiring deep technical knowledge and high learning costs, making it difficult to manage and expand containerized applications efficiently.

Method used

A cluster creation method and platform that simplifies the deployment process by verifying user input information and pre-configuration, ensuring safe and effective cluster creation through multiple verifications, reducing the workload and learning costs of operation and maintenance personnel.

Benefits of technology

Simplifies user deployment steps, enhances efficiency and reliability of cluster creation, and ensures safety by validating user inputs and combining them with pre-configured data to automate the cluster setup process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149090A_ABST
    Figure CN119149090A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a cluster creation method, a cluster creation platform, equipment, a medium and a program product. Comprising the steps of obtaining cluster configuration information and host configuration information; carrying out availability verification on the cluster configuration information and the host configuration information, and carrying out cluster creation verification according to the cluster configuration information and the host configuration information which pass verification and pre-input cluster network segment information; and completing cluster creation based on the cluster configuration information, the host configuration information and the cluster network segment information passing verification, and performing service deployment in the cluster according to service deployment data pre-configured by the platform. According to the method, a user only needs to input simple cluster configuration information and host configuration information, the platform can assist in completing cluster creation and service deployment in the cluster, the deployment steps of the user are simplified, the workload and learning cost of operation and maintenance personnel are reduced, meanwhile, the safety and effectiveness in the cluster creation process are guaranteed, and the user experience is improved. And the cluster creation efficiency and reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a cluster creation method, a cluster creation platform, a device, a medium and a program product. Background Art

[0002] Kubernetes (K8S) is a container cluster management system open sourced by Google. Based on container technology, K8S can automate the deployment, expansion and management of applications, making large-scale applications running in container environments more efficient. Specifically, K8S helps development and operation teams significantly improve productivity by managing the life cycle of containers, providing load balancing and service discovery, automated resource scheduling, and self-healing capabilities.

[0003] However, the cluster configuration and management process of K8S is relatively complicated. In the prior art, the deployment of K8S clusters is generally implemented manually. Operation and maintenance personnel need to have a deep understanding of its components (such as etcd, kube-apiserver, kube-scheduler, kube-controller-manager, etc.) and configuration files (such as yaml files) to implement K8S cluster deployment. The above deployment method is not only time-consuming and error-prone, but also has high requirements for personnel capabilities. It is necessary to be familiar with the meaning of each configuration, which increases the workload and learning cost of operation and maintenance personnel, making the deployment and maintenance of K8S clusters costly and complex, and difficult to achieve efficient management and expansion of containerized applications. Summary of the invention

[0004] The present invention provides a cluster creation method, a cluster creation platform, a device, a medium and a program product, which simplify the user's deployment steps in the cluster creation process, ensure the validity of user input information and platform pre-configuration information in the cluster creation process through multiple verifications, ensure the safe and effective creation of the cluster, reduce the workload and learning cost of operation and maintenance personnel, and improve the efficiency and reliability of cluster creation.

[0005] In a first aspect, an embodiment of the present invention provides a cluster creation method, which is applied to a cluster creation platform, including:

[0006] Get cluster configuration information and host configuration information;

[0007] Verify the availability of cluster configuration information and host configuration information, and perform cluster creation verification based on the verified cluster configuration information and host configuration information, as well as the pre-entered cluster network segment information;

[0008] The cluster is created based on the verified cluster configuration information, host configuration information, and cluster network segment information, and services are deployed in the cluster according to the service deployment data pre-configured by the platform.

[0009] In a second aspect, an embodiment of the present invention further provides a cluster creation platform, including:

[0010] Information acquisition module, used to obtain cluster configuration information and host configuration information;

[0011] The information verification module is used to verify the availability of cluster configuration information and host configuration information, and to verify cluster creation based on the verified cluster configuration information and host configuration information, as well as the pre-entered cluster network segment information;

[0012] The cluster deployment module is used to complete cluster creation based on the verified cluster configuration information, host configuration information and cluster network segment information, and deploy services in the cluster according to the service deployment data pre-configured by the platform.

[0013] In a third aspect, an embodiment of the present invention further provides a cluster creation device, including:

[0014] at least one processor; and a memory communicatively coupled to the at least one processor;

[0015] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can implement the cluster creation method of any embodiment of the present invention.

[0016] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, which are used to execute the cluster creation method of any embodiment of the present invention when executed by a computer processor.

[0017] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, it is used to execute the cluster creation method of any embodiment of the present invention.

[0018] The embodiment of the present invention provides a cluster creation method, cluster creation platform, device, medium and program product, which obtains cluster configuration information and host configuration information; verifies the availability of the cluster configuration information and host configuration information, and verifies cluster creation based on the verified cluster configuration information and host configuration information, as well as the pre-entered cluster network segment information; completes cluster creation based on the verified cluster configuration information, host configuration information and cluster network segment information, and deploys services in the cluster according to the service deployment data pre-configured by the platform. By adopting the above technical solution, when cluster creation is required, the cluster configuration information and host configuration information input by the user are received through the pre-configured cluster creation platform containing data information for information verification and auxiliary cluster establishment, and the cluster configuration information and host configuration information are verified twice related to cluster creation. After both verifications are passed, the cluster creation and service deployment in the cluster are completed based on the verified cluster configuration information, host configuration information, and the cluster network segment information and service deployment data pre-configured in the cluster creation platform. Users only need to enter simple cluster configuration information and host configuration information, and the platform will assist in completing cluster creation and service deployment within the cluster. This simplifies user deployment steps, reduces the workload and learning costs of operation and maintenance personnel, and at the same time ensures the safety and effectiveness of the cluster creation process, improving the efficiency and reliability of cluster creation.

[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 A flowchart of a cluster creation method provided in Embodiment 1 of the present invention;

[0022] Figure 2 A flowchart of a cluster creation method provided in Embodiment 2 of the present invention;

[0023] Figure 3 A schematic diagram of a process for performing time synchronization on each host corresponding to the verified host configuration information according to the cluster network time service in the verified cluster configuration information and the host time information in the verified host configuration information provided by the second embodiment of the present invention;

[0024] Figure 4 A timing diagram of cluster creation provided in the second embodiment of the present invention;

[0025] Figure 5 An example timing diagram of a host added according to the second embodiment of the present invention;

[0026] Figure 6 A schematic diagram of the structure of a cluster creation platform provided in Embodiment 3 of the present invention;

[0027] Figure 7 A schematic diagram of the structure of a cluster creation device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first" and "second" and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Embodiment 1

[0031] Figure 1 This is a flow chart of a cluster creation method provided in the first embodiment of the present invention. The embodiment of the present invention can be applied to the situation where the K8S cluster creation is completed quickly and automatically based on a small amount of configuration information input. The method can be executed by a cluster creation platform, which can be implemented by software and / or hardware, and the cluster creation platform can be configured in a cluster creation device. Optionally, the cluster creation device can be an electronic device, which can be a notebook, a desktop computer, a smart tablet, etc., and the embodiment of the present invention does not limit this.

[0032] Optionally, the cluster creation platform can be specifically understood as a third-party platform that exists independently of the K8S system, is used to receive external information for K8S cluster creation, and implements automatic construction of K8S clusters in the K8S system. It can be understood that the cluster creation platform can exist in the form of software or in the form of a combination of software and hardware, and the embodiments of the present invention do not limit this.

[0033] like Figure 1 As shown, a cluster creation method provided by an embodiment of the present invention specifically includes the following steps:

[0034] S101. Obtain cluster configuration information and host configuration information.

[0035] In this embodiment, the cluster configuration information can be specifically understood as the basic information required for cluster creation that is defined by an external user in order to build a cluster and cannot be set based on the default situation. Exemplarily, the cluster configuration information includes at least cluster name, cluster storage, cluster network time service, cluster image warehouse and cluster domain name system information. Among them, the cluster name can be specifically understood as the name information assigned to the cluster when storing the cluster configuration information in the database before building the cluster. Cluster storage can be specifically understood as information such as storage space and storage path required to build the cluster. The cluster network time service (Network Time Protocol, NTP) can be specifically understood as the NTP server or NTP clock source required to synchronize the time of all nodes in the cluster. The cluster image warehouse can be specifically understood as information used to configure the storage and distribution of container image services in the cluster to be built. Cluster domain name system information (Domain NameSystem, DNS) can be specifically understood as information used to configure the mapping relationship between domain names and IP addresses in the cluster to be built.

[0036] In this embodiment, the host configuration information can be specifically understood as the basic information required for the host configuration that is defined by an external user and cannot be set based on the default when building the host as the master node in the desired cluster. Exemplarily, the host configuration information includes at least a host user identifier, a host remote encryption channel, a host network segment information, and a host installation directory information. Among them, the host user identifier (User Identifier, UID) can be specifically understood as identification information used to uniquely identify a host user. The host remote encryption channel can be specifically understood as a channel for realizing secret-free encrypted communication between the host and the cluster creation platform. Exemplarily, the host remote encryption channel can be an asymmetric encryption channel built based on the SSH (Secure Shell) protocol. The host network segment information can be specifically understood as a specific IP address range required to be used as the master node host in the desired cluster. The host installation directory information can be specifically understood as the installation path information pre-set or allocated for the cluster software component as the master node host in the desired cluster.

[0037] Specifically, when it is necessary to establish a K8S cluster in the K8S system, the cluster creation platform will display an interface for inputting configuration information through a user-oriented interface. The display interface may include an interface for inputting cluster configuration information and an interface for inputting host configuration information for each master node in the cluster. After the user completes the input according to the interface guidance, the cluster creation platform can obtain the cluster configuration information required for building the K8S cluster, as well as at least one host configuration information for the host of the master node in the cluster to be built.

[0038] In the embodiment of the present invention, specific cluster configuration information and host configuration information parameter types are given. Each parameter type is screened and determined according to the problems encountered during the actual operation process, which can effectively avoid incorrect input due to insufficient understanding of the meaning of the K8S system configuration by the user. Taking the host user identifier in the host configuration information as an example, it ensures that the user enters the UID for the unique identity identification of the host when selecting the host, avoiding the situation where the same host has dual network cards with dual IPs and causing incorrect input, and improving the reliability of completing cluster creation based on the input cluster configuration information and host configuration information.

[0039] S102: Verify the availability of cluster configuration information and host configuration information, and perform cluster creation verification based on the verified cluster configuration information and host configuration information and pre-entered cluster network segment information.

[0040] In this embodiment, availability verification can be specifically understood as a verification of whether the configuration information input by the user can be applied in the actual cluster creation process, so that the cluster can be correctly created based on the input configuration information. The pre-entered cluster network segment information can be specifically understood as the information of the network segment (Network Segment) pre-allocated for the cluster to be created, which is pre-entered in the cluster creation platform according to industry regulations and other default factors. Exemplarily, the pre-entered cluster network segment information can include a certain number of IP addresses. Cluster creation verification can be specifically understood as a verification of whether the configuration information input by the user is combined with the pre-stored information in the cluster creation platform to correctly create the cluster.

[0041] Specifically, in order to enable the cluster creation platform to proceed smoothly during automatic cluster creation, when the cluster creation platform obtains the cluster configuration information and host configuration information input by the user, it will perform an availability verification on the cluster configuration information and host configuration information to avoid cluster creation failures due to incorrect user input information. At the same time, if the availability verification fails, there is no need to perform a subsequent secondary verification using the pre-stored information in the cluster creation platform, and the cluster creation process will not be performed, reducing the amount of invalid data processing. After the cluster configuration information and host configuration information are verified, the cluster creation verification is performed to see whether the cluster creation can be performed correctly using the above two types of configuration information and the cluster network segment information pre-entered in the cluster creation platform.

[0042] Exemplarily, the verification of cluster configuration information in the availability verification may include verification of whether the cluster name is repeated, verification of whether the cluster storage space exists or is sufficient, verification of whether a given external time source exists for the cluster network time service, verification of whether the cluster image repository is correctly configured, and verification of whether the cluster domain name system information is legal and can be connected. The verification of host configuration information in the availability verification may include verification of whether the host user identifier is repeated, verification of whether the host remote encryption channel is unobstructed, verification of whether the first-level host network segment information crosses the second-layer network, and verification of whether the host installation directory information that meets the installation requirements exists in the host. It can be understood that the above-mentioned availability verification is only an exemplary verification method for cluster configuration information and host configuration information given in the embodiment of the present invention. As the types of information in the cluster configuration information and host configuration information increase, corresponding availability verification methods can be set accordingly, and the embodiment of the present invention does not limit this.

[0043] Optionally, there may be a sequence for obtaining cluster configuration information and host configuration information, and verifying their availability. That is, the cluster configuration information may be obtained and the availability may be verified first. If the cluster configuration information availability verification fails, the host configuration information may no longer be obtained and the availability verification may be performed, thereby reducing the amount of data required for verification processing when cluster creation fails.

[0044] S103: Complete cluster creation based on the verified cluster configuration information, host configuration information, and cluster network segment information, and deploy services in the cluster according to the service deployment data pre-configured by the platform.

[0045] In this embodiment, the verified cluster network segment information can be specifically understood as the network segment information that can be used for cluster creation without conflicting with other services or applications on site. The service deployment data can be specifically understood as data pre-configured in the cluster creation platform, including the configuration information of each service that needs to be deployed on the nodes in the cluster after the cluster creation is completed. Exemplarily, the service deployment data may include the installation directory and parameter information of each service that needs to be deployed, etc., which is not limited in the embodiment of the present invention.

[0046] Specifically, after passing the two-step verification, it can be considered that the cluster configuration information, host configuration information and cluster network segment information that finally pass the verification can correctly complete the cluster creation after being combined with the pre-configured information in the cluster creation platform. At this time, the script or system command for cluster creation in the K8S system can be called to complete the cluster creation based on the verified cluster configuration information, host configuration information and cluster network segment information, as well as other pre-configured information related to cluster creation in the cluster creation platform. After the cluster creation is completed, the corresponding service deployment is completed in each node of the created cluster based on the installation directory and parameters and other information contained in the service deployment data pre-configured by the platform. Among them, the pre-configured information related to cluster creation can be specifically understood as the configuration information that can be universally solidified and used in the cluster creation process, except for the host configuration information and cluster configuration information that require external personalized input configuration during the cluster creation process. For example, it may include kernel configuration files and network file system (NFS) configuration files, etc., and the embodiments of the present invention do not limit this.

[0047] The technical solution of this embodiment is to obtain cluster configuration information and host configuration information; verify the availability of cluster configuration information and host configuration information, and perform cluster creation verification based on the verified cluster configuration information and host configuration information, as well as the pre-entered cluster network segment information; complete cluster creation based on the verified cluster configuration information, host configuration information and cluster network segment information, and perform service deployment in the cluster according to the service deployment data pre-configured by the platform. By adopting the above technical solution, when cluster creation is required, the cluster configuration information and host configuration information input by the user are received through a pre-configured cluster creation platform containing data information for information verification and auxiliary cluster establishment, and the cluster configuration information and host configuration information are verified twice related to cluster creation. After both verifications are passed, the cluster creation and service deployment in the cluster are completed based on the verified cluster configuration information, host configuration information, and the cluster network segment information and service deployment data pre-configured in the cluster creation platform. Users only need to enter simple cluster configuration information and host configuration information, and the platform will assist in completing cluster creation and service deployment within the cluster. This simplifies user deployment steps, reduces the workload and learning costs of operation and maintenance personnel, and at the same time ensures the safety and effectiveness of the cluster creation process, improving the efficiency and reliability of cluster creation.

[0048] Embodiment 2

[0049] Figure 2 A flow chart of a cluster creation method provided for the second embodiment of the present invention. The embodiment of the present invention is further optimized on the basis of the above-mentioned optional technical solutions. After the availability verification of the cluster configuration information and host configuration information input by the user is completed, the time synchronization of each host in the cluster to be created is completed based on the cluster network time service in the cluster configuration information and the host time information in the host configuration information. The clock synchronization between the hosts required to be used is completed before the cluster is created, so that the cluster can realize the log synchronization analysis and management between the hosts when the creation is completed, and the data consistency between the hosts is guaranteed. At the same time, when performing cluster creation verification, conflict verification is performed for the network segments that have been occupied on site and the network segments that need to be occupied by cluster construction, and possible conflicts are avoided before the cluster is configured. The smooth progress of subsequent cluster creation is guaranteed by cluster creation verification. The two-step verification ensures the availability of user input information and the information obtained by combining user input information with platform pre-configuration information during the cluster creation process, which ensures the safe and effective creation of the cluster and improves the efficiency and reliability of cluster creation.

[0050] like Figure 2 As shown, a cluster creation method provided by an embodiment of the present invention specifically includes the following steps:

[0051] S201. Obtain cluster configuration information and host configuration information.

[0052] Among them, the cluster configuration information at least includes the cluster name, cluster storage, cluster network time service, cluster image repository and cluster domain name system information; the host configuration information at least includes the host user identifier, host remote encryption channel, host network segment information and host installation directory information.

[0053] S202: Verify the availability of cluster configuration information and host configuration information.

[0054] S203: Based on the cluster network time service in the verified cluster configuration information and the host time information in the verified host configuration information, time synchronization is performed on each host corresponding to the verified host configuration information to determine the verified cluster configuration information and host configuration information.

[0055] In this embodiment, the host time information may be specifically understood as the time information of the internal clock source of the master node host in the cluster.

[0056] Specifically, based on the cluster network time service in the verified cluster configuration information, determine whether the cluster to be created has an external clock source provided by an external source, or has a time synchronization requirement given by an external source. Then, when it is clear that there is an external clock source or an external clock synchronization requirement, the time synchronization of each host corresponding to the host configuration information is completed based on the external clock source or the external clock synchronization requirement, and the synchronized host time information is updated to the host configuration information as the verified host configuration information. When there is no clear external clock source or external clock synchronization requirement, the time synchronization of each host in the cluster to be created is completed based on the host time information corresponding to each host in the host configuration information, and the synchronized host time information is updated to the host configuration information as the verified host configuration information, and the cluster configuration information after the time synchronization is determined as the verified cluster network segment information.

[0057] Optional, Figure 3 A schematic diagram of a process for performing time synchronization on each host corresponding to the verified host configuration information according to the cluster network time service in the verified cluster configuration information and the host time information in the verified host configuration information provided by the second embodiment of the present invention, such as Figure 3 As shown, the specific steps include:

[0058] S2031. Determine an external clock source according to the cluster network time service in the verified cluster configuration information.

[0059] Specifically, according to the cluster network time service in the verified cluster configuration information, it is determined whether the cluster configuration information contains the time information input by the user. If so, the time information can be determined as the external clock source provided by the user.

[0060] S2032: If the external clock source exists, synchronize the time of each host corresponding to the verified host configuration information with the external clock source.

[0061] Specifically, if there is an external clock source in a cluster, in order to ensure the time synchronization of the hosts corresponding to each node in the cluster, the time of all hosts in the cluster can be synchronized with the external clock source, that is, the time of each host corresponding to the verified host configuration information can be synchronized with the external clock source to achieve the time synchronization between the hosts in the cluster.

[0062] S2033. If the external clock source does not exist, synchronize the time of each host corresponding to the verified host configuration information with the time of the first host in the verified host configuration information.

[0063] Specifically, if there is no external clock source in a cluster, in order to ensure the time synchronization of the hosts corresponding to each node in the cluster, the time of all hosts in the cluster can be synchronized with the time of one of the hosts to ensure the time consistency of each node in the cluster. In the embodiment of the present invention, the time of each host corresponding to it can be determined according to the verified host configuration information, and the time of each host is synchronized with the time of the first host in the verified host configuration information, so as to achieve the time synchronization between the hosts in the cluster.

[0064] It is understandable that when an external clock source does not exist, the host time used as the basis for time synchronization can be the time of any host corresponding to the verified host configuration information. In the embodiment of the present invention, only the time of the first host is used as an example for processing.

[0065] It is understandable that when creating a cluster, a cluster mode can be selected for creation, which may include an extreme mode including only one master node host and a standard mode including three master node hosts. For the extreme mode, host time synchronization only involves synchronization with an external clock source in the above solution. If the external clock source does not exist, since the cluster only includes one master node host, the master node host can use its own time as the standard.

[0066] In the embodiment of the present invention, various situations that may arise during the cluster creation process are fully considered to ensure that the hosts used for cluster creation are in a clock synchronization state before the cluster is created, so that log synchronization analysis and management between hosts can be achieved when the cluster is created, thereby ensuring data consistency between hosts.

[0067] S204: Perform a network segment conflict verification based on the acquired on-site network segment information and the pre-recorded cluster network segment information, and determine the cluster network segment information that passes the verification based on the network segment conflict verification result.

[0068] In this embodiment, the on-site network segment information can be specifically understood as the situation in which the network segment is occupied in the on-site environment where the cluster is to be created.

[0069] Specifically, when performing cluster creation verification, the occupied network segments in the cluster creation environment will be obtained, that is, the on-site network segment information can be obtained. Then, the on-site network segment information can be compared with the pre-entered cluster network segment information, and the network segment conflict verification can be implemented by judging whether the two are the same, and the cluster network segment information can be adjusted according to the network segment conflict verification result, so that there is no conflict between the adjusted cluster network segment information that passes the verification and the on-site network segment information.

[0070] Exemplarily, determining the cluster network segment information that has passed the verification according to the network segment conflict verification result can be specifically implemented in the following manner:

[0071] If the network segment conflict verification result is no conflict, the pre-entered cluster network segment information is determined as the verified cluster network segment information; if the network segment conflict verification result is conflict, the pre-entered backup cluster network segment information is determined as the verified cluster network segment information.

[0072] Specifically, when the result of the network segment conflict verification is no conflict, it can be considered that the cluster network segment information pre-entered in the cluster creation platform can be directly used in the subsequent cluster creation process, and the pre-entered cluster network segment information can be directly determined as the verified cluster network segment information; and when the result of the network segment conflict verification is conflict, it can be considered that the cluster network segment information pre-entered in the cluster creation platform has been occupied on site and the network segment can no longer be used for cluster creation. At this time, the backup cluster network segment information pre-entered in the cluster creation platform as a backup for the cluster network segment information can be determined as the verified cluster network segment information to ensure that the cluster can be successfully created under the backup cluster network segment information.

[0073] It can be understood that the cluster network segment information in the embodiment of the present invention may include a container network segment, a data structure (Plain Old Data, POD) network segment and a service network segment required for building a cluster.

[0074] In an embodiment of the present invention, when a conflict is found between the on-site network segment and the pre-entered cluster network segment information, the backup cluster network segment information is promptly used for replacement, and possible conflicts are avoided before cluster configuration. The cluster creation verification ensures the smooth creation of subsequent clusters.

[0075] S205: Complete cluster creation based on the verified cluster configuration information, host configuration information, and cluster network segment information, and deploy services in the cluster according to the service deployment data pre-configured by the platform.

[0076] Exemplarily, the service deployment data pre-configured by the platform may include data information for deploying services such as ceph, calico, coredns / localdns, nfs and registry.

[0077] Optionally, after the cluster is created based on the verified cluster configuration information, host configuration information, and cluster network segment information, and services are deployed in the cluster according to the service deployment data preconfigured by the platform, the following is also included:

[0078] Receive a host adding instruction, establish a password-free channel with the host to be added according to the host adding instruction, and obtain the host configuration information of the host to be added;

[0079] Perform host addition verification on the host configuration information of the host to be added, and add the host to be added to the cluster according to the host configuration information of the host to be added after the verification passes;

[0080] The host addition verification includes the verification methods corresponding to the host verification in the availability verification and cluster creation verification.

[0081] In this embodiment, the host addition instruction can be specifically understood as a control instruction received from the outside world when it is necessary to add a host corresponding to a working node to the cluster after the cluster is created, or when the cluster needs to add a host when expanding from a single master node to multiple master nodes.

[0082] Specifically, when a host addition instruction is received and a host needs to be added, the identity information of the host to be added can be determined according to the host addition instruction, and then the cluster creation platform can verify the account password to determine whether the cluster creation platform can add the host to be added to the corresponding cluster. After the account password verification is passed, a password-free channel is constructed between the cluster creation platform and the host to be added, so that the cluster creation platform can obtain the host configuration information of the host to be added through the password-free channel. Among them, the obtained host configuration information of the host to be added is consistent with the type of host configuration information obtained during the cluster creation process. Then, the cluster creation platform can perform host addition verification on the host configuration information of the host to be added, including availability verification and the verification method corresponding to the host verification in the cluster creation verification, and after the verification is passed, call the pre-configured host initialization process to add the host to be added to the cluster according to the host configuration information of the host to be added.

[0083] Exemplarily, the host initialization process may include the following execution steps:

[0084] Clean up the node, stop chronyd, turn off swap; create the / etc / resolv.conf file; write the host name to the local resolution / etc / hosts; delete the swap mount configuration in / etc / fstab; load the kernel modules bridge, br_netfilter, ip_tables, iptable_filter, iptable_nat, xt_nat; cancel the ulimit configuration in / etc / bashrc; overwrite the kernel configuration file sysctl.conf; overwrite the system log rolling configuration / etc / rsyslog.d / myrsyslog.conf; overwrite the nfs configuration file / etc / nfsmount.conf; configure the history retention policy; cancel the systemd-resolved resolution solution; turn off the firewalld service; turn off the selinux service (centos7); turn off pos tfix, rpcbind.socket services; create dol0 bridge, configure startup script / etc / rc.local (extreme mode); stop NetworkManager (centos7); overwrite log rotation configuration / etc / logrotate.d / sys / log; install curl and python-apt (UOS); switch sh to bash (UOS, ubuntu); install cephmount (ubuntu); turn off unattended-upgrades service (ubuntu); turn off system huge pages; configure swapoff-a to / etc / rc.local; switch iptables to / usr / sbin / iptables-legacy (UOS); configure PubkeyAcceptedKeyTypes = +ssh-rsa; configure system time zone; execute nvidia-smi-pm 1 and persist to / etc / rc.local (gpu).

[0085] It can be understood that the host initialization process here is consistent with the process of adding hosts to a cluster during cluster creation.

[0086] For example, Figure 4 A timing diagram of cluster creation provided in the second embodiment of the present invention is shown as follows: Figure 4 As shown, the browser, deployment platform and database together constitute the cluster creation platform in the embodiment of the present invention, wherein the browser is used to receive cluster configuration information and host configuration information input by the user, the deployment platform is used to perform verification and cluster creation process during the cluster creation process, and the database is used to store the verified cluster configuration information and host configuration information.

[0087] For example, Figure 5 A timing example diagram of a host added according to the second embodiment of the present invention is shown in FIG. Figure 5 As shown, the host page, deployment platform and database together constitute the cluster creation platform in the embodiment of the present invention, wherein the host page is the interface displayed by the cluster creation platform to the user for the user to input the host adding instruction and the host configuration information of the host to be added; the deployment platform is used to execute the verification and adding process in the host adding process, and the database is used to store the host configuration information that has passed the verification.

[0088] Optionally, after the host configuration information is submitted, the following abnormal scenarios can be verified: 1) the host IP or name already exists; 2) the host IP, port or account password is wrong; 3) the host password-free script fails to execute and reports an error; 4) there are residual files in the directory.

[0089] The technical solution of this embodiment, after completing the availability verification of the cluster configuration information and host configuration information input by the user, completes the time synchronization of each host in the cluster to be created based on the cluster network time service in the cluster configuration information and the host time information in the host configuration information, and completes the clock synchronization between the required hosts before the cluster is created, so that the cluster can realize the log synchronization analysis and management between the hosts when the creation is completed, ensuring the data consistency between the hosts. At the same time, when performing the cluster creation verification, the conflict verification is performed for the network segments that have been occupied on site and the network segments that need to be occupied by the cluster construction, and possible conflicts are avoided before the cluster is configured. The smooth progress of the subsequent cluster creation is guaranteed by the cluster creation verification. The two-step verification ensures the availability of the user input information and the information obtained by combining the user input information with the platform pre-configuration information during the cluster creation process, ensuring the safe and effective creation of the cluster, and improving the efficiency and reliability of cluster creation.

[0090] Embodiment 3

[0091] Figure 6 A schematic diagram of the structure of a cluster creation platform provided in Embodiment 3 of the present invention is shown in FIG. Figure 6 As shown, the cluster creation platform includes an information acquisition module 31 , an information verification module 32 and a cluster deployment module 33 .

[0092] Among them, the information acquisition module 31 is used to obtain cluster configuration information and host configuration information; the information verification module 32 is used to verify the availability of the cluster configuration information and the host configuration information, and to perform cluster creation verification based on the verified cluster configuration information and host configuration information, as well as the pre-entered cluster network segment information; the cluster deployment module 33 is used to complete cluster creation based on the verified cluster configuration information, host configuration information and cluster network segment information, and to deploy services in the cluster according to the service deployment data pre-configured by the platform.

[0093] The technical solution of the embodiment of the present invention is that when cluster creation is required, a pre-configured cluster creation platform containing data information for information verification and auxiliary cluster establishment is used to receive cluster configuration information and host configuration information input by the user, and the cluster configuration information and host configuration information are verified twice related to cluster creation. After both verifications are passed, the cluster creation and service deployment within the cluster are completed based on the verified cluster configuration information, host configuration information, and cluster network segment information and service deployment data pre-configured in the cluster creation platform. The user only needs to input simple cluster configuration information and host configuration information, and the platform can assist in completing cluster creation and service deployment within the cluster, which simplifies the user deployment steps, reduces the workload and learning cost of operation and maintenance personnel, and at the same time ensures the safety and effectiveness of the cluster creation process, and improves the efficiency and reliability of cluster creation.

[0094] Optionally, the cluster configuration information includes at least the cluster name, cluster storage, cluster network time service, cluster image repository and cluster domain name system information; the host configuration information includes at least the host user identifier, host remote encryption channel, host network segment information and host installation directory information.

[0095] Optionally, the information verification module 32 is specifically used for:

[0096] Verify the availability of cluster configuration information and host configuration information. Based on the cluster network time service in the verified cluster configuration information and the host time information in the verified host configuration information, synchronize the time of each host corresponding to the verified host configuration information to determine the cluster configuration information and host configuration information that have passed the verification.

[0097] A network segment conflict verification is performed based on the acquired on-site network segment information and the pre-entered cluster network segment information, and the cluster network segment information that passes the verification is determined based on the network segment conflict verification result.

[0098] Optionally, according to the cluster network time service in the verified cluster configuration information and the host time information in the verified host configuration information, time synchronization is performed on each host corresponding to the verified host configuration information, including:

[0099] Determine the external clock source based on the cluster network time service in the verified cluster configuration information;

[0100] If an external clock source exists, the time of each host corresponding to the verified host configuration information is synchronized with the external clock source;

[0101] If the external clock source does not exist, the time of each host corresponding to the verified host configuration information is synchronized with the time of the first host in the verified host configuration information.

[0102] Optionally, the cluster network segment information that passes the verification is determined based on the network segment conflict verification result, including:

[0103] If the network segment conflict verification result is no conflict, the pre-entered cluster network segment information is determined as the cluster network segment information that has passed the verification;

[0104] If the network segment conflict verification result is a conflict, the pre-entered backup cluster network segment information is determined as the cluster network segment information that has passed the verification.

[0105] Optionally, the cluster creation platform also includes a host adding module for:

[0106] After completing cluster creation based on verified cluster configuration information, host configuration information, and cluster network segment information, and deploying services in the cluster according to the service deployment data preconfigured by the platform, receive a host addition instruction, establish a password-free channel with the host to be added according to the host addition instruction, and obtain the host configuration information of the host to be added;

[0107] Perform host addition verification on the host configuration information of the host to be added, and add the host to be added to the cluster according to the host configuration information of the host to be added after the verification passes;

[0108] The host addition verification includes the verification methods corresponding to the host verification in the availability verification and cluster creation verification.

[0109] The cluster creation platform provided by the embodiment of the present invention can execute the cluster creation method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0110] Embodiment 4

[0111] Figure 7A schematic diagram of the structure of a cluster creation device provided for Embodiment 4 of the present invention. The cluster creation device 40 may be intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The cluster creation device 40 may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0112] like Figure 7 As shown, the cluster creation device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the cluster creation device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0113] A number of components in the cluster creation device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the cluster creation device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0114] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as a cluster creation method.

[0115] In some embodiments, the cluster creation method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the cluster creation device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the power distribution scheme determination method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the cluster creation method in any other appropriate manner (e.g., by means of firmware).

[0116] Optionally, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the cluster creation method provided by any embodiment of the present invention.

[0117] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0118] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0119] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0120] To provide interaction with a user, the systems and techniques described herein may be implemented on a power distribution scheme determining device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which a user can provide input to the power distribution scheme determining device. Other types of devices may also be used to provide interaction with a user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0121] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0122] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0123] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0124] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A cluster creation method, It is characterized in that Applied to the cluster creation platform, including: Get cluster configuration information and host configuration information; Performing availability verification on the cluster configuration information and the host configuration information, and performing cluster creation verification based on the verified cluster configuration information and host configuration information, as well as the pre-entered cluster network segment information; The cluster is created based on the verified cluster configuration information, host configuration information, and cluster network segment information, and services are deployed in the cluster according to the service deployment data pre-configured by the platform.

2. The cluster creation method according to claim 1, It is characterized in that The cluster configuration information includes at least cluster name, cluster storage, cluster network time service, cluster image repository and cluster domain name system information; The host configuration information at least includes a host user identifier, a host remote encryption channel, a host network segment information and a host installation directory information.

3. The cluster creation method according to claim 1, It is characterized in that The cluster creation verification is performed according to the verified cluster configuration information and host configuration information, as well as the pre-entered cluster network segment information, including: According to the cluster network time service in the verified cluster configuration information and the host time information in the verified host configuration information, time synchronization is performed on each host corresponding to the verified host configuration information to determine the cluster configuration information and host configuration information that have passed the verification; A network segment conflict verification is performed based on the acquired on-site network segment information and the pre-entered cluster network segment information, and the cluster network segment information that passes the verification is determined based on the network segment conflict verification result.

4. The cluster creation method according to claim 3, It is characterized in that The step of performing time synchronization on each host corresponding to the verified host configuration information according to the cluster network time service in the verified cluster configuration information and the host time information in the verified host configuration information comprises: Determine the external clock source based on the cluster network time service in the verified cluster configuration information; If the external clock source exists, synchronizing the time of each host corresponding to the verified host configuration information with the external clock source; If the external clock source does not exist, the time of each host corresponding to the verified host configuration information is synchronized with the time of the first host in the verified host configuration information.

5. The cluster creation method according to claim 3, It is characterized in that The step of determining the cluster network segment information that has passed the verification according to the network segment conflict verification result includes: If the network segment conflict verification result is no conflict, the pre-entered cluster network segment information is determined as the cluster network segment information that has passed the verification; If the network segment conflict verification result is a conflict, the pre-recorded standby cluster network segment information is determined as the cluster network segment information that has passed the verification.

6. The cluster creation method according to claim 1, It is characterized in that After the cluster is created based on the verified cluster configuration information, host configuration information and cluster network segment information, and services are deployed in the cluster according to the service deployment data pre-configured by the platform, the following is further included: Receive a host adding instruction, establish a password-free channel with the host to be added according to the host adding instruction, and obtain host configuration information of the host to be added; Performing host addition verification on the host configuration information of the host to be added, and adding the host to be added to the cluster according to the host configuration information of the host to be added after the verification passes; The host addition verification includes the availability verification and the verification method corresponding to the host verification in the cluster creation verification.

7. A cluster creation platform, It is characterized in that include: Information acquisition module, used to obtain cluster configuration information and host configuration information; An information verification module, used to verify the availability of the cluster configuration information and the host configuration information, and to perform cluster creation verification based on the verified cluster configuration information and host configuration information, as well as the pre-entered cluster network segment information; The cluster deployment module is used to complete cluster creation based on the verified cluster configuration information, host configuration information and cluster network segment information, and deploy services in the cluster according to the service deployment data pre-configured by the platform.

8. A cluster creation device, It is characterized in that include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the cluster creation method according to any one of claims 1 to 6.

9. A storage medium containing computer executable instructions, It is characterized in that When the computer executable instructions are executed by a computer processor, they are used to perform the cluster creation method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the cluster creation method according to any one of claims 1 to 6.