CN115865924B - A cluster deployment method, device, equipment, medium and product - Google Patents

A cluster deployment method, device, equipment, medium and product Download PDF

Info

Publication number
CN115865924B
CN115865924B CN202310123251.8A CN202310123251A CN115865924B CN 115865924 B CN115865924 B CN 115865924B CN 202310123251 A CN202310123251 A CN 202310123251A CN 115865924 B CN115865924 B CN 115865924B
Authority
CN
China
Prior art keywords
deployment
information
cluster
resource
source
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.)
Active
Application number
CN202310123251.8A
Other languages
Chinese (zh)
Other versions
CN115865924A (en
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.)
China Telecom Cloud Technology Co Ltd
Original Assignee
China Telecom Cloud Technology 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 China Telecom Cloud Technology Co Ltd filed Critical China Telecom Cloud Technology Co Ltd
Priority to CN202310123251.8A priority Critical patent/CN115865924B/en
Publication of CN115865924A publication Critical patent/CN115865924A/en
Application granted granted Critical
Publication of CN115865924B publication Critical patent/CN115865924B/en
Priority to PCT/CN2023/140006 priority patent/WO2024169385A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application relates to the technical field of cloud computing, and provides a cluster deployment method, a device, equipment, a medium and a product, which comprise the following steps: acquiring command line information aiming at resource area deployment and input by a user as first deployment information; according to the first deployment information, deploying all available offline deployment dependent resources in the resource area; acquiring second deployment information, and acquiring deployment dependent resources required by the target cluster from the resource area according to the second deployment information; and deploying the target cluster according to the second deployment information based on the deployment dependent resources required by the target cluster. According to the method and the device, the offline resources of the acquired resource areas are called through command line information input by a user, so that dependence on online resources in the cluster deployment process is eliminated; the user can realize the cluster deployment by only filling command line information in the cluster deployment interface, so that the learning cost of the user for the cluster deployment is reduced, and the deployment of an available Kubernetes cluster is completed rapidly and efficiently.

Description

一种集群部署方法、装置、设备、介质及产品A cluster deployment method, device, equipment, medium and product

技术领域technical field

本申请实施例涉及云计算技术领域,具体而言,涉及一种集群部署方法、装置、设备、介质及产品。The embodiments of the present application relate to the technical field of cloud computing, and in particular, relate to a cluster deployment method, device, device, medium and product.

背景技术Background technique

容器技术是当前热门技术,也是最前沿的技术。自从docker的问世,使得应用软件的部署真正做到了一次构建,多环境多次使用。直到Kubernetes(一种可移植,可扩展,开源的容器管理平台)集群的推出,它的编排能力使应用软件具备了负载均衡、统一调度、批量发布、多平台部署的能力。Container technology is currently a hot technology, and it is also the most cutting-edge technology. Since the advent of docker, the deployment of application software has been built once and used multiple times in multiple environments. Until the introduction of Kubernetes (a portable, scalable, and open source container management platform) cluster, its orchestration capabilities enabled application software to have the capabilities of load balancing, unified scheduling, batch release, and multi-platform deployment.

然而,正是由于Kubernetes集群具有强大的容器任务编排能力,使得Kubernetes集群的部署过程较为复杂。具体而言,一方面,Kubernete集群配置参数复杂,容易在部署过程中因参数配置错误导致集群部署失败;另一方面,用户在部署过程中需要深刻理解并关注部署细节,用户对于集群部署流程的学习成本较高,导致部署时体验较差。因此,如何快速且高效的完成一个可用Kubernetes集群的部署,成为当前领域内亟待解决的问题。However, it is precisely because the Kubernetes cluster has a powerful container task orchestration capability that makes the deployment process of the Kubernetes cluster more complicated. Specifically, on the one hand, the configuration parameters of the Kubernetes cluster are complex, and it is easy to fail the cluster deployment due to parameter configuration errors during the deployment process; on the other hand, users need to deeply understand and pay attention to the deployment details during the deployment process. The learning cost is high, resulting in a poor deployment experience. Therefore, how to quickly and efficiently complete the deployment of an available Kubernetes cluster has become an urgent problem in the current field.

发明内容Contents of the invention

本申请实施例在于提供一种集群部署方法、装置、设备、介质及产品,旨在解决如何快速且高效的完成一个可用Kubernetes集群的部署的问题。The embodiment of the present application is to provide a cluster deployment method, device, equipment, medium and product, aiming at solving the problem of how to quickly and efficiently complete the deployment of an available Kubernetes cluster.

本申请实施例第一方面提供一种集群部署方法,包括:The first aspect of the embodiment of the present application provides a cluster deployment method, including:

获取第一部署信息,所述第一部署信息为用户在集群部署界面输入的针对资源区部署的命令行信息;Obtaining first deployment information, where the first deployment information is command line information for resource zone deployment input by a user on the cluster deployment interface;

根据所述第一部署信息,对资源区中所有可用的离线部署依赖资源进行部署;Deploy all available offline deployment dependent resources in the resource area according to the first deployment information;

获取第二部署信息,根据所述第二部署信息从所述资源区中获取目标集群所需的部署依赖资源,所述第二部署信息为用户在所述集群部署界面输入的针对集群部署的命令行信息;Obtain second deployment information, and obtain the deployment dependent resources required by the target cluster from the resource area according to the second deployment information, where the second deployment information is a command for cluster deployment input by the user on the cluster deployment interface line information;

基于所述目标集群所需的部署依赖资源,根据所述第二部署信息对所述目标集群进行部署。Deploy the target cluster according to the second deployment information based on the deployment dependent resources required by the target cluster.

在一种可选的实施方式中,所述资源区包括负载均衡节点,根据所述第一部署信息,对资源区中所有可用的离线部署依赖资源进行部署,包括:In an optional implementation manner, the resource zone includes a load balancing node, and deploying all available offline deployment dependent resources in the resource zone according to the first deployment information includes:

对所述第一部署信息进行解析,获取负载均衡部署信息;Analyzing the first deployment information to obtain load balancing deployment information;

基于所述负载均衡部署信息,配置负载均衡节点组件,所述负载均衡节点组件用于支持所述资源区的负载均衡节点的运行;Based on the load balancing deployment information, configuring a load balancing node component, the load balancing node component is used to support the operation of the load balancing node in the resource area;

配置所述资源区的负载均衡节点针对于多个子资源区的交互路径;configuring the interaction paths of the load balancing nodes in the resource zone for multiple sub-resource zones;

根据所述第一部署信息,对所述多个子资源区中的离线部署依赖资源进行部署,所述离线部署依赖资源包括以下至少一项:软件源、镜像源、集群域名以及时间同步源。According to the first deployment information, the offline deployment dependent resources in the plurality of sub-resource areas are deployed, and the offline deployment dependent resources include at least one of the following: a software source, a mirror image source, a cluster domain name, and a time synchronization source.

在一种可选的实施方式中,所述子资源区包括软件源区,根据所述第一部署信息,对所述软件源区进行部署,包括:In an optional implementation manner, the sub-resource area includes a software source area, and deploying the software source area according to the first deployment information includes:

对所述第一部署信息进行解析,获取软件源部署信息;Analyzing the first deployment information to obtain software source deployment information;

基于所述软件源部署信息,配置所述软件源的操作系统路径,所述软件源为二进制包,所述软件源的格式为与所述操作系统对应的可用格式;Based on the software source deployment information, configure the operating system path of the software source, the software source is a binary package, and the format of the software source is an available format corresponding to the operating system;

按照所述操作系统路径,对所述软件源进行解压。According to the operating system path, the software source is decompressed.

在一种可选的实施方式中,所述子资源区包括镜像源区,根据所述第一部署信息,对所述镜像源区进行部署,包括:In an optional implementation manner, the sub-resource area includes an image source area, and deploying the image source area according to the first deployment information includes:

对所述第一部署信息进行解析,获取镜像源部署信息;Analyzing the first deployment information to obtain mirror source deployment information;

基于所述镜像源部署信息,部署主镜像源,所述主镜像源包含集群部署所需的镜像;Deploying a primary image source based on the image source deployment information, where the primary image source contains images required for cluster deployment;

基于所述主镜像源,同步部署备镜像源。Based on the primary image source, the standby image source is deployed synchronously.

在一种可选的实施方式中,所述子资源区包括域名解析区以及时间同步源区,根据所述第一部署信息,对所述域名解析区进行部署,包括:In an optional implementation manner, the sub-resource area includes a domain name resolution area and a time synchronization source area, and deploying the domain name resolution area according to the first deployment information includes:

对所述第一部署信息进行解析,获取域名解析部署信息;Analyzing the first deployment information to obtain domain name resolution deployment information;

基于所述域名解析部署信息,生成集群域名,所述集群域名用于标识不同的集群;Based on the domain name analysis deployment information, a cluster domain name is generated, and the cluster domain name is used to identify different clusters;

根据所述第一部署信息,对所述时间同步源区进行部署,包括:According to the first deployment information, deploying the time synchronization source zone includes:

对所述第一部署信息进行解析,获取时间同步源部署信息;Analyzing the first deployment information to obtain time synchronization source deployment information;

基于所述时间同步源部署信息,生成所述时间同步源,所述时间同步源用于提供集群的时间同步服务。The time synchronization source is generated based on the time synchronization source deployment information, and the time synchronization source is used to provide a time synchronization service of the cluster.

在一种可选的实施方式中,根据所述第二部署信息对所述目标集群进行部署之后,所述方法还包括:In an optional implementation manner, after deploying the target cluster according to the second deployment information, the method further includes:

检测目标组件的部署结果,所述目标组件为所述资源区中每个子资源区以及所有集群中每个组件;Detecting the deployment result of the target component, where the target component is each sub-resource area in the resource area and each component in all clusters;

在所述目标组件的部署结果为部署失败时,在所述集群部署界面显示部署失败信息,所述部署失败信息包括以下至少一项:目标组件信息以及用户输入的错误部署信息;When the deployment result of the target component is a deployment failure, displaying deployment failure information on the cluster deployment interface, the deployment failure information includes at least one of the following: target component information and wrong deployment information input by the user;

响应于用户输入的更新部署信息,对所述目标组件进行回滚;Rolling back the target component in response to the updated deployment information input by the user;

基于所述更新部署信息,对所述目标组件进行重新部署。Redeploy the target component based on the updated deployment information.

