CN111782232A - Cluster deployment method and device, terminal equipment and storage medium - Google Patents

Cluster deployment method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN111782232A
CN111782232A CN202010762066.XA CN202010762066A CN111782232A CN 111782232 A CN111782232 A CN 111782232A CN 202010762066 A CN202010762066 A CN 202010762066A CN 111782232 A CN111782232 A CN 111782232A
Authority
CN
China
Prior art keywords
node
cluster
host
configuration file
deployment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010762066.XA
Other languages
Chinese (zh)
Inventor
赵银宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202010762066.XA priority Critical patent/CN111782232A/en
Publication of CN111782232A publication Critical patent/CN111782232A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45508Runtime interpretation or emulation, e g. emulator loops, bytecode interpretation
    • G06F9/45512Command shells
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0889Techniques to speed-up the configuration process

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Stored Programmes (AREA)

Abstract

The application is applicable to the field of cloud technology, and provides a cluster deployment method, a device, terminal equipment and a storage medium, wherein the cluster deployment method comprises the steps of determining a node to be deployed of a cluster host, calling a preset first configuration file, initializing a deployment environment of the cluster host according to the first configuration file, generating a second configuration file of the node to be deployed of the cluster host, and generating a corresponding configuration file for the node to be deployed of the cluster host without manually configuring node parameters for each node by a user; according to the second configuration file, deploying the nodes corresponding to the cluster host in the initialized deployment environment, so that the system can deploy the nodes of the cluster host according to the second configuration file to complete cluster deployment; as can be seen from the above, the deployment method of the cluster provided by this embodiment does not require manual configuration by a user from the environment deployment of the host to the node deployment of the host, and realizes one-click cluster deployment, thereby improving deployment efficiency.

Description