本申请实施例第二方面提供了一种集群部署装置,包括:The second aspect of the embodiment of the present application provides a cluster deployment device, including:

第一部署信息获取模块,用于获取第一部署信息,所述第一部署信息为用户在集群部署界面输入的针对资源区部署的命令行信息;A first deployment information acquisition module, configured to acquire first deployment information, where the first deployment information is command line information for resource zone deployment input by a user on the cluster deployment interface;

资源部署模块,用于根据所述第一部署信息,对资源区中所有可用的离线部署依赖资源进行部署;A resource deployment module, configured to deploy all available offline deployment dependent resources in the resource area according to the first deployment information;

第二部署信息获取模块,用于获取第二部署信息,根据所述第二部署信息从所述资源区中获取目标集群所需的部署依赖资源,所述第二部署信息为用户在所述集群部署界面输入的针对集群部署的命令行信息;The second deployment information acquisition module is configured to acquire second deployment information, and acquire the deployment dependent resources required by the target cluster from the resource area according to the second deployment information, the second deployment information is the user's deployment in the cluster Command line information for cluster deployment entered on the deployment interface;

集群部署模块,用于基于所述目标集群所需的部署依赖资源,根据所述第二部署信息对所述目标集群进行部署。A cluster deployment module, configured to deploy the target cluster according to the second deployment information based on the deployment dependent resources required by the target cluster.

在一种可选的实施方式中,所述资源部署模块,包括:In an optional implementation manner, the resource deployment module includes:

第一信息解析子模块,用于对所述第一部署信息进行解析,获取负载均衡部署信息;The first information parsing submodule is configured to parse the first deployment information to obtain load balancing deployment information;

节点组件配置子模块,用于基于所述负载均衡部署信息,配置负载均衡节点组件,所述负载均衡节点组件用于支持所述资源区的负载均衡节点的运行;A node component configuration submodule, configured to configure a load balancing node component based on the load balancing deployment information, and the load balancing node component is used to support the operation of the load balancing node in the resource zone;

交互路径建立子模块,用于配置所述资源区的负载均衡节点针对于多个子资源区的交互路径;An interaction path establishment submodule, configured to configure the interaction path of the load balancing node in the resource area for multiple sub-resource areas;

子资源部署子模块,用于根据所述第一部署信息,对所述多个子资源区中的离线部署依赖资源进行部署,所述离线部署依赖资源包括以下至少一项:软件源、镜像源、集群域名以及时间同步源。The sub-resource deployment submodule is configured to deploy the offline deployment dependent resources in the plurality of sub-resource areas according to the first deployment information, and the offline deployment dependent resources include at least one of the following: software source, image source, Cluster domain name and time synchronization source.

在一种可选的实施方式中,所述子资源部署子模块,包括:In an optional implementation manner, the sub-resource deployment sub-module includes:

第二信息解析子单元,用于对所述第一部署信息进行解析,获取软件源部署信息;The second information parsing subunit is configured to parse the first deployment information to obtain software source deployment information;

软件源配置子单元,用于基于所述软件源部署信息,配置所述软件源的操作系统路径,所述软件源为二进制包,所述软件源的格式为与所述操作系统对应的可用格式;The software source configuration subunit is configured to configure the operating system path of the software source based on the software source deployment information, the software source is a binary package, and the format of the software source is an available format corresponding to the operating system ;

软件源解压子单元,用于按照所述操作系统路径,对所述软件源进行解压。The software source decompression subunit is configured to decompress the software source according to the operating system path.

在一种可选的实施方式中,所述子资源部署子模块,包括:In an optional implementation manner, the sub-resource deployment sub-module includes:

第三信息解析子单元,用于对所述第一部署信息进行解析,获取镜像源部署信息;The third information parsing subunit is configured to parse the first deployment information to acquire mirror source deployment information;

主镜像源部署子单元,用于基于所述镜像源部署信息,部署主镜像源,所述主镜像源包含集群部署所需的镜像;The primary image source deployment subunit is configured to deploy a primary image source based on the image source deployment information, and the primary image source contains images required for cluster deployment;

倍镜像源部署子单元,用于基于所述主镜像源,同步部署备镜像源。The double image source deployment subunit is configured to synchronously deploy the standby image source based on the primary image source.

在一种可选的实施方式中,所述子资源部署子模块,包括:In an optional implementation manner, the sub-resource deployment sub-module includes:

第四信息解析子单元,用于对所述第一部署信息进行解析,获取域名解析部署信息;The fourth information parsing subunit is configured to parse the first deployment information to obtain domain name resolution deployment information;

域名生成子单元,用于基于所述域名解析部署信息,生成集群域名,所述集群域名用于标识不同的集群;A domain name generating subunit, configured to resolve deployment information based on the domain name and generate a cluster domain name, where the cluster domain name is used to identify different clusters;

在一种可选的实施方式中,所述子资源部署子模块,还包括:In an optional implementation manner, the sub-resource deployment submodule further includes:

第五信息解析子单元,用于对所述第一部署信息进行解析,获取时间同步源部署信息;The fifth information parsing subunit is configured to parse the first deployment information to obtain time synchronization source deployment information;

时间同步子单元,用于基于所述时间同步源部署信息,生成所述时间同步源,所述时间同步源用于提供集群的时间同步服务。The time synchronization subunit is configured to generate the time synchronization source based on the time synchronization source deployment information, and the time synchronization source is used to provide a time synchronization service of the cluster.

在一种可选的实施方式中,所述装置,还包括:In an optional embodiment, the device further includes:

检测模块,用于检测目标组件的部署结果,所述目标组件为所述资源区中每个子资源区以及所有集群中每个组件;A detection module, configured to detect the deployment result of the target component, where the target component is each sub-resource area in the resource area and each component in all clusters;

失败信息显示模块,用于在所述目标组件的部署结果为部署失败时,在所述集群部署界面显示部署失败信息,所述部署失败信息包括以下至少一项:目标组件信息以及用户输入的错误部署信息;A failure information display module, configured to display deployment failure information on the cluster deployment interface when the deployment result of the target component is a deployment failure, and the deployment failure information includes at least one of the following: target component information and user input errors deployment information;

回滚模块,用于响应于用户输入的更新部署信息,对所述目标组件进行回滚;A rollback module, configured to roll back the target component in response to the updated deployment information input by the user;

重新部署模块,用于基于所述更新部署信息,对所述目标组件进行重新部署。A redeployment module, configured to redeploy the target component based on the updated deployment information.

本申请实施例第三方面提供了一种电子设备,包括存储器、处理器及存储在存储器上的计算机程序,所述处理器执行所述计算机程序以实现第一方面中任一所述的一种集群部署方法中的步骤。The third aspect of the embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory, and the processor executes the computer program to implement any one of the first aspects. Steps in the cluster deployment method.

本申请实施例第四方面提供了一种计算机可读存储介质,其上存储有计算机程序/指令,该计算机程序/指令被处理器执行时实现第一方面中任一所述的一种集群部署方法中的步骤。The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, on which computer programs/instructions are stored, and when the computer programs/instructions are executed by a processor, the cluster deployment described in any one of the first aspects is implemented steps in the method.

本申请实施例第五方面提供了一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现第一方面中任一所述的一种集群部署方法中的步骤。A fifth aspect of the embodiments of the present application provides a computer program product, including computer programs/instructions, and when the computer programs/instructions are executed by a processor, the steps in any one of the cluster deployment methods described in the first aspect are implemented.

有益效果:Beneficial effect:

本申请实施例提供了一种集群部署,包括:获取第一部署信息,所述第一部署信息为用户在集群部署界面输入的针对资源区部署的命令行信息;根据所述第一部署信息,对资源区中所有可用的离线部署依赖资源进行部署;获取第二部署信息,根据所述第二部署信息从所述资源区中获取目标集群所需的部署依赖资源,所述第二部署信息为用户在所述集群部署界面输入的针对集群部署的命令行信息;基于所述目标集群所需的部署依赖资源,根据所述第二部署信息对所述目标集群进行部署。本申请实施例通过用户输入的命令行信息,调用已获取的资源区的离线资源,消除了集群部署过程中对于在线资源的依赖;同时屏蔽集群部署的细节,用户只需在集群部署界面填写命令行信息即可实现集群部署,降低了用户对于集群部署的学习成本,从而快速且高效的完成一个可用Kubernetes集群的部署。An embodiment of the present application provides a cluster deployment, including: obtaining first deployment information, the first deployment information is the command line information for resource area deployment input by the user on the cluster deployment interface; according to the first deployment information, Deploy all available offline deployment dependent resources in the resource area; obtain second deployment information, and obtain the deployment dependent resources required by the target cluster from the resource area according to the second deployment information, the second deployment information is The command line information for cluster deployment input by the user on the cluster deployment interface; deploying the target cluster according to the second deployment information based on the deployment dependent resources required by the target cluster. The embodiment of this application uses the command line information input by the user to call the obtained offline resources in the resource area, eliminating the dependence on online resources during the cluster deployment process; at the same time shielding the details of the cluster deployment, the user only needs to fill in the command on the cluster deployment interface Cluster deployment can be realized by running information, which reduces the user's learning cost for cluster deployment, so as to quickly and efficiently complete the deployment of an available Kubernetes cluster.

附图说明Description of drawings

为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments of the present application. Obviously, the accompanying drawings in the following description are only some embodiments of the present application , for those skilled in the art, other drawings can also be obtained according to these drawings without paying creative labor.

图1是本申请一实施例提出的一种集群部署方法流程图;Fig. 1 is a flow chart of a cluster deployment method proposed by an embodiment of the present application;

图2是本申请一实施例提出的一种集群部署示意图;FIG. 2 is a schematic diagram of cluster deployment proposed by an embodiment of the present application;

图3是本申请一实施例提出的一种资源区部署流程示意图;FIG. 3 is a schematic diagram of a resource area deployment process proposed by an embodiment of the present application;

图4是本申请一实施例提出的一种负载均衡节点部署示意图;FIG. 4 is a schematic diagram of a load balancing node deployment proposed by an embodiment of the present application;

图5是本申请一实施例提出的一种软件源区部署示意图;Fig. 5 is a schematic diagram of a software source area deployment proposed by an embodiment of the present application;

图6是本申请一实施例提出的一种镜像源区部署示意图;FIG. 6 is a schematic diagram of deployment of an image source area proposed by an embodiment of the present application;

图7是本申请一实施例提出的一种集群部署装置示意图;FIG. 7 is a schematic diagram of a cluster deployment device proposed by an embodiment of the present application;

图8是本申请一实施例提出的一种电子设备示意图。FIG. 8 is a schematic diagram of an electronic device proposed by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

相关技术中,一方面Kubernete集群配置参数复杂,容易在部署过程中因参数配置错误导致集群部署失败;另一方面,用户在部署过程中需要深刻理解并关注部署细节,用户对于集群部署流程的学习成本较高,导致部署时体验较差。In related technologies, on the one hand, the configuration parameters of the Kubernetes cluster are complex, and it is easy to fail the cluster deployment due to parameter configuration errors during the deployment process; on the other hand, the user needs to deeply understand and pay attention to the deployment details during the deployment process. The cost is high, resulting in a poor experience when deploying.

有鉴于此,本申请实施例提出一种集群部署方法,图1示出了集群部署方法流程图,如图1所示,包括如下步骤:In view of this, the embodiment of the present application proposes a cluster deployment method. Figure 1 shows a flowchart of the cluster deployment method, as shown in Figure 1, including the following steps:

S101、获取第一部署信息。S101. Acquire first deployment information.

获取第一部署信息,所述第一部署信息为用户在集群部署界面输入的针对资源区部署的命令行信息。Obtain first deployment information, where the first deployment information is command line information for resource zone deployment input by a user on the cluster deployment interface.

S102、根据所述第一部署信息,对资源区中所有可用的离线部署依赖资源进行部署。S102. According to the first deployment information, deploy all available offline deployment dependent resources in the resource area.

S103、获取第二部署信息,根据所述第二部署信息从所述资源区中获取目标集群所需的部署依赖资源。S103. Acquire second deployment information, and acquire deployment dependent resources required by the target cluster from the resource zone according to the second deployment information.

获取第二部署信息,根据所述第二部署信息从所述资源区中获取目标集群所需的部署依赖资源,所述第二部署信息为用户在所述集群部署界面输入的针对集群部署的命令行信息。Obtain second deployment information, and obtain the deployment dependent resources required by the target cluster from the resource area according to the second deployment information, where the second deployment information is a command for cluster deployment input by the user on the cluster deployment interface row information.

S104、基于所述目标集群所需的部署依赖资源,根据所述第二部署信息对所述目标集群进行部署。S104. Based on the deployment dependent resources required by the target cluster, deploy the target cluster according to the second deployment information.

本申请实施例中,所述第一部署信息为用户在集群部署界面中输入的针对资源区部署的命令行信息,所述第二部署信息为用户在所述集群部署界面输入的针对集群部署的命令行信息。其中,所述集群部署界面为用户在命令行工具中显示的前端界面,所述命令行工具为用户通过输入相关命令行字符执行相应命令的操作程序。在资源区部署流程中,所述集群部署界面上显示用于输入第一部署信息的资源区部署模板,用户通过在集群部署界面按照资源区部署模板填写资源区部署所需的必要信息(如域名、IP、密码等信息),生成用于指示资源区部署流程的第一部署信息;在集群部署流程中,所述集群部署界面上显示用于输入第二部署信息的集群部署模板,用户通过在集群部署界面按照集群部署模板填写集群部署所需的必要信息(如IP、镜像源、容器运行时CRI等信息),生成用于指示集群部署流程的第二部署信息。In this embodiment of the application, the first deployment information is the command line information for resource zone deployment entered by the user on the cluster deployment interface, and the second deployment information is the cluster deployment information entered by the user on the cluster deployment interface. Command line information. Wherein, the cluster deployment interface is a front-end interface displayed by the user in a command line tool, and the command line tool is an operating program for the user to execute corresponding commands by inputting relevant command line characters. In the resource area deployment process, the cluster deployment interface displays a resource area deployment template for inputting the first deployment information, and the user fills in the necessary information required for resource area deployment (such as the domain name) on the cluster deployment interface according to the resource area deployment template. , IP, password, etc.) to generate the first deployment information used to indicate the resource zone deployment process; during the cluster deployment process, the cluster deployment interface displays a cluster deployment template for inputting the second deployment information, and the user passes in The cluster deployment interface fills in the necessary information required for cluster deployment (such as IP, image source, container runtime CRI, etc.) according to the cluster deployment template, and generates the second deployment information used to indicate the cluster deployment process.

本申请实施例中,所述资源区用于提供参与集群部署的所有集群的所需的部署依赖资源。其中,所述部署依赖资源至少包括以下一项:软件源、镜像源、集群域名以及时间同步源。所述资源区的资源事先通过离线安装包存储于资源区内,解除了对于外部网络的在线资源的依赖。通过资源区部署将每个集群所需的部署依赖资源分发至相应的集群中,用于在集群部署时进行一键部署。In this embodiment of the present application, the resource area is used to provide required deployment-dependent resources of all clusters participating in the cluster deployment. Wherein, the deployment dependent resource includes at least one of the following: software source, mirror image source, cluster domain name and time synchronization source. The resources in the resource area are stored in the resource area through the offline installation package in advance, which removes the dependence on the online resources of the external network. The deployment dependent resources required by each cluster are distributed to the corresponding clusters through resource zone deployment for one-click deployment during cluster deployment.

本申请实施例中,对于目标集群进行部署只需要从部署好的资源区获取目标集群所需的离线的部署依赖资源,基于所述部署依赖资源以及第二部署信息,触发自动一键部署,免去用户对于部署细节的关注,降低了用户对于集群部署的学习成本。In this embodiment of the application, the deployment of the target cluster only needs to obtain the offline deployment-dependent resources required by the target cluster from the deployed resource area, and based on the deployment-dependent resources and the second deployment information, automatic one-key deployment is triggered to avoid Removing the user's attention to deployment details reduces the user's learning cost for cluster deployment.

为了使本领域技术人员更好的理解本申请实施例的方案,图2示出了一种集群部署示意图,如图2所示,结合图2所示的内容,接下来对本申请实施例提供的一种集群部署方法进行详细阐述:In order to enable those skilled in the art to better understand the solution of the embodiment of the present application, Figure 2 shows a schematic diagram of a cluster deployment, as shown in Figure 2, combined with the content shown in Figure 2, the following provides the embodiment of the present application A cluster deployment method is described in detail:

具体实施步骤S101时,用户进入命令行工具的集群部署界面,在集群部署界面显示的资源区部署模板中输入针对于资源区部署的命令行信息;随后,根据用户输入的针对于资源区部署的命令行信息生成对应的第一部署信息,所述第一部署信息用于指示对于资源区的部署。需要说明的是,具体的命令行工具可采用现有的命令行工具(如cce-install工具等),所述命令行工具可根据实际情况而定,本申请在此不作限制。When step S101 is specifically implemented, the user enters the cluster deployment interface of the command line tool, and enters the command line information for resource area deployment in the resource area deployment template displayed on the cluster deployment interface; The command line information generates corresponding first deployment information, and the first deployment information is used to indicate the deployment of the resource zone. It should be noted that the specific command line tool can be an existing command line tool (such as cce-install tool, etc.), and the command line tool can be determined according to the actual situation, which is not limited in this application.

图3示出了一种资源区部署流程示意图,如图3所示,具体实施步骤S102时,按照图三所示的流程对资源区进行部署。首先部署所述资源区中的负载均衡节点,图4示出了一种负载均衡节点部署示意图。其中,所述资源区的负载均衡节点用于在集群部署过程中与每个集群中的负载均衡节点进行交互,实现为每个目标集群的目标组件提供所需的部署依赖资源。具体而言,首先响应于用户输入的第一部署信息,对所述第一部署信息进行解析,获取用于指示负载均衡节点部署过程的负载均衡部署信息;随后,基于资源区的虚拟IP,确定资源区的负载均衡节点,其中,所述负载均衡节点至少包括一个初始负载均衡节点,在一种可选的实施方式中,所述负载均衡节点还可以包括一个或多个与初始负载均衡节点相同的备份负载均衡节点,通过设置所述备份负载均衡节点,在初始负载节点出现问题不能正常工作时,通过与初始负载节点相同的备份负载节点与目标集群实现资源交互,避免了在初始负载节点出现问题不能正常工作时资源区与目标集群的交互障碍的问题。FIG. 3 shows a schematic diagram of a resource area deployment process. As shown in FIG. 3 , when step S102 is specifically implemented, the resource area is deployed according to the process shown in FIG. 3 . Firstly, load balancing nodes in the resource zone are deployed. FIG. 4 shows a schematic diagram of load balancing node deployment. Wherein, the load balancing node in the resource area is used to interact with the load balancing node in each cluster during the cluster deployment process, so as to provide the required deployment dependent resources for the target components of each target cluster. Specifically, firstly, in response to the first deployment information input by the user, the first deployment information is analyzed, and the load balancing deployment information used to indicate the deployment process of the load balancing node is obtained; then, based on the virtual IP of the resource zone, determine A load balancing node in the resource area, wherein the load balancing node includes at least one initial load balancing node, and in an optional implementation, the load balancing node may also include one or more initial load balancing nodes The backup load balancing node, by setting the backup load balancing node, when the initial load node has a problem and cannot work normally, the resource interaction between the backup load node and the target cluster is realized through the same backup load node as the initial load node, avoiding the occurrence of A problem that hinders the interaction of the resource zone with the target cluster when the problem does not work properly.

在确定资源区的负载均衡节点之后,基于所述负载均衡部署信息,配置负载均衡节点组件,所述负载均衡节点组件用于支持所述资源区的负载均衡节点的运行,具体而言,基于所述负载均衡部署信息,配置交换机制软件(Keepalived)以及反向代理Web服务器(Nginx),其中,Keepalived用于检测服务器的状态,Nginx作为负载均衡服务的节点组件,既可以在内部直接支持程序对外进行服务,也可以支持作为代理服务对外进行服务。After determining the load balancing node in the resource zone, based on the load balancing deployment information, configure the load balancing node component, the load balancing node component is used to support the operation of the load balancing node in the resource zone, specifically, based on the Describe the load balancing deployment information, configure the switching mechanism software (Keepalived) and the reverse proxy web server (Nginx), among them, Keepalived is used to detect the status of the server, and Nginx, as a node component of the load balancing service, can directly support the program internally and externally It can also support external services as a proxy service.

由于所述资源区的负载均衡节点用于在集群部署过程中与每个集群中的负载均衡节点进行交互,实现为每个目标集群的目标组件提供所需的部署依赖资源,因此,在完成对于负载均衡节点组件的配置后,需要配置所述资源区的负载均衡节点针对于多个子资源区的交互路径,具体而言,所述资源区中包含多个子资源区,所述子资源区包括以下至少一项:软件源区、镜像源区、域名解析区以及时间同步源区。Since the load balancing nodes in the resource zone are used to interact with the load balancing nodes in each cluster during the cluster deployment process, to provide the required deployment dependent resources for the target components of each target cluster, therefore, after completing the After the configuration of the load balancing node component, it is necessary to configure the interaction path of the load balancing node in the resource area for multiple sub-resource areas. Specifically, the resource area contains multiple sub-resource areas, and the sub-resource areas include the following At least one item: software source area, mirror image source area, domain name resolution area, and time synchronization source area.

在一种可选的实施方式中,配置所述资源区的负载均衡节点针对于多个子资源区的交互路径,具体包括:根据所述第一部署信息,配置软件源路由,实现配置所述资源区的负载均衡节点针对于软件源区的交互路径;根据所述第一部署信息,配置镜像源路由,实现配置所述资源区的负载均衡节点针对于镜像源区的交互路径;根据所述第一部署信息,配置域名解析路由,实现配置所述资源区的负载均衡节点针对于域名解析区的交互路径。通过所述资源区的负载均衡节点与每个子资源区的交互路径,以及资源区的负载均衡节点与目标集群的负载均衡节点的交互,实现每个子资源区的部署依赖资源与目标集群的资源传输。In an optional implementation manner, configuring the interaction path of the load balancing node in the resource area for multiple sub-resource areas specifically includes: configuring software source routing according to the first deployment information to implement configuring the resource The load balancing node in the resource zone is aimed at the interaction path of the software source zone; according to the first deployment information, configure the mirroring source route to realize the configuration of the interaction path of the load balancing node in the resource zone for the mirroring source zone; according to the first deployment information Deployment information, configure domain name resolution routing, and configure the interaction path of the load balancing node in the resource area with respect to the domain name resolution area. Through the interaction path between the load balancing node in the resource area and each sub-resource area, and the interaction between the load balancing node in the resource area and the load balancing node in the target cluster, the deployment of each sub-resource area depends on the resource transmission with the target cluster .

在建立所述资源区的负载均衡节点针对于多个子资源区的交互路径之后,完成了对于资源区的负载均衡节点的部署,随后根据所述第一部署信息,对所述多个子资源区中的离线部署依赖资源进行部署,所述离线部署依赖资源包括以下至少一项:软件源、镜像源、集群域名以及时间同步源。After establishing the interaction path of the load balancing node in the resource area for multiple sub-resource areas, the deployment of the load balancing node for the resource area is completed, and then according to the first deployment information, the The offline deployment depends on resources for deployment, and the offline deployment depends on resources including at least one of the following: software source, mirror image source, cluster domain name, and time synchronization source.

在一种可选的实施方式中,所述子资源区包括软件源区,所述软件源区用于为目标集群的部署提供所需的软件源,示例性地,所述软件源区为YUM(YellowdogUpdaterModified,前端软件包管理器),需要说明的是,上述示例只是为了使本领域技术人员更好的对本申请提出的方案进行理解而给出的一种可选的情况,具体的软件源区的管理器可根据实际情况确定,本申请在此不作限制。In an optional implementation manner, the sub-resource area includes a software source area, and the software source area is used to provide the required software source for the deployment of the target cluster. Exemplarily, the software source area is YUM (YellowdogUpdaterModified, front-end software package manager), it should be noted that the above example is only an optional situation for those skilled in the art to better understand the solution proposed in this application. The specific software source area The manager can be determined according to the actual situation, which is not limited in this application.

图5示出了一种软件源区部署示意图,如图5所示,所述对于软件源区的部署按照如下步骤进行:获取资源区的软件源的离线安装包,所述软件源为二进制的离线安装包。随后获取软件源的离线安装包的安装路径,具体而言,先对所述第一部署信息进行解析,获取软件源部署信息;基于所述软件源部署信息,配置所述软件源的操作系统路径;最后,按照所述操作系统路径,对所述软件源进行解压,实现所述软件源区的部署。Fig. 5 shows a schematic diagram of software source area deployment. As shown in Fig. 5, the deployment of the software source area is carried out according to the following steps: obtain the offline installation package of the software source in the resource area, and the software source is binary Install packages offline. Then obtain the installation path of the offline installation package of the software source, specifically, first analyze the first deployment information to obtain the software source deployment information; configure the operating system path of the software source based on the software source deployment information ; Finally, according to the operating system path, the software source is decompressed to realize the deployment of the software source area.

由于进行集群部署过程中,每个集群所使用的操作系统可能不同,这会导致软件源的离线安装包在目标集群的集群部署过程中,因系统不兼容的问题而无法使用,影响集群部署的成功率。因此,本申请实施例中,所述软件源的格式为与所述操作系统对应的可用格式,以图5所示的软件源部署流程为例,所述软件源的离线安装包针对CenOS(CommunityEnterprise Operating System,社区企业操作系统)系统、红旗操作系统以及CtyunOS系统分别提供了相应格式的软件源,需要说明的是,所述与所述软件源对应的操作系统不限于上述操作系统,具体的软件源的格式根据所述操作系统的可用格式确定,本申请在此不对操作系统和格式进行限定。本申请实施例中资源区提供的软件源的格式对应每个集群的操作系统的可用格式,可以保证在多个集群存在多操作系统时,能够兼容不同的操作系统,提高集群部署的成功率和效率。During the cluster deployment process, the operating system used by each cluster may be different, which will cause the offline installation package of the software source to be unusable due to system incompatibility during the cluster deployment process of the target cluster, affecting the cluster deployment. Success rate. Therefore, in the embodiment of the present application, the format of the software source is an available format corresponding to the operating system. Taking the software source deployment process shown in FIG. 5 as an example, the offline installation package of the software source is for CenOS (Community Enterprise Operating System (community enterprise operating system) system, Hongqi operating system, and CtyunOS system respectively provide software sources in corresponding formats. It should be noted that the operating system corresponding to the software source is not limited to the above-mentioned operating system. The format of the source is determined according to the available format of the operating system, and this application does not limit the operating system and format here. The format of the software source provided in the resource area in the embodiment of the present application corresponds to the available format of the operating system of each cluster, which can ensure that when there are multiple operating systems in multiple clusters, it can be compatible with different operating systems, and improve the success rate of cluster deployment and efficiency.

此外,所述软件源为事先置于所述资源区的离线安装包,在集群部署过程中,无需再通过网络连接在线获取目标集群所需的软件源,可以解除集群部署与外部网络环境的依赖,使得在网络环境受限的情况下获取软件源的二进制包。In addition, the software source is an offline installation package placed in the resource area in advance. During the cluster deployment process, there is no need to obtain the software source required by the target cluster online through a network connection, which can relieve the dependence of the cluster deployment on the external network environment. , so that the binary package of the software source can be obtained when the network environment is limited.

在一种可选的实施方式中,所述子资源区包括镜像源区,所述镜像源区用于为目标集群的部署提供所需的镜像,示例性地,所述镜像源区为Harbor镜像仓库,需要说明的是,上述示例只是为了使本领域技术人员更好的对本申请提出的方案进行理解而给出的一种可选的情况,具体的镜像源区可根据实际情况确定,本申请在此不作限制。In an optional implementation manner, the sub-resource area includes an image source area, and the image source area is used to provide the required image for the deployment of the target cluster. Exemplarily, the image source area is a Harbor image Warehouse. It should be noted that the above example is only an optional situation for those skilled in the art to better understand the solution proposed in this application. The specific image source area can be determined according to the actual situation. This application No limitation is imposed here.

图6示出了一种镜像源区部署示意图,如图6所示,所述对于镜像源区的部署按照如下步骤进行:对所述第一部署信息进行解析,获取镜像源部署信息;基于所述镜像源部署信息,部署主镜像源,所述主镜像源包含集群部署所需的镜像。具体而言,首先获取资源区的镜像源的离线安装包,安装所述镜像源;随后推送所述集群部署所需的镜像;最后配置LDAP(LightweightDirectory Access Protocol,轻型目录访问协议)账户服务,完成对于主镜像源的配置。在完成对于主镜像源的配置之后,基于所述主镜像源,同步部署备镜像源,具体而言,首先获取资源区的镜像源的离线安装包,安装所述镜像源;随后配置LDAP账户服务,完成对于备镜像源的配置。Fig. 6 shows a schematic diagram of deploying a mirror image source area. As shown in Fig. 6, the deployment of the mirror image source area is carried out according to the following steps: parsing the first deployment information to obtain mirror image source deployment information; The above image source deployment information is used to deploy the primary image source, and the primary image source contains the image required for cluster deployment. Specifically, first obtain the offline installation package of the image source in the resource area, install the image source; then push the image required for the cluster deployment; finally configure the LDAP (Lightweight Directory Access Protocol, Lightweight Directory Access Protocol) account service, and complete For the configuration of the main image source. After completing the configuration of the primary image source, based on the primary image source, synchronously deploy the standby image source, specifically, first obtain the offline installation package of the image source in the resource area, and install the image source; then configure the LDAP account service to complete the configuration of the backup image source.

在一种可选的实施方式中,所述子资源区包括域名解析区,所述域名解析区用于为集群提供域名服务,以标识不同的集群。示例性地,所述域名解析区为DNS(DomainNameSystem,域名系统),需要说明的是,上述示例只是为了使本领域技术人员更好的对本申请提出的方案进行理解而给出的一种可选的情况,具体的域名解析区可根据实际情况确定,本申请在此不作限制。In an optional implementation manner, the sub-resource area includes a domain name resolution area, and the domain name resolution area is used to provide domain name services for clusters to identify different clusters. Exemplarily, the domain name resolution zone is DNS (DomainNameSystem, domain name system). It should be noted that the above example is only an optional one for those skilled in the art to better understand the solution proposed in this application. The specific domain name resolution area can be determined according to the actual situation, and this application does not limit it here.

对所述域名解析区的部署,按照如下步骤进行:对所述第一部署信息进行解析,获取域名解析部署信息;基于所述域名解析部署信息,生成集群域名,所述集群域名用于标识不同的集群。如图2所示,所述资源区与所述集群之间为一对多的关系,因此,为了区分不同的集群,需要对不同集群提供不同的域名,防止在将资源区的部署依赖资源传输给不同集群时出现传输错误。The deployment of the domain name resolution area is performed according to the following steps: parsing the first deployment information to obtain domain name resolution deployment information; based on the domain name resolution deployment information, a cluster domain name is generated, and the cluster domain name is used to identify different of clusters. As shown in Figure 2, the relationship between the resource area and the cluster is one-to-many. Therefore, in order to distinguish different clusters, it is necessary to provide different domain names for different clusters to prevent the deployment of the resource area from relying on resource transmission. A transfer error occurred when sending to a different cluster.

在一种可选的实施方式中,所述子资源区还包括时间同步源区,所述事件同步源区用于为集群提供时间同步服务。示例性地,所述时间同步源区为NTP(NetworkTimeProtocol,网络时间协议),需要说明的是,上述示例只是为了使本领域技术人员更好的对本申请提出的方案进行理解而给出的一种可选的情况,具体的时间同步源区可根据实际情况确定,本申请在此不作限制。In an optional implementation manner, the sub-resource area further includes a time synchronization source area, and the event synchronization source area is used to provide time synchronization services for the cluster. Exemplarily, the time synchronization source area is NTP (NetworkTimeProtocol, Network Time Protocol). It should be noted that the above example is only given to enable those skilled in the art to better understand the solution proposed in this application. Optionally, the specific time synchronization source area may be determined according to actual conditions, which is not limited in this application.

对所述时间同步源区的部署,按照如下步骤进行:对所述第一部署信息进行解析,获取时间同步源部署信息;基于所述时间同步源部署信息,确定时间同步源头,作为所述时间同步源,所述时间同步源用于提供集群的时间同步服务。The deployment of the time synchronization source area is performed according to the following steps: parsing the first deployment information to obtain time synchronization source deployment information; based on the time synchronization source deployment information, determining a time synchronization source as the time A synchronization source, the time synchronization source is used to provide a time synchronization service of the cluster.

至此完成了对于资源区中多个不同子资源区的部署,部署完成的资源区可通过资源区的负载均衡节点将每个子资源中的部署依赖资源传输到目标集群中。需要说明的是,不同子资源区的部署没有顺序限制,例如,可以按照软件源区、镜像源区、域名解析区和时间同步源区的顺序进行部署,也可以按照其他顺序进行部署,所述对于不同子资源区的部署顺序可根据实际情况进行设置,本申请在此不作限制。So far, the deployment of multiple different sub-resource areas in the resource area is completed, and the deployed resource area can transfer the deployment-dependent resources in each sub-resource to the target cluster through the load balancing node in the resource area. It should be noted that there is no sequence restriction on the deployment of different sub-resource areas. For example, they can be deployed in the order of software source area, image source area, domain name resolution area, and time synchronization source area, or in other orders. The deployment sequence of different sub-resource areas can be set according to actual conditions, and this application does not make a limitation here.

具体实施步骤S103时,用户进入命令行工具的集群部署界面,在集群部署界面显示的集群部署模板中输入针对于集群部署的命令行信息;随后,根据用户输入的针对于集群部署的命令行信息生成对应的第二部署信息,所述第二部署信息用于指示对于集群的部署。需要说明的是,具体的命令行工具可采用现有的命令行工具(如cce-install工具等),所述命令行工具可根据实际情况而定,本申请在此不作限制。When step S103 is specifically implemented, the user enters the cluster deployment interface of the command line tool, and enters the command line information for cluster deployment in the cluster deployment template displayed on the cluster deployment interface; then, according to the command line information for cluster deployment input by the user Corresponding second deployment information is generated, where the second deployment information is used to indicate the deployment of the cluster. It should be noted that the specific command line tool can be an existing command line tool (such as cce-install tool, etc.), and the command line tool can be determined according to the actual situation, which is not limited in this application.

具体实施步骤S104时,首先部署目标集群的负载均衡节点,具体的目标集群的负载均衡节点的部署过程与上述资源区的负载均衡节点的部署过程类似,详情可参见上述S102的内容,本申请实施例在此不再重复描述。其中,所述目标集群的组件包括ETCD、集群控制节点(Master)以及工作节点(Node),具体而言,ETCD是一个分布式的、可靠的 key-value 存储系统,它用于存储分布式系统中的关键数据;集群控制节点(Master)负责整个目标集群的管理和控制;工作节点(Node)为目标集群中的工作节点,通常是一个虚拟机或者物理机,每个工作节点被集群控制节点管理。在目标集群的负载均衡节点的部署过程中,配置上述目标集群的组件的交互路径。When implementing step S104, first deploy the load balancing nodes of the target cluster. The specific deployment process of the load balancing nodes of the target cluster is similar to the deployment process of the load balancing nodes in the above resource area. For details, please refer to the content of the above S102. This application implements The example will not be repeated here. Wherein, the components of the target cluster include ETCD, the cluster control node (Master) and the working node (Node). Specifically, ETCD is a distributed and reliable key-value storage system, which is used to store distributed system The key data in the cluster; the cluster control node (Master) is responsible for the management and control of the entire target cluster; the working node (Node) is the working node in the target cluster, usually a virtual machine or a physical machine, and each working node is controlled by the cluster control node manage. During the deployment process of the load balancing node of the target cluster, the interaction paths of the above components of the target cluster are configured.

在部署完成目标集群的负载均衡节点后,依次部署上述Kubernetes集群中的组件;随后通过目标集群的负载均衡节点与资源区的负载均衡节点的交互路径,从资源区中获取目标集群中每个组件所需的部署依赖资源;最后,基于所述目标集群所需的部署依赖资源,根据所述第二部署信息对所述目标集群进行部署。其中,整个集群部署所需的资源为部署好的资源区中获取的离线资源,集群部署过程无需用户参与目标集群部署细节,通过第二部署信息以及所述目标集群所需的部署依赖资源,自动完成对于目标集群的部署。因此,对于用户来说,屏蔽了集群部署的详细流程,只需要在集群部署界面输入模板中的所需的部署信息,即可完成集群部署,降低了用户进行集群部署的学习成本,提升了用户的部署体验。After the load balancing node of the target cluster is deployed, the components in the above Kubernetes cluster are deployed in sequence; then, through the interaction path between the load balancing node of the target cluster and the load balancing node of the resource zone, each component in the target cluster is obtained from the resource zone The required deployment dependent resources; finally, based on the required deployment dependent resources of the target cluster, deploy the target cluster according to the second deployment information. The resources required for the entire cluster deployment are offline resources obtained in the deployed resource area. The cluster deployment process does not require the user to participate in the details of the target cluster deployment. Through the second deployment information and the deployment dependent resources required by the target cluster, automatic Complete the deployment to the target cluster. Therefore, for users, the detailed process of cluster deployment is shielded, and the cluster deployment can be completed only by entering the required deployment information in the template on the cluster deployment interface, which reduces the learning cost for users to deploy clusters and improves the user experience. deployment experience.

在一种可选的实施方式中,在完成对于目标集群的部署之后,需要检测资源区部署以及集群部署过程中是否存在错误,并及时报错保证集群部署的成功率和效率。因此,在根据所述第二部署信息对所述目标集群进行部署之后,检测目标组件的部署结果,所述目标组件为所述资源区中每个子资源区以及所有集群中每个组件,具体而言,所述资源区的子资源区为以下至少一项:软件源区、镜像源区、域名解析区以及时间同步源区;所述目标集群部署的组件为以下至少一项:ETCD、集群控制节点(Master)以及工作节点(Node)。In an optional implementation manner, after the deployment of the target cluster is completed, it is necessary to detect whether there is an error in the resource zone deployment and the cluster deployment process, and report the error in time to ensure the success rate and efficiency of the cluster deployment. Therefore, after the target cluster is deployed according to the second deployment information, the deployment result of the target component is detected, and the target component is each sub-resource area in the resource area and each component in all clusters, specifically In other words, the sub-resource area of the resource area is at least one of the following: software source area, mirror image source area, domain name resolution area, and time synchronization source area; the components deployed by the target cluster are at least one of the following: ETCD, cluster control Node (Master) and working node (Node).

在所述目标组件的部署结果为部署成功时,在所述集群部署界面显示部署成功信息,结束集群部署,并触发集群自动测试功能,保证所述集群基本功能可用。When the deployment result of the target component is successful deployment, the deployment success information is displayed on the cluster deployment interface, the cluster deployment ends, and the cluster automatic test function is triggered to ensure that the basic functions of the cluster are available.

在所述目标组件的部署结果为部署失败时,需要对用户显示部署失败信息,所述部署失败信息用于用户及时查错、更新信息并重新进行集群部署。具体而言,在所述目标组件的部署结果为部署失败时,在所述集群部署界面显示部署失败信息,所述部署失败信息包括以下至少一项:目标组件信息以及用户输入的错误部署信息。其中,所述目标组件信息用于显示所述目标组件在本次失败的集群部署过程中的部署过程信息,所述错误部署信息为用户输入的第一部署信息和/或第二部署信息中存在错误的部署信息,用于用户及时确定其中的问题并进行更新。随后,响应于用户输入的更新部署信息,对所述目标组件进行回滚,还原所述目标组件的状态至部署前;然后,基于所述更新部署信息,对所述目标组件进行重新部署。When the deployment result of the target component is a deployment failure, the deployment failure information needs to be displayed to the user, and the deployment failure information is used for the user to check errors in time, update information and perform cluster deployment again. Specifically, when the deployment result of the target component is a deployment failure, the deployment failure information is displayed on the cluster deployment interface, and the deployment failure information includes at least one of the following: target component information and wrong deployment information input by the user. Wherein, the target component information is used to display the deployment process information of the target component in this failed cluster deployment process, and the wrong deployment information is the first deployment information and/or the second deployment information input by the user. Wrong deployment information is used for users to identify problems and update them in time. Subsequently, in response to the updated deployment information input by the user, the target component is rolled back, and the state of the target component is restored to the state before deployment; then, based on the updated deployment information, the target component is redeployed.

本申请实施例提供了一种集群部署方法,包括:获取第一部署信息,所述第一部署信息为用户在集群部署界面输入的针对资源区部署的命令行信息;根据所述第一部署信息,对资源区中所有可用的离线部署依赖资源进行部署;获取第二部署信息,根据所述第二部署信息从所述资源区中获取目标集群所需的部署依赖资源,所述第二部署信息为用户在所述集群部署界面输入的针对集群部署的命令行信息;基于所述目标集群所需的部署依赖资源,根据所述第二部署信息对所述目标集群进行部署。本申请实施例通过用户输入的命令行信息,调用已获取的资源区的离线资源,消除了集群部署过程中对于在线资源的依赖;同时屏蔽集群部署的细节,用户只需在集群部署界面填写命令行信息即可实现集群部署,降低了用户对于集群部署的学习成本,从而快速且高效的完成一个可用Kubernetes集群的部署。An embodiment of the present application provides a cluster deployment method, including: obtaining first deployment information, the first deployment information is the command line information for resource area deployment input by the user on the cluster deployment interface; according to the first deployment information , deploy all available offline deployment dependent resources in the resource area; obtain second deployment information, obtain the deployment dependent resources required by the target cluster from the resource area according to the second deployment information, and obtain the second deployment information Command line information for cluster deployment input by a user on the cluster deployment interface; deploying the target cluster based on the deployment dependent resources required by the target cluster according to the second deployment information. The embodiment of this application uses the command line information input by the user to call the obtained offline resources in the resource area, eliminating the dependence on online resources during the cluster deployment process; at the same time shielding the details of the cluster deployment, the user only needs to fill in the command on the cluster deployment interface Cluster deployment can be realized by running information, which reduces the user's learning cost for cluster deployment, so as to quickly and efficiently complete the deployment of an available Kubernetes cluster.

基于同一发明构思,本申请实施例公开一种集群部署装置,图7示出了一种集群部署装置示意图,如图7所示,包括:Based on the same inventive concept, the embodiment of the present application discloses a cluster deployment device. Figure 7 shows a schematic diagram of a cluster deployment device, as shown in Figure 7, including:

第一部署信息获取模块,用于获取第一部署信息,所述第一部署信息为用户在集群部署界面输入的针对资源区部署的命令行信息;A first deployment information acquisition module, configured to acquire first deployment information, where the first deployment information is command line information for resource zone deployment input by a user on the cluster deployment interface;

资源部署模块,用于根据所述第一部署信息,对资源区中所有可用的离线部署依赖资源进行部署;A resource deployment module, configured to deploy all available offline deployment dependent resources in the resource area according to the first deployment information;

第二部署信息获取模块,用于获取第二部署信息,根据所述第二部署信息从所述资源区中获取目标集群所需的部署依赖资源,所述第二部署信息为用户在所述集群部署界面输入的针对集群部署的命令行信息;The second deployment information acquisition module is configured to acquire second deployment information, and acquire the deployment dependent resources required by the target cluster from the resource area according to the second deployment information, the second deployment information is the user's deployment in the cluster Command line information for cluster deployment entered on the deployment interface;

集群部署模块,用于基于所述目标集群所需的部署依赖资源,根据所述第二部署信息对所述目标集群进行部署。A cluster deployment module, configured to deploy the target cluster according to the second deployment information based on the deployment dependent resources required by the target cluster.

在一种可选的实施方式中,所述资源部署模块,包括:In an optional implementation manner, the resource deployment module includes:

第一信息解析子模块,用于对所述第一部署信息进行解析,获取负载均衡部署信息;The first information parsing submodule is configured to parse the first deployment information to obtain load balancing deployment information;

节点组件配置子模块,用于基于所述负载均衡部署信息,配置负载均衡节点组件,所述负载均衡节点组件用于支持所述资源区的负载均衡节点的运行;A node component configuration submodule, configured to configure a load balancing node component based on the load balancing deployment information, and the load balancing node component is used to support the operation of the load balancing node in the resource zone;

交互路径建立子模块,用于配置所述资源区的负载均衡节点针对于多个子资源区的交互路径;An interaction path establishment submodule, configured to configure the interaction path of the load balancing node in the resource area for multiple sub-resource areas;

子资源部署子模块,用于根据所述第一部署信息,对所述多个子资源区中的离线部署依赖资源进行部署,所述离线部署依赖资源包括以下至少一项:软件源、镜像源、集群域名以及时间同步源。The sub-resource deployment submodule is configured to deploy the offline deployment dependent resources in the plurality of sub-resource areas according to the first deployment information, and the offline deployment dependent resources include at least one of the following: software source, image source, Cluster domain name and time synchronization source.

在一种可选的实施方式中,所述子资源部署子模块,包括:In an optional implementation manner, the sub-resource deployment sub-module includes:

第二信息解析子单元,用于对所述第一部署信息进行解析,获取软件源部署信息;The second information parsing subunit is configured to parse the first deployment information to obtain software source deployment information;

软件源配置子单元,用于基于所述软件源部署信息,配置所述软件源的操作系统路径,所述软件源为二进制包,所述软件源的格式为与所述操作系统对应的可用格式;The software source configuration subunit is configured to configure the operating system path of the software source based on the software source deployment information, the software source is a binary package, and the format of the software source is an available format corresponding to the operating system ;

软件源解压子单元,用于按照所述操作系统路径,对所述软件源进行解压。The software source decompression subunit is configured to decompress the software source according to the operating system path.

在一种可选的实施方式中,所述子资源部署子模块,包括:In an optional implementation manner, the sub-resource deployment sub-module includes:

第三信息解析子单元,用于对所述第一部署信息进行解析,获取镜像源部署信息;The third information parsing subunit is configured to parse the first deployment information to acquire mirror source deployment information;

主镜像源部署子单元,用于基于所述镜像源部署信息,部署主镜像源,所述主镜像源包含集群部署所需的镜像;The primary image source deployment subunit is configured to deploy a primary image source based on the image source deployment information, and the primary image source contains images required for cluster deployment;

倍镜像源部署子单元,用于基于所述主镜像源,同步部署备镜像源。The double image source deployment subunit is configured to synchronously deploy the standby image source based on the primary image source.

在一种可选的实施方式中,所述子资源部署子模块,包括:In an optional implementation manner, the sub-resource deployment sub-module includes:

第四信息解析子单元,用于对所述第一部署信息进行解析,获取域名解析部署信息;The fourth information parsing subunit is configured to parse the first deployment information to obtain domain name resolution deployment information;

域名生成子单元,用于基于所述域名解析部署信息,生成集群域名,所述集群域名用于标识不同的集群;A domain name generating subunit, configured to resolve deployment information based on the domain name and generate a cluster domain name, where the cluster domain name is used to identify different clusters;

在一种可选的实施方式中,所述子资源部署子模块,还包括:In an optional implementation manner, the sub-resource deployment submodule further includes:

第五信息解析子单元,用于对所述第一部署信息进行解析,获取时间同步源部署信息;The fifth information parsing subunit is configured to parse the first deployment information to obtain time synchronization source deployment information;

时间同步子单元,用于基于所述时间同步源部署信息,生成所述时间同步源,所述时间同步源用于提供集群的时间同步服务。The time synchronization subunit is configured to generate the time synchronization source based on the time synchronization source deployment information, and the time synchronization source is used to provide a time synchronization service of the cluster.

在一种可选的实施方式中,所述装置,还包括:In an optional embodiment, the device further includes:

检测模块,用于检测目标组件的部署结果,所述目标组件为所述资源区中每个子资源区以及所有集群中每个组件;A detection module, configured to detect the deployment result of the target component, where the target component is each sub-resource area in the resource area and each component in all clusters;

失败信息显示模块,用于在所述目标组件的部署结果为部署失败时,在所述集群部署界面显示部署失败信息,所述部署失败信息包括以下至少一项:目标组件信息以及用户输入的错误部署信息;A failure information display module, configured to display deployment failure information on the cluster deployment interface when the deployment result of the target component is a deployment failure, and the deployment failure information includes at least one of the following: target component information and user input errors deployment information;

回滚模块,用于响应于用户输入的更新部署信息,对所述目标组件进行回滚;A rollback module, configured to roll back the target component in response to the updated deployment information input by the user;

重新部署模块,用于基于所述更新部署信息,对所述目标组件进行重新部署。A redeployment module, configured to redeploy the target component based on the updated deployment information.

基于同一发明构思,本申请实施例公开了一种电子设备,图8示出了本申请实施例公开的电子设备示意图,如图8所示,电子设备100包括:存储器110和处理器120,存储器110与处理器120之间通过总线通信连接,存储器110中存储有计算机程序,该计算机程序可在处理器120上运行,以实现本申请实施例公开的集群部署方法中的步骤。Based on the same inventive concept, the embodiment of the present application discloses an electronic device. FIG. 8 shows a schematic diagram of the electronic device disclosed in the embodiment of the present application. As shown in FIG. 8 , the electronic device 100 includes: a memory 110 and a processor 120, the memory The memory 110 is connected to the processor 120 through a bus communication, and a computer program is stored in the memory 110, and the computer program can run on the processor 120 to implement the steps in the cluster deployment method disclosed in the embodiment of the present application.

基于同一发明构思,本申请实施例公开了一种计算机可读存储介质,其上存储有计算机程序/指令,该计算机程序/指令被处理器执行时实现本申请实施例公开的集群部署方法中的步骤。Based on the same inventive concept, the embodiment of this application discloses a computer-readable storage medium, on which computer programs/instructions are stored, and when the computer program/instructions are executed by a processor, the cluster deployment method disclosed in the embodiment of the application is implemented. step.

基于同一发明构思,本申请还提供了一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现本申请实施例公开的集群部署方法中的步骤。Based on the same inventive concept, the present application also provides a computer program product, including computer programs/instructions, when the computer program/instructions are executed by a processor, the steps in the cluster deployment method disclosed in the embodiments of the present application are implemented.

本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other.

本发明实施例是参照根据本发明实施例的方法、装置、电子设备和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the present invention are described with reference to flowcharts and/or block diagrams of methods, apparatuses, electronic devices, and computer program products according to embodiments of the present invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and combinations of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor or processor of other programmable data processing terminal equipment to produce a machine such that instructions executed by the computer or processor of other programmable data processing terminal equipment Produce means for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the The instruction means implements the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded into a computer or other programmable data processing terminal equipment, so that a series of operational steps are performed on the computer or other programmable terminal equipment to produce computer-implemented processing, thereby The instructions executed above provide steps for implementing the functions specified in the procedure or procedures of the flowchart and/or the block or blocks of the block diagram.

尽管已描述了本发明实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明实施例范围的所有变更和修改。Having described preferred embodiments of embodiments of the present invention, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, the appended claims are intended to be construed to cover the preferred embodiment and all changes and modifications which fall within the scope of the embodiments of the present invention.

最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。Finally, it should also be noted that in this text, relational terms such as first and second etc. are only used to distinguish one entity or operation from another, and do not necessarily require or imply that these entities or operations, any such actual relationship or order exists. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or terminal equipment comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements identified, or also include elements inherent in such a process, method, article, or end-equipment. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising said element.

以上对本发明所提供的一种集群部署方法、装置、设备、介质及产品,进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A cluster deployment method, device, equipment, medium, and product provided by the present invention have been introduced in detail above. In this paper, specific examples are used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only used To help understand the method of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. In summary, this specification The content should not be construed as a limitation of the invention.

Claims (14)

1.一种集群部署方法,其特征在于,包括:1. A cluster deployment method, characterized in that, comprising: 获取第一部署信息,所述第一部署信息为用户在集群部署界面输入的针对资源区部署的命令行信息;Obtaining first deployment information, where the first deployment information is command line information for resource zone deployment input by a user on the cluster deployment interface; 根据所述第一部署信息,对资源区中所有可用的离线部署依赖资源进行部署;Deploy all available offline deployment dependent resources in the resource area according to the first deployment information; 获取第二部署信息,根据所述第二部署信息从所述资源区中获取目标集群所需的部署依赖资源,所述第二部署信息为用户在所述集群部署界面输入的针对集群部署的命令行信息;Obtain second deployment information, and obtain the deployment dependent resources required by the target cluster from the resource area according to the second deployment information, where the second deployment information is a command for cluster deployment input by the user on the cluster deployment interface line information; 基于所述目标集群所需的部署依赖资源,根据所述第二部署信息对所述目标集群进行部署。Deploy the target cluster according to the second deployment information based on the deployment dependent resources required by the target cluster. 2.根据权利要求1所述的集群部署方法,其特征在于,所述资源区包括负载均衡节点,根据所述第一部署信息,对资源区中所有可用的离线部署依赖资源进行部署,包括:2. The cluster deployment method according to claim 1, wherein the resource area includes load balancing nodes, and according to the first deployment information, deploying all available offline deployment dependent resources in the resource area includes: 对所述第一部署信息进行解析,获取负载均衡部署信息;Analyzing the first deployment information to obtain load balancing deployment information; 基于所述负载均衡部署信息,配置负载均衡节点组件,所述负载均衡节点组件用于支持所述资源区的负载均衡节点的运行;Based on the load balancing deployment information, configuring a load balancing node component, the load balancing node component is used to support the operation of the load balancing node in the resource area; 配置所述资源区的负载均衡节点针对于多个子资源区的交互路径;configuring the interaction paths of the load balancing nodes in the resource zone for multiple sub-resource zones; 根据所述第一部署信息,对所述多个子资源区中的离线部署依赖资源进行部署,所述离线部署依赖资源包括以下至少一项:软件源、镜像源、集群域名以及时间同步源。According to the first deployment information, the offline deployment dependent resources in the plurality of sub-resource areas are deployed, and the offline deployment dependent resources include at least one of the following: a software source, a mirror image source, a cluster domain name, and a time synchronization source. 3.根据权利要求2所述的集群部署方法,其特征在于,所述子资源区包括软件源区,根据所述第一部署信息,对所述软件源区进行部署,包括:3. The cluster deployment method according to claim 2, wherein the sub-resource area includes a software source area, and deploying the software source area according to the first deployment information includes: 对所述第一部署信息进行解析,获取软件源部署信息;Analyzing the first deployment information to obtain software source deployment information; 基于所述软件源部署信息,配置所述软件源的操作系统路径,所述软件源为二进制包,所述软件源的格式为与所述操作系统对应的可用格式;Based on the software source deployment information, configure the operating system path of the software source, the software source is a binary package, and the format of the software source is an available format corresponding to the operating system; 按照所述操作系统路径,对所述软件源进行解压。According to the operating system path, the software source is decompressed. 4.根据权利要求2所述的集群部署方法,其特征在于,所述子资源区包括镜像源区,根据所述第一部署信息,对所述镜像源区进行部署,包括:4. The cluster deployment method according to claim 2, wherein the sub-resource area includes a mirror image source area, and deploying the mirror image source area according to the first deployment information includes: 对所述第一部署信息进行解析,获取镜像源部署信息;Analyzing the first deployment information to obtain mirror source deployment information; 基于所述镜像源部署信息,部署主镜像源,所述主镜像源包含集群部署所需的镜像;Deploying a primary image source based on the image source deployment information, where the primary image source contains images required for cluster deployment; 基于所述主镜像源,同步部署备镜像源。Based on the primary image source, the standby image source is deployed synchronously. 5.根据权利要求2所述的集群部署方法,其特征在于,所述子资源区包括域名解析区以及时间同步源区,根据所述第一部署信息,对所述域名解析区进行部署,包括:5. The cluster deployment method according to claim 2, wherein the sub-resource area includes a domain name resolution area and a time synchronization source area, and deploying the domain name resolution area according to the first deployment information includes : 对所述第一部署信息进行解析,获取域名解析部署信息;Analyzing the first deployment information to obtain domain name resolution deployment information; 基于所述域名解析部署信息,生成集群域名,所述集群域名用于标识不同的集群;Based on the domain name analysis deployment information, a cluster domain name is generated, and the cluster domain name is used to identify different clusters; 根据所述第一部署信息,对所述时间同步源区进行部署,包括:According to the first deployment information, deploying the time synchronization source zone includes: 对所述第一部署信息进行解析,获取时间同步源部署信息;Analyzing the first deployment information to obtain time synchronization source deployment information; 基于所述时间同步源部署信息,生成所述时间同步源,所述时间同步源用于提供集群的时间同步服务。The time synchronization source is generated based on the time synchronization source deployment information, and the time synchronization source is used to provide a time synchronization service of the cluster. 6.根据权利要求1-5任意一项所述的集群部署方法,其特征在于,在根据所述第二部署信息对所述目标集群进行部署之后,所述方法还包括:6. The cluster deployment method according to any one of claims 1-5, wherein after deploying the target cluster according to the second deployment information, the method further comprises: 检测目标组件的部署结果,所述目标组件为所述资源区中每个子资源区以及所有集群中每个组件;Detecting the deployment result of the target component, where the target component is each sub-resource area in the resource area and each component in all clusters; 在所述目标组件的部署结果为部署失败时,在所述集群部署界面显示部署失败信息,所述部署失败信息包括以下至少一项:目标组件信息以及用户输入的错误部署信息;When the deployment result of the target component is a deployment failure, displaying deployment failure information on the cluster deployment interface, the deployment failure information includes at least one of the following: target component information and wrong deployment information input by the user; 响应于用户输入的更新部署信息,对所述目标组件进行回滚;Rolling back the target component in response to the updated deployment information input by the user; 基于所述更新部署信息,对所述目标组件进行重新部署。Redeploy the target component based on the updated deployment information. 7.一种集群部署装置,其特征在于,包括:7. A cluster deployment device, comprising: 第一部署信息获取模块,用于获取第一部署信息,所述第一部署信息为用户在集群部署界面输入的针对资源区部署的命令行信息;A first deployment information acquisition module, configured to acquire first deployment information, where the first deployment information is command line information for resource zone deployment input by a user on the cluster deployment interface; 资源部署模块,用于根据所述第一部署信息,对资源区中所有可用的离线部署依赖资源进行部署;A resource deployment module, configured to deploy all available offline deployment dependent resources in the resource area according to the first deployment information; 第二部署信息获取模块,用于获取第二部署信息,根据所述第二部署信息从所述资源区中获取目标集群所需的部署依赖资源,所述第二部署信息为用户在所述集群部署界面输入的针对集群部署的命令行信息;The second deployment information acquisition module is configured to acquire second deployment information, and acquire the deployment dependent resources required by the target cluster from the resource area according to the second deployment information, the second deployment information is the user's deployment in the cluster Command line information for cluster deployment entered on the deployment interface; 集群部署模块,用于基于所述目标集群所需的部署依赖资源,根据所述第二部署信息对所述目标集群进行部署。A cluster deployment module, configured to deploy the target cluster according to the second deployment information based on the deployment dependent resources required by the target cluster. 8.根据权利要求7所述的集群部署装置,其特征在于,所述资源部署模块,包括:8. The cluster deployment device according to claim 7, wherein the resource deployment module includes: 第一信息解析子模块,用于对所述第一部署信息进行解析,获取负载均衡部署信息;The first information parsing submodule is configured to parse the first deployment information to obtain load balancing deployment information; 节点组件配置子模块,用于基于所述负载均衡部署信息,配置负载均衡节点组件,所述负载均衡节点组件用于支持所述资源区的负载均衡节点的运行;A node component configuration submodule, configured to configure a load balancing node component based on the load balancing deployment information, and the load balancing node component is used to support the operation of the load balancing node in the resource area; 交互路径建立子模块,用于配置所述资源区的负载均衡节点针对于多个子资源区的交互路径;An interaction path establishment submodule, configured to configure the interaction path of the load balancing node in the resource area for multiple sub-resource areas; 子资源部署子模块,用于根据所述第一部署信息,对所述多个子资源区中的离线部署依赖资源进行部署,所述离线部署依赖资源包括以下至少一项:软件源、镜像源、集群域名以及时间同步源。The sub-resource deployment submodule is configured to deploy the offline deployment dependent resources in the plurality of sub-resource areas according to the first deployment information, and the offline deployment dependent resources include at least one of the following: software source, image source, Cluster domain name and time synchronization source. 9.根据权利要求8所述的集群部署装置,其特征在于,所述子资源部署子模块,包括:9. The cluster deployment device according to claim 8, wherein the sub-resource deployment submodule includes: 第二信息解析子单元,用于对所述第一部署信息进行解析,获取软件源部署信息;The second information parsing subunit is configured to parse the first deployment information to obtain software source deployment information; 软件源配置子单元,用于基于所述软件源部署信息,配置所述软件源的操作系统路径,所述软件源为二进制包,所述软件源的格式为与所述操作系统对应的可用格式;The software source configuration subunit is configured to configure the operating system path of the software source based on the software source deployment information, the software source is a binary package, and the format of the software source is an available format corresponding to the operating system ; 软件源解压子单元,用于按照所述操作系统路径,对所述软件源进行解压。The software source decompression subunit is configured to decompress the software source according to the operating system path. 10.根据权利要求8所述的集群部署装置,其特征在于,所述子资源部署子模块,包括:10. The cluster deployment device according to claim 8, wherein the sub-resource deployment submodule includes: 第三信息解析子单元,用于对所述第一部署信息进行解析,获取镜像源部署信息;The third information parsing subunit is configured to parse the first deployment information to acquire mirror source deployment information; 主镜像源部署子单元,用于基于所述镜像源部署信息,部署主镜像源,所述主镜像源包含集群部署所需的镜像;The primary image source deployment subunit is configured to deploy a primary image source based on the image source deployment information, and the primary image source contains images required for cluster deployment; 备镜像源部署子单元,用于基于所述主镜像源,同步部署备镜像源。The standby image source deployment subunit is configured to synchronously deploy the standby image source based on the primary image source. 11.根据权利要求8所述的集群部署装置,其特征在于,所述子资源部署子模块,包括:11. The cluster deployment device according to claim 8, wherein the sub-resource deployment submodule includes: 第四信息解析子单元,用于对所述第一部署信息进行解析,获取域名解析部署信息;The fourth information parsing subunit is configured to parse the first deployment information to obtain domain name resolution deployment information; 域名生成子单元,用于基于所述域名解析部署信息,生成集群域名,所述集群域名用于标识不同的集群;A domain name generating subunit, configured to resolve deployment information based on the domain name and generate a cluster domain name, where the cluster domain name is used to identify different clusters; 所述子资源部署子模块,还包括:The sub-resource deployment sub-module also includes: 第五信息解析子单元,用于对所述第一部署信息进行解析,获取时间同步源部署信息;The fifth information parsing subunit is configured to parse the first deployment information to obtain time synchronization source deployment information; 时间同步子单元,用于基于所述时间同步源部署信息,生成所述时间同步源,所述时间同步源用于提供集群的时间同步服务。The time synchronization subunit is configured to generate the time synchronization source based on the time synchronization source deployment information, and the time synchronization source is used to provide a time synchronization service of the cluster. 12.根据权利要求7-11任意一项所述的集群部署装置,其特征在于,包括:12. The cluster deployment device according to any one of claims 7-11, comprising: 检测模块,用于检测目标组件的部署结果,所述目标组件为所述资源区中每个子资源区以及所有集群中每个组件;A detection module, configured to detect the deployment result of the target component, where the target component is each sub-resource area in the resource area and each component in all clusters; 失败信息显示模块,用于在所述目标组件的部署结果为部署失败时,在所述集群部署界面显示部署失败信息,所述部署失败信息包括以下至少一项:目标组件信息以及用户输入的错误部署信息;A failure information display module, configured to display deployment failure information on the cluster deployment interface when the deployment result of the target component is a deployment failure, and the deployment failure information includes at least one of the following: target component information and user input errors deployment information; 回滚模块,用于响应于用户输入的更新部署信息,对所述目标组件进行回滚;A rollback module, configured to roll back the target component in response to the updated deployment information input by the user; 重新部署模块,用于基于所述更新部署信息,对所述目标组件进行重新部署。A redeployment module, configured to redeploy the target component based on the updated deployment information. 13.一种电子设备,其特征在于,包括存储器、处理器及存储在存储器上的计算机程序,所述处理器执行所述计算机程序以实现权利要求1-6中任一所述的一种集群部署方法中的步骤。13. An electronic device, characterized in that it comprises a memory, a processor, and a computer program stored on the memory, and the processor executes the computer program to realize a cluster according to any one of claims 1-6 Steps in the deployment method. 14.一种计算机可读存储介质,其上存储有计算机程序/指令,其特征在于,该计算机程序/指令被处理器执行时实现权利要求1-6中任一所述的一种集群部署方法中的步骤。14. A computer-readable storage medium, on which are stored computer programs/instructions, characterized in that, when the computer programs/instructions are executed by a processor, a cluster deployment method according to any one of claims 1-6 is implemented in the steps.
CN202310123251.8A 2023-02-16 2023-02-16 A cluster deployment method, device, equipment, medium and product Active CN115865924B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202310123251.8A CN115865924B (en) 2023-02-16 2023-02-16 A cluster deployment method, device, equipment, medium and product
PCT/CN2023/140006 WO2024169385A1 (en) 2023-02-16 2023-12-19 Cluster deployment method and apparatus, and device, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310123251.8A CN115865924B (en) 2023-02-16 2023-02-16 A cluster deployment method, device, equipment, medium and product

Publications (2)

Publication Number Publication Date
CN115865924A CN115865924A (en) 2023-03-28
CN115865924B true CN115865924B (en) 2023-04-21

Family

ID=85658197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310123251.8A Active CN115865924B (en) 2023-02-16 2023-02-16 A cluster deployment method, device, equipment, medium and product

Country Status (2)

Country Link
CN (1) CN115865924B (en)
WO (1) WO2024169385A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115865924B (en) * 2023-02-16 2023-04-21 天翼云科技有限公司 A cluster deployment method, device, equipment, medium and product

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110647394A (en) * 2018-06-27 2020-01-03 阿里巴巴集团控股有限公司 Resource allocation method, device and equipment
CN113645071A (en) * 2021-08-10 2021-11-12 广域铭岛数字科技有限公司 Cluster deployment method, system, medium and electronic terminal
CN113849266A (en) * 2021-08-19 2021-12-28 新浪网技术(中国)有限公司 Service deployment method and device for multiple Kubernetes clusters
CN114675927A (en) * 2020-12-25 2022-06-28 北京达佳互联信息技术有限公司 Service instance deployment method and device, electronic equipment and storage medium
CN114691153A (en) * 2022-03-30 2022-07-01 奇安信科技集团股份有限公司 Deployment method and device of Kubernetes cluster
CN115220874A (en) * 2022-09-05 2022-10-21 税友信息技术有限公司 Kubernetes cluster deployment method, device, equipment and storage medium
CN115421740A (en) * 2022-09-15 2022-12-02 京东科技信息技术有限公司 Deployment method and device of cloud native application
CN115686813A (en) * 2021-07-28 2023-02-03 腾讯科技(深圳)有限公司 Resource scheduling method and device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111736993A (en) * 2020-06-12 2020-10-02 苏州浪潮智能科技有限公司 Cluster high-availability service configuration method, system, terminal and storage medium
WO2022037612A1 (en) * 2020-08-20 2022-02-24 第四范式(北京)技术有限公司 Method for providing application construction service, and application construction platform, application deployment method and system
US11842214B2 (en) * 2021-03-31 2023-12-12 International Business Machines Corporation Full-dimensional scheduling and scaling for microservice applications
CN115134424B (en) * 2022-06-29 2024-02-02 中国工商银行股份有限公司 Load balancing method, load balancing device, computer equipment, storage medium and program product
CN115865924B (en) * 2023-02-16 2023-04-21 天翼云科技有限公司 A cluster deployment method, device, equipment, medium and product

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110647394A (en) * 2018-06-27 2020-01-03 阿里巴巴集团控股有限公司 Resource allocation method, device and equipment
CN114675927A (en) * 2020-12-25 2022-06-28 北京达佳互联信息技术有限公司 Service instance deployment method and device, electronic equipment and storage medium
CN115686813A (en) * 2021-07-28 2023-02-03 腾讯科技(深圳)有限公司 Resource scheduling method and device, electronic equipment and storage medium
CN113645071A (en) * 2021-08-10 2021-11-12 广域铭岛数字科技有限公司 Cluster deployment method, system, medium and electronic terminal
CN113849266A (en) * 2021-08-19 2021-12-28 新浪网技术(中国)有限公司 Service deployment method and device for multiple Kubernetes clusters
CN114691153A (en) * 2022-03-30 2022-07-01 奇安信科技集团股份有限公司 Deployment method and device of Kubernetes cluster
CN115220874A (en) * 2022-09-05 2022-10-21 税友信息技术有限公司 Kubernetes cluster deployment method, device, equipment and storage medium
CN115421740A (en) * 2022-09-15 2022-12-02 京东科技信息技术有限公司 Deployment method and device of cloud native application

Also Published As

Publication number Publication date
CN115865924A (en) 2023-03-28
WO2024169385A1 (en) 2024-08-22

Similar Documents

Publication Publication Date Title
CN110752947B (en) K8s cluster deployment method and device, and deployment platform
CN106790595B (en) Docker container active load balancing device and method
CN108196915B (en) Code processing method and device based on application container engine and storage medium
US8584081B2 (en) Server side application integration framework
CN110324174B (en) Block chain environment detection method, equipment, device and storage medium
CN113742031B (en) Node state information acquisition method and device, electronic equipment and readable storage medium
CN110138577B (en) Cluster creation method, first server and readable storage medium
CN102455936A (en) Rapid deployment method of cluster
CN106941420B (en) cluster application environment upgrading method and device
CN111338893A (en) Process log processing method and device, computer equipment and storage medium
US20170033980A1 (en) Agent manager for distributed transaction monitoring system
CN111770174A (en) Cloud platform deployment method, device, equipment and readable storage medium
KR102114339B1 (en) Method for operating kubernetes system supporting active/standby model
CN113312148B (en) Big data service deployment method, device, equipment and medium
CN113127009A (en) Automatic deployment method and device for big data management platform
CN111510480A (en) Request sending method and device and first server
CN115865924B (en) A cluster deployment method, device, equipment, medium and product
CN113590595A (en) Database multi-writing method and device and related equipment
CN113190371A (en) Task compensation method and device, electronic equipment and readable storage medium
CN105324968A (en) Method and apparatus for allocating reliability resource
CN112825525B (en) Method and apparatus for processing transactions
CN113419818B (en) Basic component deployment method, device, server and storage medium
JP5276625B2 (en) Update API detection system, update API detection device, update API detection method, and update API detection program
CN109327529B (en) Distributed scanning method and system
CN113434316A (en) Function integration method, device, equipment and storage medium based on redis plug-in

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
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: 100007 room 205-32, floor 2, building 2, No. 1 and No. 3, qinglonghutong a, Dongcheng District, Beijing

Patentee after: Tianyiyun Technology Co.,Ltd.

Address before: 100093 Floor 4, Block E, Xishan Yingfu Business Center, Haidian District, Beijing

Patentee before: Tianyiyun Technology Co.,Ltd.

CP02 Change in the address of a patent holder