Cluster deployment method and device, terminal equipment and storage medium
Technical Field
The present application relates to the field of cloud technologies, and in particular, to a method and an apparatus for deploying a cluster, a terminal device, and a computer-readable storage medium.
Background
Kubernetes is a container arrangement tool of Google open source, which is used for managing containerized applications on a plurality of hosts in a cloud platform, so that the deployment process of the containerized applications becomes simple and efficient. If kubernets are to be used, a kubernets cluster needs to be deployed. In the related art, the kubernets cluster has a large number of nodes and interdependencies among the nodes, but each step in the kubernets cluster deployment process needs manual configuration by a user, and the deployment efficiency is very low.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and an apparatus for deploying a cluster, a terminal device, and a computer-readable storage medium, so as to solve the problem in the prior art that the cluster deployment efficiency is low.
A first aspect of an embodiment of the present application provides a cluster deployment method, including:
determining nodes to be deployed corresponding to a plurality of cluster hosts respectively, and calling a preset first configuration file, wherein the nodes to be deployed comprise a main node, a slave node or a storage node;
initializing deployment environments of a plurality of cluster hosts according to the first configuration file, and generating a second configuration file of a node to be deployed;
and deploying the master node, the slave node or the storage node in the cluster host according to the second configuration file aiming at the plurality of cluster hosts after the initialization of the deployment environment.
A second aspect of the embodiments of the present application provides a deployment apparatus for a cluster, including:
the system comprises a determining module, a configuration module and a configuration module, wherein the determining module is used for determining nodes to be deployed corresponding to a plurality of cluster hosts respectively and calling a preset first configuration file, and the nodes to be deployed comprise a main node, a slave node or a storage node;
the initialization module is used for initializing the deployment environments of the cluster hosts according to the first configuration file and generating a second configuration file of the node to be deployed;
and the deployment module is used for deploying the master node, the slave node or the storage node in the cluster host according to the second configuration file aiming at the plurality of cluster hosts after the initialization of the deployment environment.
A third aspect of the embodiments of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the terminal device, where the processor implements the steps of the deployment method of the cluster provided by the first aspect when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the steps of the deployment method of a cluster provided by the first aspect.
The implementation of the cluster deployment method, the cluster deployment device, the terminal device and the computer-readable storage medium provided by the embodiment of the application has the following beneficial effects:
according to the deployment method of the cluster, the node to be deployed of the cluster host is determined, the preset first configuration file is called, and the deployment environment of the cluster host is initialized according to the first configuration file, so that the system can perform initialization deployment on the environment of the cluster host according to the first configuration file, and a user does not need to manually configure the environment parameters of the deployment environment in the environment deployment process of the cluster host; generating a second configuration file of the nodes to be deployed of the cluster hosts according to the first configuration file, so that the system can generate corresponding configuration files for the master nodes, the slave nodes or the storage nodes to be deployed of each cluster host, and a user does not need to manually configure the node parameters of each node and comb the mutual dependency relationship among the nodes; finally, according to the second configuration file, in the initialized deployment environment, deploying the main node, the slave node or the storage node corresponding to the cluster host, so that the system can deploy each node of each cluster host according to the second configuration file to complete cluster deployment; as can be seen from the above, the deployment method of the cluster provided by this embodiment does not require manual configuration by a user from the environment deployment of the host to the node deployment of the host, and realizes one-click cluster deployment, thereby improving deployment efficiency.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart illustrating an implementation of a method for deploying a cluster according to an embodiment of the present application;
fig. 2 is a flowchart illustrating an implementation of a method for deploying a cluster according to another embodiment of the present application;
fig. 3 is a flowchart illustrating an implementation of a method for deploying a cluster according to another embodiment of the present application;
fig. 4 is a flowchart illustrating an implementation of a method for deploying a cluster according to yet another embodiment of the present application;
fig. 5 is a schematic architecture diagram of a kubernets cluster provided in an embodiment of the present application;
FIG. 6 is a schematic diagram of a visualization interface for a user to select a node to be deployed of a host according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a visualization interface for a user to select an operation and maintenance option provided by an embodiment of the present application;
fig. 8 is a block diagram of a configuration apparatus of a cluster according to an embodiment of the present disclosure;
fig. 9 is a block diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
In the description of the embodiments of the present application, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
As described in the related background art, the architecture of the kubernets cluster is mainly divided into three roles: the Master Node Master, the slave Node and the storage Node ETCD are respectively deployed on a plurality of physical hosts or virtual hosts forming a Kubernetes cluster, namely, any one of the nodes can be deployed on the plurality of physical hosts or virtual hosts at the same time. The deployment of each node usually requires the deployment of a plurality of components, for example, the deployment of a Master node requires the deployment of a Kube-APIServer component, a Kube-Controller-Manager component, a Kube-Scheduler component, and the like. Currently, the deployment process of these nodes requires manual operation by a user, and each host needs to manually configure a deployment environment, such as installing and running a Docker (an application container engine) and a Kubelet (a node agent program). And manual operation is prone to deployment errors and inefficient deployment.
In view of this, the present application provides a cluster deployment method, which includes determining a node to be deployed of a cluster host, calling a preset first configuration file, and initializing a deployment environment of the cluster host according to the first configuration file, so that a system can perform initialization deployment on an environment of the cluster host according to the first configuration file, without requiring a user to manually configure an environment parameter of the deployment environment in an environment deployment process of the cluster host; generating a second configuration file of the nodes to be deployed of the cluster hosts according to the first configuration file, so that the system can generate a corresponding configuration file for each node to be deployed of each cluster host without manually configuring the mutual dependency relationship between the node parameters and the combing nodes for each node by a user; finally, according to the second configuration file, in the initialized deployment environment, deploying the nodes corresponding to the cluster hosts, so that the system can deploy each node of each cluster host according to the second configuration file to complete cluster deployment; as can be seen from the above, the deployment method of the cluster provided by this embodiment does not require manual configuration by a user from the environment deployment of the host to the node deployment of the host, and realizes one-click cluster deployment, thereby improving deployment efficiency.
Referring to fig. 1, fig. 1 is a flowchart illustrating an implementation of a cluster deployment method according to an embodiment of the present application. The execution main body of the cluster deployment method provided by the application is terminal equipment, and the terminal equipment includes but is not limited to mobile terminals such as smart phones, tablet computers, supercomputers and personal digital assistants, and can also include terminal equipment such as desktop computers and servers. The deployment method of the cluster shown in fig. 1 includes S101 to S103. It should be understood that the clusters mentioned in the embodiments of the present application may be high availability clusters, load balancing clusters, parallel computing clusters, and the like. For convenience of description, the kubernets cluster is taken as an example to specifically describe the deployment method of the cluster provided by the present application.
S101, determining a node to be deployed of the cluster host, and calling a preset first configuration file.
In this embodiment, the terminal device determines nodes to be deployed, which correspond to the plurality of cluster hosts, respectively. A cluster host (hereinafter host) is a device that installs kubernets nodes, which may be a physical host (e.g., a physical server) or a Virtual host (e.g., a Virtual Machine). A plurality of hosts form a cluster space, the hosts are in communication connection, and Kubernets nodes are deployed on the hosts, so that Kubernets application can be operated.
The Node to be deployed is a Node to be installed on the host, and the Node to be deployed includes but is not limited to a Master Node, a slave Node and a storage Node ETCD. Referring to fig. 5, fig. 5 shows an architectural diagram of a kubernets cluster provided in the embodiment of the present application. It is to be understood that the kubernets cluster shown in fig. 5 is not to be taken as a limitation on the cluster architecture, and Master nodes, Node nodes and etc nodes may contain application components other than those shown.
The Master node is a management control center of a Kubernetes cluster, and comprises application components such as APIServer, Controller-Manager and Scheduler, but not limited to the application components. The APIServer is a key service process (interface service component) of an HTTP Rest interface, is an entrance capable of performing operations such as adding, deleting, modifying or inquiring on all resources in Kubernets, and is also an entrance process controlled by a cluster; Controller-Manager is the automation control center (control component) for all resources in kubernets; scheduler is a service process (scheduling component) that the resource schedules. In this embodiment, Master nodes may be deployed on one or more hosts, and only one Master node is responsible for main management work when a Kubernetes application runs, so that one Master node is elected to be responsible for main management work based on the Master election principle of the Elasticsearch, and other Master nodes are used as backups to reselect one Master node from the backup nodes after the Master node responsible for the main management work is disconnected.
The Node is a working Node of a Kubernetes cluster, and includes but is not limited to application components such as kubelet, kube-proxy, container runtime, etc., the kubelet is an agent (container management component) of the Master Node on the Node, and can monitor the pod (minimum unit in the Kubernetes cluster) allocated to the Node; the kube-proxy is used for realizing a pod network agent (communication service component) on a Node, maintaining network rules and balancing load; the container runtime is the whole life cycle (cycle management component) of the container operation, and takes docker as an example, and can provide functions of specifying a container mirror image format, constructing a container mirror image, managing the container mirror image, managing a container instance, operating the container, and realizing container mirror image sharing.
The ETCD node serves a distributed and reliable key-value storage system and can be used for storing cluster configuration information. Compared with the current Kubernets cluster, in the embodiment, the ETCD node is independently deployed as an independent node without being deployed as an application component of a Master node, so that stability of the cluster node is guaranteed, and rolling upgrade and maintenance of the cluster can be completed more conveniently.
And the terminal equipment determines the nodes to be deployed of the cluster host so as to distribute the host functions of the cluster. In a possible implementation manner, the node to be deployed of the host is determined according to preset configuration information or historical configuration information. The preset configuration information may be the number of hosts to be deployed for each preset Node to be deployed, for example, the preset configuration information is that a Master Node needs to be deployed in 3 hosts, a Node needs to be deployed in 5 hosts, and an etc Node needs to be deployed in 2 hosts, so that the Node to be deployed of the cluster host can be determined according to the preset configuration information. The historical configuration information may be configuration information of a successfully deployed Kubernetes cluster, for example, the successfully deployed Kubernetes cluster is composed of 10 hosts, where 3 hosts deploy Master nodes, 5 hosts deploy Node nodes, and 2 hosts deploy ETCD nodes, it may be determined that a Node to be deployed with 3 hosts is a Master Node, a Node to be deployed with 5 hosts is a Node, and a Node to be deployed with 2 hosts is an ETCD Node.
In another possible implementation manner, a node list of the cluster host is displayed on a visual interface; acquiring a selection instruction of a user for selecting a node in a node list; and determining the node selected by the user in the node list as the node to be deployed of the cluster host based on the selection instruction.
In the embodiment, the nodes which can be selectively deployed by the host are displayed on the visual interface, so that a user can directly select the nodes to be deployed of the host without manually writing codes by the user, and the addition and deletion operations are supported on the selected nodes, and the method is very intuitive, simple and convenient. Referring to fig. 6, fig. 6 is a schematic view of a visualization interface for a user to select a node to be deployed of a host according to an embodiment of the present application. Hosts are Hosts, Related Groups are nodes to be deployed selected by users, and Actions are options for adding or deleting Related Groups.
Illustratively, when an add option (such as a pencil icon in fig. 6) under Actions corresponding to any Host is clicked, a node list of deployable nodes of the Host is displayed on a visual interface, one or more nodes on the node list are selected to be added as nodes to be deployed of the Host (such as nodes, nodes and the like under Related Groups in fig. 6), and after the user selection is completed, in response to a confirmation option clicked by the user, the nodes to be deployed of the Host are determined according to the nodes selected by the user. It can be understood that, in addition to the above addition options, the present embodiment may also perform a deletion operation on the selected node.
The terminal equipment also calls a preset first configuration file, so that the terminal equipment can realize one-click deployment based on the first configuration file, and the deployment efficiency is improved. The first configuration file is used for deploying the cluster, compiling the deployment steps of the cluster into the first configuration file in advance, and storing the first configuration file. It can be understood that the first configuration file may be stored in a storage space on the terminal device in advance, and the terminal device directly accesses the storage space and calls the first configuration file; the first configuration file can also be stored in the cloud in a preset mode, and the terminal equipment accesses the cloud and calls the first configuration file.
In the process of writing the first configuration file, because the operating systems of the terminal device applying the method may be different, for example, the terminal device may be a Windows operating system or a Linux operating system, for different operating systems of the terminal device, codes for deploying the kubernets cluster may also be different, so that the first configuration file corresponding to each operating system may be written in advance. The compiling of the first configuration file includes, but is not limited to, setting an initialization configuration parameter of the cluster host and setting a preset configuration template of the node to be deployed.
The initialization configuration parameters are configuration parameters for initializing a deployment environment of the cluster host, and include, but are not limited to, configuration parameters of deployment environments such as a Network Time Protocol (NTP), a Domain name system service (DNS), disk management, container management, kubernets cluster software, a firewall, and a Repo source. The preset configuration template is a deployment parameter of a Node to be deployed, and includes, but is not limited to, a preset configuration template of a Master Node, a preset configuration template of a Node, and a preset configuration template of an ETCD Node.
S102, initializing a deployment environment of the cluster host according to the first configuration file, and generating a second configuration file of the node to be deployed.
In this embodiment, the initialization refers to assigning the environment variable of the deployment environment as a default value, and the default value is the initialization configuration parameter in the S101 interpretation. The deployment environment for initializing the cluster hosts includes, but is not limited to, closing the firewall of the host, closing selinux of the host, setting a privacy-free login, synchronizing the time of the host, installing Docker, and installing Kubelet. And calling a preset script file corresponding to the initialization configuration parameters according to the first configuration file, and executing the preset script file by the terminal equipment so as to initialize the deployment environment of the cluster host.
Illustratively, the initialization operation corresponding to turning off the host firewall is: executing a script segment used for closing the firewall in a preset script file, and setting a state parameter of the firewall of the host to be in a closed state, for example, firmware. The initialization operation corresponding to the shutdown host selinux is as follows: and executing a script segment used for closing the host selinux in the preset script file, and setting a state parameter of the host selinux to be in a closing state, for example, selinux is disabled. The initialization operation of the secret-free login is set as follows: executing a script segment for setting the password-free login in a preset script file, and setting the access state of the host 01 accessing the host 02 as the password-free access, such as [ root @ host-01] # ssh-keygen-t rsa, [ root @ host-01] # ssh-copy-id-i.ssh/id _ rsa.pub root @ host-02. The initialization operation corresponding to the docker is installed as follows: and executing a script segment for installing a Docker in a preset script file, calling a Docker source and installing a Docker application on the host based on the Docker source. It can be understood that, in this embodiment, according to the first configuration file, all hosts in the cluster are initialized, and also some hosts in the cluster may be initialized; host 01 may be set to have more hosts, such as hosts 03 and 04, with privacy-free access in a similar manner as above.
And the terminal equipment also generates a second configuration file of the node to be deployed according to the first configuration file. The second configuration file is a configuration file for deploying the nodes to be deployed on the host, and is generated according to a preset configuration template corresponding to the nodes to be deployed in the first configuration file. Illustratively, each node to be deployed corresponds to one or more preset configuration templates, and a second configuration file of the node to be deployed, which is required to be deployed by the host, may be generated based on the preset configuration file, for example, if the node to be deployed determined by the host 01 is a Master node, a second configuration file B is generated according to a preset configuration template a corresponding to the Master node in the first configuration file. It is to be understood that the second configuration file B is only used to deploy the Master node on host 01.
In the embodiment, the deployment environment of the cluster hosts is initialized, so that the deployment environment of the hosts does not need to be configured manually, for example, each host does not need to be installed with a Docker manually; and generating a second configuration file of the node to be deployed, so that each host can obtain the configuration file by generating the second configuration file without manually writing the configuration file each time deployment personnel deploy the cluster. Therefore, under the environment of multiple hosts, the workload of deployment personnel can be greatly reduced, and the deployment efficiency is improved.
And S103, deploying the nodes corresponding to the cluster host in the initialized deployment environment according to the second configuration file.
In this embodiment, for a plurality of cluster hosts after the deployment environment is initialized, the node to be deployed determined in step S101 by the host is deployed in the cluster host according to the second configuration file, so that deployment personnel do not need to manually write codes, the probability of errors caused by manual deployment is reduced, and the deployment efficiency is improved. Illustratively, when nodes are deployed, the terminal device executes the plurality of second configuration files in parallel according to the second configuration files corresponding to the plurality of nodes to be deployed for the nodes to be deployed of the plurality of hosts, and deploys the deployment nodes corresponding to the hosts in the plurality of hosts after the deployment environment is initialized, so that the nodes are deployed on each host at the same time, and the deployment efficiency is improved.
In a possible implementation manner, since a conventional tool (e.g., a kops tool) can deploy nodes of a kubernets cluster, in a specific deployment link, deployment personnel still need to write codes manually to configure addresses of, for example, kubernets master nodes. Therefore, the application invokes an infrastructure tool to deploy the node corresponding to the cluster host in the initialized deployment environment according to the second configuration file to realize automatic deployment, and specifically includes: calling an automatic operation and maintenance tool Ansine to execute a second configuration file, and verifying whether the Ansine successfully executes the second configuration file in the plurality of cluster hosts; if the Ansible successfully executes the second configuration file in the cluster hosts, calling a second script file corresponding to the second configuration file; and aiming at each cluster host after the initialization of the deployment environment, deploying a main node, a slave node or a storage node corresponding to the second configuration file in the cluster host according to the second script file corresponding to the second configuration file.
In this embodiment, an anchor tool is invoked, and the anchor tool executes the second configuration file to automatically build a kubernets master node in the host after the deployment environment is initialized. The anchor tool is an automated operation and maintenance management tool implemented based on Python language, and compared with other tools such as a server/client architecture, the anchor tool does not need to deploy a client agent on a host. After the anchor tool is installed on the terminal device, the anchor tool can realize communication between the host and the node by sending a Secure Shell (SSH) command to the host. It can be understood that the installation process of the anchor tool may be completed in the host deployment environment initialization phase, that is, the anchor tool is installed on the terminal device during initialization, so as to optimize the deployment process of the cluster.
It is worth mentioning that SSH secure login is configured for the host during the initialization of the deployment environment. After the infrastructure tool is installed on the terminal device, the terminal device can be regarded as an SSH server, the host can be regarded as an SSH client (the SSH server and the SSH client do not represent the use of a server/client architecture by the infrastructure tool, only SSH communication is conveniently carried out, and the simplicity of the building process is high), so that the communication between the terminal device and the host is conveniently carried out, the building efficiency is further improved, a key pair (comprising a private key and a public key) generated through an SSH key command in the terminal device can be obtained, the public key is distributed to the host and stored in the storage space of the host, and therefore the node to be deployed can realize secret-free login.
Illustratively, in the execution process of the first configuration file, calling an automatic operation and maintenance tool, an executable, to execute the second configuration file, and verifying whether the executable of the ansable tool successfully executes the second configuration file in the cluster host; if the anchor tool successfully executes the second configuration file on the cluster host, it indicates that the terminal device can communicate with the host through the anchor tool, that is, an SSH command can be sent to the host through the anchor tool to call a second script file (the second script file is, for example, a script file for deploying an application component, a network component, and an image of a node to be deployed) corresponding to the second configuration file in the preset code repository, and configure the application component related to the node to be deployed in the host according to the configuration parameters in the second script file. If the anchor tool does not successfully execute the second configuration file on the cluster host, the terminal equipment cannot normally communicate with the host through the anchor tool, and the deployment environment initialization stage can be returned, and SSH password-free login is checked and set.
In one possible implementation manner, the second script file comprises a master node script file, a slave node script file and a storage node script file; the main node comprises an interface service component, a control component and a scheduling component; the slave node comprises a container management component and a communication service component; the storage node comprises a storage system service; for each cluster host after the deployment environment is initialized, deploying a master node, a slave node or a storage node corresponding to a second configuration file in the cluster host according to the second script file corresponding to the second configuration file, including:
according to a main node script file corresponding to the second configuration file, deploying an interface service component, a control component and a scheduling component in the cluster host after the initialization of the deployment environment, wherein the main node script file is configured with host information of the cluster host corresponding to the main node; according to the slave node script file corresponding to the second configuration file, deploying a container management component and a communication service component in the cluster after the initialization of the deployment environment, wherein the slave node script file is configured with host information of the cluster host corresponding to the slave node; and creating a storage system service in the cluster host after the deployment environment is initialized according to the storage node script file corresponding to the second configuration file, wherein the storage node script file is configured with host information of the cluster host corresponding to the storage node.
In this embodiment, the application components included in the master node, the slave node, and the storage node are as explained in step S101, and are not described herein again. The master node script file is used for deploying a master node in the host, the slave node script file is used for deploying a slave node in the host, and the storage node script file is used for deploying a storage node in the host. It is understood that due to the difference of the host information, there is a difference between the host and the master node script file, the slave node script file or the storage node script file, for example, the master node script file a is applied to the host a to deploy the master node, and the master node script file B is applied to the host B to deploy the master node.
According to the master node script file, deploying an interface service component, a control component and a scheduling component in the host, wherein the interface service component can adopt an external load balancer, and the control component and the scheduling component are deployed at high availability to run multiple instances. According to the slave node script file, a container management component and a communication service component are deployed in the host, wherein the slave node script file can be distributed to other hosts according to the cluster requirement so as to deploy the container management component and the communication service component, and therefore the purpose of capacity expansion according to the requirement is achieved. According to the storage node script file, a storage system service is deployed in the host, the storage nodes are used as independent nodes, single application management is performed, the stability of the cluster host is guaranteed, the rolling upgrade of the cluster is more conveniently completed, and the maintenance cost is reduced.
Referring to fig. 2, fig. 2 is a flowchart illustrating an implementation of a cluster deployment method according to another embodiment of the present application. With respect to the embodiment corresponding to fig. 1, in the deployment method of the cluster provided in the embodiment of fig. 2, the first configuration file includes the initialization configuration parameters and the preset configuration template corresponding to the node to be deployed, and accordingly, step S102 specifically includes steps S201 to S202. It should be noted that the steps that are the same as those in the embodiment of fig. 1 are not described again, and please refer to the foregoing.
S201, configuring the environmental parameters of the cluster host according to the initialized configuration parameters in the first configuration file.
In this embodiment, because a plurality of hosts exist in the cluster, it is currently necessary to manually perform initialization operation on each host, which is time-consuming and labor-consuming, so that the initialization operation is written into the first configuration file in this embodiment, and thus, the initialization operation can be automatically performed on each host according to the first configuration file, and the initialization efficiency of the deployment environment is improved.
As explained in step S101, the initialization configuration parameter is a configuration parameter for initializing a deployment environment of the clustered hosts, which may refer to a default value of a certain environment parameter of the hosts, such as a default value of a firewall state of the hosts is off and a default value of a Docker installation state of the hosts is installed. For example, the environment parameter of the host may be configured through an instruction corresponding to the initialization configuration parameter in the first configuration file, for example, the instruction corresponding to the initialization configuration parameter for closing the firewall of the host is a systemctl disabled firmware service; the environment parameter of the host may also be configured through the script file corresponding to the initialized configuration parameter in the first configuration file, for example, the script file is called to install the Docker, so that the default value of the Docker installation state of the host is changed to be installed.
In a possible implementation manner, configuring the environment parameters of the cluster host according to the initialized configuration parameters in the first configuration file specifically includes: calling a script file corresponding to the initialized configuration parameters in a preset storage space according to the initialized configuration parameters in the first configuration file; and executing the script file, and configuring the environment parameters of the cluster host computer into initialization configuration parameters.
In this embodiment, in addition to changing some state parameters of the host (for example, turning off the firewall and selinux, etc.), the initialization process needs to deploy the basic components of the host, for example, installing Docker and Kubelet, and a large amount of code needs to be executed in the process of deploying the basic components. Therefore, the deployment process of the basic component is written into the script file, so that the deployment efficiency is improved, and the script file is stored in the preset storage space, so that the memory occupation is reduced.
The preset storage space is a storage area (such as a Git code repository) for storing script codes, and is in communication connection with the terminal device. Illustratively, when the terminal device executes the first configuration file to configure the state parameter of a certain basic component of the host, it is detected that the state parameter of the basic component of the host is not installed, before the state parameter of the basic component is changed to be installed, a script file corresponding to the basic component in a preset storage space is called, then the script file is executed, the basic component is installed on the host, and after the installation is completed, the state parameter of the basic component is changed to be installed.
S202, adding host information of the cluster host to a preset configuration template, and generating a second configuration file corresponding to the node to be deployed.
In this implementation, for a node to be deployed of each cluster host, host information of the cluster host is added to a preset configuration template corresponding to the node to be deployed, and a second configuration file corresponding to the node to be deployed is generated. As explained for the preset configuration template in step S101, the preset configuration template is a deployment parameter of a node to be deployed, and is created through an infrastructure UI. It can be understood that the preset configuration template may be created by the terminal device through the infrastructure UI, or may be transplanted to the terminal device after the establishment of the infrastructure UI by another device is completed. That is, the execution subject creating the preset configuration template may be the same as or different from the execution subject using the preset configuration template.
Illustratively, in the process of creating the preset configuration template, the combined codes of the ansable and the shell script are deployed in advance, and the combined codes are uploaded to the Git code repository so as to be managed by the Git code repository in a unified manner. Then logging in an infrastructure UI platform, managing a code unit based on the combined code creation scheme (project) through a code management function of the platform, wherein each code unit corresponds to a role (namely, an ETCD Node, a Master Node, a Node and the like) package, creating a preset configuration template in the infrastructure UI for each role package, and covering basic configuration parameters for deploying each role in the preset configuration template.
Because the preset configuration template already contains basic configuration information required for deploying the nodes to be deployed and information difference exists between the hosts, the second configuration file corresponding to each host has difference in host information, so that the terminal device adds the host information of the hosts to the preset configuration template to generate the second configuration file corresponding to the nodes to be deployed, and the nodes can be deployed on the hosts according to the second configuration file.
Referring to fig. 3, fig. 3 is a flowchart illustrating an implementation of a cluster deployment method according to another embodiment of the present application. With respect to the embodiments corresponding to fig. 1 or fig. 2, the deployment method of the cluster provided in the embodiment of fig. 3 further includes S301 and S302 after step S103. It should be noted that the steps that are the same as those in the embodiment of fig. 1 or fig. 2 are not described again here, please refer to the foregoing.
S301, acquiring the deployment state of the cluster host.
In this embodiment, the deployment state of the host is obtained through a preset instruction, and the preset instruction may be a query instruction for querying a corresponding cluster operating state table. The cluster running state table may be a cluster state table, a cluster member table, a cluster running process table, or the like. Illustratively, whether the ETCD node is in a normal state (health) may be detected by viewing the cluster state table, or whether the ETCD node is within the cluster member table may be viewed by viewing the cluster member table. Whether related processes in the nodes are in a running state or not is detected by checking a cluster running process table, wherein the related processes are related processes such as a kube-apsserr, a kube-controller-manager and a kube-scheduler of the Matser nodes. Whether related processes of the slave node are in a running state, such as kubel and kube-proxy processes, is detected by looking at the cluster running process table.
Further, in order to verify whether the deployment state of the host is successful, information to be verified of the cluster running state table is extracted, where the information to be verified may include ETCD Node verification information, Master Node verification information, and Node verification information. For example, if it is detected whether the ETCD node is completely deployed through the cluster state table, the name of the corresponding ETCD node may be located in the cluster state table, and then the related character string at the location where the name of the ETCD node is located (for example, a predetermined number of character strings before and after the location is set) may be acquired as the information to be verified. The information to be verified may include health, true, and false.
S302, if the deployment states of the cluster hosts are all deployment success, determining that the cluster deployment is completed.
In this embodiment, the information to be verified is matched with the preset standard information. The standard information is preset accurate information, for example, the standard information corresponding to the information to be verified of the ETCD Node is health, and the standard information corresponding to the information to be verified of the Master Node and the Node is true. In this step, when all the information to be verified and the standard information are successfully matched, the matching result is that the verification is passed. Otherwise, the matching result is that the verification is not passed. Further, the deployment state corresponding to the matching result passing the verification is the successful deployment. And verifying that the corresponding deployment state of the failed matching result is deployment failure.
On the basis of any embodiment of fig. 1 to fig. 3, after step S103, the method further includes: configuring service discovery strategies for a main node, a slave node and a storage node which are deployed in a plurality of cluster hosts; and deploying communication modes among the main node, the slave nodes and the storage nodes according to the service discovery strategy.
In this embodiment, the service discovery policy is a networking policy and an application scheduling policy of each node in the cluster, and includes, but is not limited to, an entry (Ingress) configuration, a bridge pod, a node port access, and the like. Wherein ingress is the configuration of ingress for managing the nodes through a server controller nginx controller, and each ingress configures a scheduling list at the rear end of the nginx through a domain name, so as to deploy the scheduling relationship among the nodes; the bridge pod allocates the actual address of the internal connection of the node resource through the container network plug-in (CNI), the container virtual machine and other management modes; the Node port accesses the service by allocating a host port corresponding to an actual Node and accessing the Node ip + Node port, for example, 10.10.1.1 is formed by a host ip10.10.1.1 and a port number 25565: 25565 access services to deploy means of communication between nodes. The embodiment meets the service requirements of multiple nodes in multiple modes, and improves the high availability and automatic management of application through a unified load balancing management service discovery strategy.
Referring to fig. 4, fig. 4 is a flowchart illustrating an implementation of a cluster deployment method according to still another embodiment of the present application. With respect to the embodiments corresponding to fig. 1 or fig. 2, the deployment method of the cluster provided in the embodiment of fig. 4 further includes S401 to S403 after step S103. It should be noted that the steps that are the same as those in the embodiment of fig. 1 or fig. 2 are not described again here, please refer to the foregoing.
S401, displaying operation and maintenance options corresponding to functional nodes of the cluster host on a visual interface, wherein the functional nodes are to-be-deployed nodes which are successfully deployed in the cluster host;
in this embodiment, because providing upgrade, capacity expansion, maintenance, and the like is a maintenance management operation that must be performed in the cluster operation process, the existing operation and maintenance operation mode requires a user to write a code, which is very inconvenient. Therefore, the embodiment is based on the existing cluster, simple configuration management is realized, operation visualization is realized, complexity of operation management is reduced, manual operation cost is saved, and working efficiency is improved. Referring to fig. 7, fig. 7 is a schematic diagram illustrating a visualization interface for a user to select an operation and maintenance option according to an embodiment of the present application. The operation and maintenance options include, but are not limited to, options corresponding to operation and maintenance operations such as node version upgrade, certificate upgrade, node replacement, node deletion, cluster expansion and the like.
S402, calling an operation and maintenance script file of a function node corresponding to the operation and maintenance option in a preset code warehouse based on the operation and maintenance option selected by the user;
in this embodiment, the preset code repository may be a Git code repository, and the operation and maintenance script file is a script file for performing operation and maintenance operations on the node. Illustratively, after clicking an operation and maintenance option (such as the right-side icon in fig. 7) corresponding to any node on the visualization interface in fig. 7, in response to the confirmation option clicked by the user, the operation and maintenance script file corresponding to the preset code warehouse is determined according to the operation and maintenance option selected by the user.
And S403, performing operation and maintenance operation on the functional nodes of the operation and maintenance script file based on the operation and maintenance script file.
In this embodiment, the operation and maintenance operations include, but are not limited to, the operation and maintenance operations such as node version upgrade, certificate upgrade, node replacement, node deletion, cluster expansion, and the like as described above.
Referring to fig. 8, fig. 8 is a block diagram of a deployment apparatus of a cluster according to an embodiment of the present application. The units included in the mobile terminal in this embodiment are configured to execute the steps in the embodiments corresponding to fig. 1 to 4. Please refer to fig. 1 to 4 and fig. 1 to 4 for the corresponding embodiments. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 8, the deployment apparatus of the cluster includes: a determination module 801, an initialization module 802, and a deployment module 803, wherein:
a determining module 801, configured to determine nodes to be deployed corresponding to multiple cluster hosts, respectively, and call a preset first configuration file, where the nodes to be deployed include a master node, a slave node, or a storage node;
an initialization module 802, configured to initialize deployment environments of multiple cluster hosts according to a first configuration file, and generate a second configuration file of a node to be deployed;
the deployment module 803 is configured to deploy, for the plurality of cluster hosts after the deployment environment is initialized, the master node, the slave node, or the storage node in the cluster hosts according to the second configuration file.
According to the deployment device of the cluster, the node to be deployed of the cluster host is determined through the determination module 801, the preset first configuration file is called, and the deployment environment of the cluster host is initialized through the initialization module 802 according to the first configuration file, so that the system can perform initialization deployment on the environment of the cluster host according to the first configuration file, and a user does not need to manually configure the environment parameters of the deployment environment in the environment deployment process of the cluster host; the initialization module 802 generates a second configuration file of the nodes to be deployed of the cluster hosts according to the first configuration file, so that the system can generate a corresponding configuration file for each node to be deployed of each cluster host without manually configuring the node parameters of each node and combing the interdependence relationship among the nodes by a user; finally, the deployment module 803 deploys the nodes corresponding to the cluster hosts in the initialized deployment environment according to the second configuration file, so that the system can deploy each node of each cluster host according to the second configuration file to complete cluster deployment; as can be seen from the above, the deployment method of the cluster provided by this embodiment does not require manual configuration by a user from the environment deployment of the host to the node deployment of the host, and realizes one-click cluster deployment, thereby improving deployment efficiency.
As an embodiment of the present application, the initialization module 802 is specifically configured to:
configuring the environmental parameters of the cluster host according to the initialized configuration parameters in the first configuration file;
and adding the host information of the cluster host to a preset configuration template to generate a second configuration file corresponding to the node to be deployed.
As an embodiment of the present application, the determining module 801 is further configured to:
displaying a node list of the cluster host on a visual interface;
acquiring a selection instruction of a user for selecting a node in a node list;
and determining the node selected by the user in the node list as the node to be deployed of the cluster host based on the selection instruction.
As an embodiment of the present application, the deployment module 803 is further configured to:
calling an automatic operation and maintenance tool Ansine to execute a second configuration file, and verifying whether the Ansine successfully executes the second configuration file in the cluster host;
if the anchor successfully executes the second configuration file in the cluster host, calling a second script file corresponding to the second configuration file in the preset code warehouse;
and deploying the nodes to be deployed in the cluster host after the deployment environment is initialized based on the second script file.
As an embodiment of the present application, the deployment apparatus of a cluster further includes:
the acquisition module is used for acquiring the deployment state of the cluster host;
and the completion module is used for determining that the cluster deployment is completed if the deployment states of the cluster hosts are successful.
As an embodiment of the present application, the deployment apparatus of a cluster further includes:
the display module is used for displaying operation and maintenance options corresponding to the functional nodes of the cluster host on a visual interface, wherein the functional nodes are to-be-deployed nodes which are successfully deployed on the cluster host;
the calling module is used for calling the operation and maintenance script file of the function node corresponding to the operation and maintenance option in the preset code warehouse based on the operation and maintenance option selected by the user;
and the operation and maintenance module is used for carrying out operation and maintenance operation on the functional nodes of the operation and maintenance script file based on the operation and maintenance script file.
It should be understood that, in the structural block diagram of the deployment apparatus of the cluster shown in fig. 8, each unit/module is used to execute each step in the embodiment corresponding to fig. 1 to 4, and each step in the embodiment corresponding to fig. 1 to 4 has been explained in detail in the above embodiment, specifically please refer to the relevant description in the embodiments corresponding to fig. 1 to 4 and fig. 1 to 4, which is not repeated herein.
Fig. 9 is a block diagram of a terminal device according to another embodiment of the present application. As shown in fig. 9, the terminal device 90 of this embodiment includes: a processor 91, a memory 92 and a computer program 93, e.g. a program of a deployment method of a cluster, stored in said memory 92 and executable on said processor 91. The processor 91 executes the computer program 93 to implement the steps in the embodiments of the deployment methods of the clusters described above, such as S101 to S103 shown in fig. 1, or S201 to S202 and S301 to S302 shown in fig. 2 and 3. Alternatively, when the processor 91 executes the computer program 93, the functions of the units in the embodiment corresponding to fig. 4, for example, the functions of the modules 801 to 803 shown in fig. 8, are implemented, for which reference is specifically made to the description in the embodiment corresponding to fig. 8, which is not repeated herein.
Illustratively, the computer program 93 may be divided into one or more units, which are stored in the memory 92 and executed by the processor 91 to accomplish the present application. The one or more units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 93 in the terminal 90. For example, the computer program 93 may be divided into a determination module, an initialization module, and a deployment, the specific functions of each unit/module being as described above.
The turntable device may include, but is not limited to, a processor 91, a memory 92. Those skilled in the art will appreciate that fig. 9 is merely an example of a terminal device 90 and does not constitute a limitation of terminal device 90 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the turntable device may also include input-output devices, network access devices, buses, etc.
The Processor 91 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 92 may be an internal storage unit of the terminal device 90, such as a hard disk or a memory of the terminal device 90. The memory 92 may also be an external storage device of the terminal device 90, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 90. Further, the memory 92 may also include both an internal storage unit and an external storage device of the terminal device 90. The memory 92 is used for storing the computer program and other programs and data required by the turntable device. The memory 92 may also be used to temporarily store data that has been output or is to be output.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for deploying a cluster, comprising:
determining nodes to be deployed corresponding to a plurality of cluster hosts respectively, and calling a preset first configuration file, wherein the nodes to be deployed comprise a main node, a slave node or a storage node;
initializing deployment environments of a plurality of cluster hosts according to the first configuration file, and generating a second configuration file of the node to be deployed;
and deploying the master node, the slave node or the storage node in the cluster host according to the second configuration file aiming at the plurality of cluster hosts after the initialization of the deployment environment.
2. The deployment method according to claim 1, wherein the first configuration file includes initialization configuration parameters and a plurality of preset configuration templates, and the initializing the deployment environments of the plurality of cluster hosts and generating the second configuration file of the node to be deployed according to the first configuration file comprises:
configuring environmental parameters of a plurality of cluster hosts according to the initialization configuration parameters in the first configuration file;
and adding the host information of the cluster host to the preset configuration template corresponding to the node to be deployed aiming at the node to be deployed of each cluster host, and generating a second configuration file corresponding to the node to be deployed.
3. The deployment method of claim 2, wherein the configuring environmental parameters of the plurality of cluster hosts according to the initialized configuration parameters in the first configuration file comprises:
calling a first script file corresponding to the initialization configuration parameters according to the initialization configuration parameters in the first configuration file;
executing the first script file, and configuring the environment parameters of a plurality of cluster hosts as the initialization configuration parameters.
4. The deployment method of claim 1, wherein the deploying the master node, the slave node or the storage node in the cluster host according to the second configuration file for the plurality of cluster hosts initialized in the deployment environment comprises:
calling an automatic operation and maintenance tool Ansible to execute the second configuration file, and verifying whether the Ansible successfully executes the second configuration file in the plurality of cluster hosts;
if the Ansible successfully executes the second configuration file in the plurality of cluster hosts, calling a second script file corresponding to the second configuration file;
and for each cluster host after the initialization of the deployment environment, deploying the master node, the slave node or the storage node corresponding to the second configuration file in the cluster host according to the second script file corresponding to the second configuration file.
5. The deployment method of claim 4 wherein the second script file comprises a master node script file, a slave node script file, and a storage node script file; the main node comprises an interface service component, a control component and a scheduling component; the slave node comprises a container management component and a communication service component; the storage node comprises a storage system service;
the deploying, by the cluster host initialized for the deployment environment, the master node, the slave node, or the storage node corresponding to the second configuration file in the cluster host according to the second script file corresponding to the second configuration file includes:
deploying the interface service component, the control component and the scheduling component in the cluster host after the initialization of a deployment environment according to a master node script file corresponding to a second configuration file, wherein the master node script file is configured with host information of the cluster host corresponding to the master node;
deploying the container management component and the communication service component in the cluster after the initialization of the deployment environment according to a slave node script file corresponding to a second configuration file, wherein the slave node script file is configured with host information of the cluster host corresponding to the slave node;
and creating the storage system service in the cluster host after the deployment environment is initialized according to the storage node script file corresponding to the second configuration file, wherein the storage node script file is configured with host information of the cluster host corresponding to the storage node.
6. The deployment method according to any one of claims 1 to 5, wherein the step of, after the step of deploying the master node, the slave node or the storage node in the cluster host according to the second configuration file for the plurality of cluster hosts initialized in the deployment environment, further comprises:
configuring a service discovery policy for the master node, the slave nodes and the storage nodes deployed to a plurality of the cluster hosts;
and deploying the communication relation among the main node, the slave node and the storage node according to the service discovery strategy.
7. The deployment method according to any one of claims 1 to 5, wherein the step of, after the step of deploying the master node, the slave node or the storage node in the cluster host according to the second configuration file for the plurality of cluster hosts initialized in the deployment environment, further comprises:
displaying operation and maintenance options corresponding to functional nodes of the cluster host on a visual interface, wherein the functional nodes are the main nodes, the slave nodes or the storage nodes which are successfully deployed on the cluster host;
based on the operation and maintenance option selected by the user, calling an operation and maintenance script file of the functional node corresponding to the operation and maintenance option;
and carrying out operation and maintenance operation on the functional nodes of the operation and maintenance script file based on the operation and maintenance script file.
8. A cluster deployment apparatus, comprising:
the system comprises a determining module, a configuration module and a configuration module, wherein the determining module is used for determining nodes to be deployed corresponding to a plurality of cluster hosts respectively and calling a preset first configuration file, and the nodes to be deployed comprise a main node, a slave node or a storage node;
the initialization module is used for initializing the deployment environments of the plurality of cluster hosts according to the first configuration file and generating a second configuration file of the node to be deployed;
and the deployment module is used for deploying the master node, the slave nodes or the storage nodes in the cluster hosts according to the second configuration file aiming at the plurality of cluster hosts after the initialization of the deployment environment.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202010762066.XA 2020-07-31 2020-07-31 Cluster deployment method and device, terminal equipment and storage medium Pending CN111782232A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010762066.XA CN111782232A (en) 2020-07-31 2020-07-31 Cluster deployment method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010762066.XA CN111782232A (en) 2020-07-31 2020-07-31 Cluster deployment method and device, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111782232A true CN111782232A (en) 2020-10-16

Family

ID=72765494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010762066.XA Pending CN111782232A (en) 2020-07-31 2020-07-31 Cluster deployment method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111782232A (en)

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445576A (en) * 2020-11-30 2021-03-05 中国人寿保险股份有限公司 Equipment calling method for shielding service difference and related equipment
CN112491607A (en) * 2020-11-21 2021-03-12 广州西麦科技股份有限公司 Method and system for managing application deployment
CN112491606A (en) * 2020-11-20 2021-03-12 湖南麒麟信安科技股份有限公司 Method for automatically deploying high-availability cluster of service system based on infrastructure
CN112650537A (en) * 2020-12-30 2021-04-13 平安证券股份有限公司 Server configuration method, device, equipment and computer readable storage medium
CN112711575A (en) * 2021-01-15 2021-04-27 山东云海国创云计算装备产业创新中心有限公司 Deployment method, system and related device of database cluster
CN112822044A (en) * 2020-12-30 2021-05-18 北京天融信网络安全技术有限公司 Distributed cluster deployment method and device, electronic equipment and readable storage medium
CN112860282A (en) * 2021-03-31 2021-05-28 中国工商银行股份有限公司 Upgrading method and device of cluster plug-in and server
CN113076111A (en) * 2021-03-26 2021-07-06 山东英信计算机技术有限公司 Customized cluster configuration method, system, terminal and storage medium
CN113094115A (en) * 2021-03-29 2021-07-09 联想(北京)有限公司 Deployment strategy determining method, system and storage medium
CN113204410A (en) * 2021-05-31 2021-08-03 平安科技(深圳)有限公司 Container type localized deployment method, system, equipment and storage medium
CN113254158A (en) * 2021-06-11 2021-08-13 苏州浪潮智能科技有限公司 Deployment method and device of deep learning system
CN113259447A (en) * 2021-05-26 2021-08-13 中国电子信息产业集团有限公司第六研究所 Cloud platform deployment method and device, electronic equipment and storage medium
CN113407191A (en) * 2021-06-21 2021-09-17 云智慧(北京)科技有限公司 Visual remote deployment method for transformer substation
CN113419818A (en) * 2021-06-23 2021-09-21 北京达佳互联信息技术有限公司 Basic component deployment method, device, server and storage medium
CN113419743A (en) * 2021-06-22 2021-09-21 康键信息技术(深圳)有限公司 Comprehensive application script deployment method, device, equipment and storage medium
CN113518095A (en) * 2021-09-14 2021-10-19 北京华云安信息技术有限公司 SSH cluster deployment method, device, equipment and storage medium
CN113608964A (en) * 2021-08-09 2021-11-05 宁畅信息产业(北京)有限公司 Cluster automation monitoring method and device, electronic equipment and storage medium
CN114143180A (en) * 2021-10-20 2022-03-04 武汉光庭信息技术股份有限公司 Method and device for light-weight rapid automatic deployment of K8s cluster
CN114327779A (en) * 2021-12-30 2022-04-12 北京瑞莱智慧科技有限公司 Application operation environment building method and device and storage medium
CN114785813A (en) * 2022-06-23 2022-07-22 四川野马科技有限公司 Engineering cost COS result file formatting storage method and system
TWI773200B (en) * 2021-03-18 2022-08-01 中華電信股份有限公司 Provision and management system and method for container infrastructure service and computer readable medium
CN115220874A (en) * 2022-09-05 2022-10-21 税友信息技术有限公司 Kubernetes cluster deployment method, device, equipment and storage medium
CN115314381A (en) * 2022-10-11 2022-11-08 统信软件技术有限公司 Automatic deployment method and device and computing equipment
CN115396437A (en) * 2022-08-24 2022-11-25 中电金信软件有限公司 Cluster building method and device, electronic equipment and storage medium
CN115904419A (en) * 2023-03-03 2023-04-04 杭州比智科技有限公司 Method and device for installing application software based on automatic script
CN116909584A (en) * 2023-05-06 2023-10-20 广东国地规划科技股份有限公司 Deployment method, device, equipment and storage medium of space-time big data engine
CN116991447A (en) * 2023-09-05 2023-11-03 荣耀终端有限公司 Operating system updating method and related equipment
CN117348975A (en) * 2023-12-05 2024-01-05 中电云计算技术有限公司 Cluster deployment method, device, equipment and storage medium
CN117519912A (en) * 2024-01-04 2024-02-06 之江实验室 Mirror image warehouse deployment method, device, storage medium and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103501242A (en) * 2013-09-18 2014-01-08 华为技术有限公司 Resource management method and multiple-node cluster device
CN108737468A (en) * 2017-04-19 2018-11-02 中兴通讯股份有限公司 Cloud platform service cluster, construction method and device
CN110166278A (en) * 2019-04-09 2019-08-23 平安科技(深圳)有限公司 Kubernetes cluster building method, apparatus, computer equipment and storage medium
CN110502244A (en) * 2019-07-11 2019-11-26 新华三大数据技术有限公司 Dispose the method and device of Kubernetes cluster
CN110784546A (en) * 2019-10-31 2020-02-11 浙江大华技术股份有限公司 Distributed cluster deployment method, server and storage device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103501242A (en) * 2013-09-18 2014-01-08 华为技术有限公司 Resource management method and multiple-node cluster device
CN108737468A (en) * 2017-04-19 2018-11-02 中兴通讯股份有限公司 Cloud platform service cluster, construction method and device
CN110166278A (en) * 2019-04-09 2019-08-23 平安科技(深圳)有限公司 Kubernetes cluster building method, apparatus, computer equipment and storage medium
CN110502244A (en) * 2019-07-11 2019-11-26 新华三大数据技术有限公司 Dispose the method and device of Kubernetes cluster
CN110784546A (en) * 2019-10-31 2020-02-11 浙江大华技术股份有限公司 Distributed cluster deployment method, server and storage device

Cited By (46)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112491606A (en) * 2020-11-20 2021-03-12 湖南麒麟信安科技股份有限公司 Method for automatically deploying high-availability cluster of service system based on infrastructure
CN112491606B (en) * 2020-11-20 2022-05-24 湖南麒麟信安科技股份有限公司 Method for automatically deploying high-availability cluster of service system based on infrastructure
CN112491607A (en) * 2020-11-21 2021-03-12 广州西麦科技股份有限公司 Method and system for managing application deployment
CN112445576B (en) * 2020-11-30 2024-04-16 中国人寿保险股份有限公司 Equipment calling method for shielding service difference and related equipment
CN112445576A (en) * 2020-11-30 2021-03-05 中国人寿保险股份有限公司 Equipment calling method for shielding service difference and related equipment
CN112650537B (en) * 2020-12-30 2024-02-02 平安证券股份有限公司 Server configuration method, device, equipment and computer readable storage medium
CN112650537A (en) * 2020-12-30 2021-04-13 平安证券股份有限公司 Server configuration method, device, equipment and computer readable storage medium
CN112822044B (en) * 2020-12-30 2022-12-20 北京天融信网络安全技术有限公司 Distributed cluster deployment method and device, electronic equipment and readable storage medium
CN112822044A (en) * 2020-12-30 2021-05-18 北京天融信网络安全技术有限公司 Distributed cluster deployment method and device, electronic equipment and readable storage medium
CN112711575A (en) * 2021-01-15 2021-04-27 山东云海国创云计算装备产业创新中心有限公司 Deployment method, system and related device of database cluster
TWI773200B (en) * 2021-03-18 2022-08-01 中華電信股份有限公司 Provision and management system and method for container infrastructure service and computer readable medium
CN113076111A (en) * 2021-03-26 2021-07-06 山东英信计算机技术有限公司 Customized cluster configuration method, system, terminal and storage medium
CN113094115A (en) * 2021-03-29 2021-07-09 联想(北京)有限公司 Deployment strategy determining method, system and storage medium
CN112860282A (en) * 2021-03-31 2021-05-28 中国工商银行股份有限公司 Upgrading method and device of cluster plug-in and server
CN112860282B (en) * 2021-03-31 2024-02-09 中国工商银行股份有限公司 Cluster plug-in upgrading method, device and server
CN113259447B (en) * 2021-05-26 2022-12-20 中国电子信息产业集团有限公司第六研究所 Cloud platform deployment method and device, electronic equipment and storage medium
CN113259447A (en) * 2021-05-26 2021-08-13 中国电子信息产业集团有限公司第六研究所 Cloud platform deployment method and device, electronic equipment and storage medium
CN113204410B (en) * 2021-05-31 2024-01-30 平安科技(深圳)有限公司 Container type localization deployment method, system, equipment and storage medium
CN113204410A (en) * 2021-05-31 2021-08-03 平安科技(深圳)有限公司 Container type localized deployment method, system, equipment and storage medium
CN113254158A (en) * 2021-06-11 2021-08-13 苏州浪潮智能科技有限公司 Deployment method and device of deep learning system
WO2022257303A1 (en) * 2021-06-11 2022-12-15 苏州浪潮智能科技有限公司 Method and apparatus for deploying deep learning system
CN113407191A (en) * 2021-06-21 2021-09-17 云智慧(北京)科技有限公司 Visual remote deployment method for transformer substation
CN113419743B (en) * 2021-06-22 2023-10-20 康键信息技术(深圳)有限公司 Comprehensive application script deployment method, device, equipment and storage medium
CN113419743A (en) * 2021-06-22 2021-09-21 康键信息技术(深圳)有限公司 Comprehensive application script deployment method, device, equipment and storage medium
CN113419818B (en) * 2021-06-23 2022-06-10 北京达佳互联信息技术有限公司 Basic component deployment method, device, server and storage medium
CN113419818A (en) * 2021-06-23 2021-09-21 北京达佳互联信息技术有限公司 Basic component deployment method, device, server and storage medium
CN113608964A (en) * 2021-08-09 2021-11-05 宁畅信息产业(北京)有限公司 Cluster automation monitoring method and device, electronic equipment and storage medium
CN113518095B (en) * 2021-09-14 2021-12-14 北京华云安信息技术有限公司 SSH cluster deployment method, device, equipment and storage medium
CN113518095A (en) * 2021-09-14 2021-10-19 北京华云安信息技术有限公司 SSH cluster deployment method, device, equipment and storage medium
CN114143180A (en) * 2021-10-20 2022-03-04 武汉光庭信息技术股份有限公司 Method and device for light-weight rapid automatic deployment of K8s cluster
CN114327779A (en) * 2021-12-30 2022-04-12 北京瑞莱智慧科技有限公司 Application operation environment building method and device and storage medium
CN114327779B (en) * 2021-12-30 2023-09-01 北京瑞莱智慧科技有限公司 Application running environment building method, device and storage medium
CN114785813A (en) * 2022-06-23 2022-07-22 四川野马科技有限公司 Engineering cost COS result file formatting storage method and system
CN114785813B (en) * 2022-06-23 2022-11-04 四川野马科技有限公司 Engineering cost COS result file formatting storage system
CN115396437A (en) * 2022-08-24 2022-11-25 中电金信软件有限公司 Cluster building method and device, electronic equipment and storage medium
CN115220874A (en) * 2022-09-05 2022-10-21 税友信息技术有限公司 Kubernetes cluster deployment method, device, equipment and storage medium
CN115314381A (en) * 2022-10-11 2022-11-08 统信软件技术有限公司 Automatic deployment method and device and computing equipment
CN115904419A (en) * 2023-03-03 2023-04-04 杭州比智科技有限公司 Method and device for installing application software based on automatic script
CN116909584A (en) * 2023-05-06 2023-10-20 广东国地规划科技股份有限公司 Deployment method, device, equipment and storage medium of space-time big data engine
CN116909584B (en) * 2023-05-06 2024-05-24 广东国地规划科技股份有限公司 Deployment method, device, equipment and storage medium of space-time big data engine
CN116991447B (en) * 2023-09-05 2023-12-22 荣耀终端有限公司 Operating system updating method and related equipment
CN116991447A (en) * 2023-09-05 2023-11-03 荣耀终端有限公司 Operating system updating method and related equipment
CN117348975A (en) * 2023-12-05 2024-01-05 中电云计算技术有限公司 Cluster deployment method, device, equipment and storage medium
CN117348975B (en) * 2023-12-05 2024-03-15 中电云计算技术有限公司 Cluster deployment method, device, equipment and storage medium
CN117519912A (en) * 2024-01-04 2024-02-06 之江实验室 Mirror image warehouse deployment method, device, storage medium and equipment
CN117519912B (en) * 2024-01-04 2024-04-05 之江实验室 Mirror image warehouse deployment method, device, storage medium and equipment

Similar Documents

Publication Publication Date Title
CN111782232A (en) Cluster deployment method and device, terminal equipment and storage medium
US11449354B2 (en) Apparatus, systems, and methods for composable distributed computing
AU2018200011B2 (en) Systems and methods for blueprint-based cloud management
CN108536519B (en) Method for automatically building Kubernetes main node and terminal equipment
US9386079B2 (en) Method and system of virtual desktop infrastructure deployment studio
CN106537338B (en) Self-expanding clouds
US9250672B2 (en) Cloning target machines in a software provisioning environment
US8402123B2 (en) Systems and methods for inventorying un-provisioned systems in a software provisioning environment
CN107959582B (en) Slice instance management method and device
US20060253848A1 (en) Method and apparatus for solutions deployment in a heterogeneous systems management environment
CN113645071B (en) Cluster deployment method, system, medium and electronic terminal
US11528186B2 (en) Automated initialization of bare metal servers
US11354150B1 (en) Utilizing maintenance event windows to determine placement of instances
US11650888B2 (en) Workflow error handling for device driven management
CN109799998B (en) OpenStack cluster configuration and batch deployment method and system
US10341181B2 (en) Method and apparatus to allow dynamic changes of a replica network configuration in distributed systems
US20220277071A1 (en) Enforcing policies for unmanaged applications
CN115604120B (en) Multi-cloud cluster resource sharing method, device, equipment and storage medium
US11909599B2 (en) Multi-domain and multi-tenant network topology model generation and deployment
US9098334B2 (en) Special values in oracle clusterware resource profiles
CN113419813B (en) Method and device for deploying bare engine management service based on container platform
CN117112122A (en) Cluster deployment method and device
CN110569104A (en) Management method and computer storage medium for task training in deep learning system
CN113254158B (en) Deployment method and device of deep learning system
US11953972B2 (en) Selective privileged container augmentation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination