[go: up one dir, main page]

CN114500268B - Deployment method, device, server and storage medium of chart resources - Google Patents

Deployment method, device, server and storage medium of chart resources Download PDF

Info

Publication number
CN114500268B
CN114500268B CN202210049979.6A CN202210049979A CN114500268B CN 114500268 B CN114500268 B CN 114500268B CN 202210049979 A CN202210049979 A CN 202210049979A CN 114500268 B CN114500268 B CN 114500268B
Authority
CN
China
Prior art keywords
resource
chart
target
verification
cluster
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.)
Expired - Fee Related
Application number
CN202210049979.6A
Other languages
Chinese (zh)
Other versions
CN114500268A (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.)
Sdic Vision Intelligent Technology Jiangsu Co ltd
Envision Digital International Pte Ltd
Original Assignee
Sdic Vision Intelligent Technology Jiangsu Co ltd
Envision Digital International Pte 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 Sdic Vision Intelligent Technology Jiangsu Co ltd, Envision Digital International Pte Ltd filed Critical Sdic Vision Intelligent Technology Jiangsu Co ltd
Priority to CN202210049979.6A priority Critical patent/CN114500268B/en
Publication of CN114500268A publication Critical patent/CN114500268A/en
Application granted granted Critical
Publication of CN114500268B publication Critical patent/CN114500268B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本申请实施例公开了一种chart资源的部署方法、装置、服务器及存储介质,涉及计算机技术领域。该方法包括:响应于接收到第一终端发送的校验指令,对目标chart资源进行资源权限校验,目标chart资源是由第一终端上传的chart资源,不同chart资源用于实现不同chart服务;响应于目标chart资源通过资源权限校验,将目标chart资源设置为可部署状态;响应于接收到对目标chart资源的部署指令,将目标chart资源部署至目标集群,目标集群包含至少一台待部署chart服务的第二终端。通过服务器自动执行资源权限校验以及自动部署操作,不仅缩短了审核周期,且提高了校验的准确率和部署效率。

The embodiment of the present application discloses a chart resource deployment method, device, server and storage medium, and relates to the field of computer technology. The method includes: in response to receiving a verification instruction sent by the first terminal, performing resource permission verification on the target chart resource, the target chart resource is a chart resource uploaded by the first terminal, and different chart resources are used to implement different chart services; in response to the target chart resource passing the resource permission verification, setting the target chart resource to a deployable state; in response to receiving a deployment instruction for the target chart resource, deploying the target chart resource to a target cluster, and the target cluster includes at least one second terminal to be deployed. The server automatically executes resource permission verification and automatic deployment operations, which not only shortens the review cycle, but also improves the accuracy of verification and deployment efficiency.

Description

chart资源的部署方法、装置、服务器及存储介质Deployment method, device, server and storage medium of chart resources

技术领域technical field

本申请实施例涉及计算机技术领域,特别涉及一种chart资源的部署方法、装置、服务器及存储介质。The embodiments of the present application relate to the field of computer technology, and in particular to a method, device, server, and storage medium for deploying chart resources.

背景技术Background technique

在Kubernetes集群中,运维人员通过使用Helm包管理器进行chart资源部署,以实现应用的更新和维护。In the Kubernetes cluster, the operation and maintenance personnel use the Helm package manager to deploy chart resources to implement application update and maintenance.

现有技术中,在进行应用更新和维护前,需要对chart资源进行人工校验,在人工校验通过后,再通过部署文档指示的操作步骤进行人工部署。In the prior art, before updating and maintaining the application, it is necessary to manually verify the chart resources. After the manual verification is passed, manual deployment is performed through the operation steps indicated in the deployment document.

发明内容Contents of the invention

本申请实施例提供了一种chart资源的部署方法、装置、服务器及存储介质。所述技术方案如下:Embodiments of the present application provide a chart resource deployment method, device, server, and storage medium. Described technical scheme is as follows:

一方面,本申请实施例提供了一种chart资源的部署方法,该方法用于集群系统中的服务器,所述方法包括:On the one hand, the embodiment of the present application provides a method for deploying chart resources, the method is used for servers in a cluster system, and the method includes:

响应于接收到第一终端发送的校验指令,对目标chart资源进行资源权限校验,所述目标chart资源是由所述第一终端上传的chart资源,且不同chart资源用于实现不同chart服务;In response to receiving the verification instruction sent by the first terminal, performing resource authority verification on the target chart resource, the target chart resource is a chart resource uploaded by the first terminal, and different chart resources are used to implement different chart services;

响应于所述目标chart资源通过资源权限校验,将所述目标chart资源设置为可部署状态;In response to the target chart resource passing the resource permission check, setting the target chart resource to a deployable state;

响应于接收到对所述目标chart资源的部署指令,将所述目标chart资源部署至目标集群,所述目标集群包含至少一台待部署chart服务的第二终端。In response to receiving a deployment instruction for the target chart resource, deploy the target chart resource to a target cluster, where the target cluster includes at least one second terminal of the chart service to be deployed.

另一方面,本申请实施例提供了一种chart资源的部署装置,所述装置用于集群系统中的服务器,所述装置包括:On the other hand, the embodiment of the present application provides a device for deploying chart resources, the device is used for servers in a cluster system, and the device includes:

校验模块,用于响应于接收到第一终端发送的校验指令,对目标chart资源进行资源权限校验,所述目标chart资源是由所述第一终端上传的chart资源,且不同chart资源用于实现不同chart服务;A verification module, configured to perform resource authority verification on a target chart resource in response to receiving a verification instruction sent by the first terminal, where the target chart resource is a chart resource uploaded by the first terminal, and different chart resources are used to implement different chart services;

设置模块,用于响应于所述目标chart资源通过资源权限校验,将所述目标chart资源设置为可部署状态;A setting module, configured to set the target chart resource to a deployable state in response to the target chart resource passing the resource permission check;

部署模块,用于响应于接收到对所述目标chart资源的部署指令,将所述目标chart资源部署至目标集群,所述目标集群包含至少一台待部署chart服务的第二终端。The deployment module is configured to, in response to receiving a deployment instruction for the target chart resource, deploy the target chart resource to a target cluster, and the target cluster includes at least one second terminal of the chart service to be deployed.

另一方面,本申请实施例提供了一种服务器,所述服务器包括处理器和存储器;所述存储器存储有至少一条指令,所述至少一条指令用于被所述处理器执行以实现上述方面所述的异构系统中的任务执行方法。On the other hand, an embodiment of the present application provides a server, the server includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the task execution method in the heterogeneous system described in the above aspect.

另一方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序由处理器加载并执行以实现上述方面所述的chart资源的部署方法。On the other hand, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the chart resource deployment method described in the above aspect.

另一方面,本申请实施例提供了一种计算机程序产品,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方面所述的chart资源的部署方法。On the other hand, an embodiment of the present application provides a computer program product, where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the chart resource deployment method described in the above aspects.

本申请实施例提供的技术方案带来的有益效果至少包括:The beneficial effects brought by the technical solutions provided by the embodiments of the present application at least include:

本申请实施例中,在目标chart资源校验阶段,服务器通过接收第一终端发送的校验指令自动对目标chart资源的资源文件进行资源权限校验,不再依赖人工审核,缩短了审核周期,且提高了资源权限校验的准确率;在目标chart资源的部署阶段,当服务器接收到部署指令后,同样由服务器自动执行部署操作,无需按照部署文档进行人工部署,在维护阶段,不仅降低了维护的成本投入,而且提高了部署效率。In the embodiment of the present application, in the target chart resource verification stage, the server automatically performs resource permission verification on the resource file of the target chart resource by receiving the verification command sent by the first terminal, no longer relying on manual review, shortening the review cycle, and improving the accuracy of resource permission verification; in the deployment stage of the target chart resource, when the server receives the deployment instruction, the server also performs the deployment operation automatically, without manual deployment according to the deployment document. In the maintenance stage, not only the maintenance cost investment is reduced, but also the deployment efficiency is improved.

附图说明Description of drawings

图1是本申请一个示例性实施例提供的集群系统的网络拓扑图;Fig. 1 is a network topology diagram of a cluster system provided by an exemplary embodiment of the present application;

图2是本申请一个示例性实施例提供的chart资源的部署方法的流程图;Fig. 2 is a flowchart of a deployment method of chart resources provided by an exemplary embodiment of the present application;

图3是本申请另一个示例性实施例示出的chart资源的部署方法的流程图;Fig. 3 is a flowchart of a deployment method of chart resources shown in another exemplary embodiment of the present application;

图4是本申请另一个示例性实施例示出的chart资源的部署方法的流程图;FIG. 4 is a flowchart of a method for deploying chart resources shown in another exemplary embodiment of the present application;

图5示出了本申请一个示例性实施例提供的chart资源管理界面的界面示意图;FIG. 5 shows a schematic interface diagram of a chart resource management interface provided by an exemplary embodiment of the present application;

图6示出了本申请一个示例性实施例提供的Chart资源管理界面的界面示意图;FIG. 6 shows a schematic interface diagram of a Chart resource management interface provided by an exemplary embodiment of the present application;

图7示出了本申请一个示例性实施例提供的Helm Chart管理界面的界面示意图;FIG. 7 shows a schematic interface diagram of the Helm Chart management interface provided by an exemplary embodiment of the present application;

图8是本申请一个示例性实施例提供的chart资源的部署装置的结构框图;Fig. 8 is a structural block diagram of a device for deploying chart resources provided by an exemplary embodiment of the present application;

图9示出了本申请一个示例性实施例提供的服务器的结构框图。Fig. 9 shows a structural block diagram of a server provided by an exemplary embodiment of the present application.

具体实施方式Detailed ways

为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the purpose, technical solution and advantages of the present application clearer, the implementation manners of the present application will be further described in detail below in conjunction with the accompanying drawings.

在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。The "plurality" mentioned herein means two or more. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently. The character "/" generally indicates that the contextual objects are an "or" relationship.

集群:集群(cluster)是一组相互独立的、通过高速网络互联的计算机,它们构成了一个组,并以单一系统的模式加以管理。一个客户与集群相互作用时,集群像是一个独立的服务器。集群配置是用于提高可用性和可缩放性。集群技术是一种较新的技术,通过集群技术,可以在付出较低成本的情况下获得在性能、可靠性、灵活性方面的相对较高的收益,其任务调度则是集群系统中的核心技术。Cluster: A cluster is a group of independent computers interconnected through a high-speed network. They form a group and are managed as a single system. When a client interacts with the cluster, the cluster behaves like a stand-alone server. Cluster configurations are used to improve availability and scalability. Cluster technology is a relatively new technology. Through cluster technology, relatively high benefits in terms of performance, reliability, and flexibility can be obtained at a low cost. Its task scheduling is the core technology in the cluster system.

Kubernetes:Kubernetes简称K8s,是用8代替8个字符“ubernete”而成的缩写。是一个开源的,用于管理云平台中多个主机上的容器化的应用,Kubernetes的目标是让部署容器化的应用简单并且高效,Kubernetes提供了应用部署、规划、更新和维护的一种机制。传统的应用部署方式是通过插件或脚本来安装应用。这样做的缺点是应用的运行、配置、管理、所有生存周期将与当前操作系统绑定,这样做并不利于应用的升级更新/回滚等操作,当然也可以通过创建虚拟机的方式来实现某些功能,但是虚拟机非常重,并不利于可移植性。新的方式是通过部署容器方式实现,每个容器之间互相隔离,每个容器有自己的文件系统,容器之间进程不会相互影响,能区分计算资源。相对于虚拟机,容器能快速部署,由于容器与底层设施、机器文件系统解耦的,所以它能在不同云、不同版本操作系统间进行迁移。容器占用资源少、部署快,每个应用可以被打包成一个容器镜像,每个应用与容器间成一对一关系也使容器有更大优势,使用容器可以在build或release的阶段,为应用创建容器镜像,因为每个应用不需要与其余的应用堆栈组合,也不依赖于生产环境基础结构,这使得从研发到测试、生产能提供一致环境。Kubernetes: Kubernetes is referred to as K8s, which is an abbreviation formed by replacing the 8 characters "ubernete" with 8. It is an open source, used to manage containerized applications on multiple hosts in the cloud platform. The goal of Kubernetes is to make deploying containerized applications simple and efficient. Kubernetes provides a mechanism for application deployment, planning, updating and maintenance. The traditional application deployment method is to install the application through plug-ins or scripts. The disadvantage of this is that the operation, configuration, management, and all life cycles of the application will be bound to the current operating system, which is not conducive to the application upgrade/rollback and other operations. Of course, some functions can also be realized by creating a virtual machine, but the virtual machine is very heavy, which is not conducive to portability. The new method is implemented by deploying containers. Each container is isolated from each other, and each container has its own file system. The processes between containers will not affect each other, and computing resources can be distinguished. Compared with virtual machines, containers can be quickly deployed. Because containers are decoupled from underlying facilities and machine file systems, they can be migrated between different clouds and operating systems of different versions. Containers occupy less resources and are faster to deploy. Each application can be packaged into a container image. The one-to-one relationship between each application and container also gives containers a greater advantage. Using containers can create container images for applications during the build or release phase, because each application does not need to be combined with the rest of the application stack and does not depend on the infrastructure of the production environment. This enables a consistent environment from R&D to testing and production.

Helm:Helm是Kubernetes的包管理器,也是一个基于命令行下的客户端工具。主要用于Kubernetes应用程序Chart的创建、打包、发布以及创建和管理本地和远程的Chart仓库。在本申请实施例中,在部署chart资源时,通过调用Helm包管理器进行chart资源的部署。Helm: Helm is a package manager for Kubernetes and a client tool based on the command line. It is mainly used for the creation, packaging, and release of the Kubernetes application Chart, as well as the creation and management of local and remote Chart warehouses. In the embodiment of this application, when deploying the chart resource, the chart resource is deployed by calling the Helm package manager.

相关技术中,开发人员或运维人员在通过Kubernetes集群开发和部署chart资源时,需要人工进行资源权限校验;而且,在chart资源的部署阶段,通常需要运维人员按照部署文档的操作指示手动执行,当操作步骤有误时,则需要重新进行检查,部署的效率不高。In related technologies, when developers or operation and maintenance personnel develop and deploy chart resources through Kubernetes clusters, they need to manually verify resource permissions; moreover, in the deployment stage of chart resources, operation and maintenance personnel usually need to manually execute according to the operation instructions of the deployment document. When the operation steps are wrong, they need to check again, and the deployment efficiency is not high.

本申请实施例中,当需要对上传的目标chart进行资源权限校验时,可以通过服务器自动进行校验,而无需人工审核,在部署阶段时,同样可以实现自动对chart资源进行前置校验和前置更新,不再依赖于部署文档进行人工审核,不仅可以节约人工成本,还可以提高校验和部署的效率。In the embodiment of this application, when it is necessary to verify the resource authority of the uploaded target chart, the verification can be performed automatically through the server without manual review. During the deployment phase, pre-verification and pre-update of the chart resources can also be automatically performed, and manual review is no longer dependent on the deployment document. This can not only save labor costs, but also improve the efficiency of verification and deployment.

图1示出了本申请一个实施例提供的集群系统的网络拓扑图。该网络拓扑图包括:第一终端110、服务器120和第二终端130。FIG. 1 shows a network topology diagram of a cluster system provided by an embodiment of the present application. The network topology diagram includes: a first terminal 110 , a server 120 and a second terminal 130 .

网络拓扑图中的第一终端110是诸如手机、台式电脑、平板电脑、多媒体播放设备和膝上型便携计算机等电子设备中的至少一种,第一终端110、服务器120以及第二终端运行在同一Kubernetes集群中,第一终端110是集群系统中发布chart资源以及部署chart资源的终端,且第一终端110安装有Helm客户端,通过Helm客户端将chart资源发送至服务器120。此外,第一终端110还可以显示chart资源的生命周期,以及向服务器120发送校验指令和部署指令。The first terminal 110 in the network topology diagram is at least one of electronic devices such as mobile phones, desktop computers, tablet computers, multimedia playback devices, and laptop computers. The first terminal 110, the server 120, and the second terminal run in the same Kubernetes cluster. The first terminal 110 is a terminal for publishing chart resources and deploying chart resources in the cluster system. The first terminal 110 is installed with a Helm client, and the chart resources are sent to the server 120 through the Helm client. In addition, the first terminal 110 can also display the life cycle of the chart resource, and send a verification instruction and a deployment instruction to the server 120 .

服务器120是集群系统中提供数据存储和提供chart服务的设备,服务器120中存储有chart资源以及运行chart服务的数据库,服务器120还用于接收第一终端110的校验指令,对上传的chart资源进行资源权限校验,此外,服务器120还用于接收第一终端110的部署指令,向第二终端130提供chart服务。The server 120 is a device that provides data storage and chart services in the cluster system. The server 120 stores chart resources and a database for running chart services. The server 120 is also used to receive verification instructions from the first terminal 110 and perform resource authority verification on uploaded chart resources. In addition, the server 120 is also used to receive deployment instructions from the first terminal 110 and provide chart services to the second terminal 130.

第二终端130是诸如手机、台式电脑、平板电脑、多媒体播放设备和膝上型便携计算机等电子设备中的至少一种,第二终端130是目标集群中待部署chart资源的终端,第二终端130安装有Helm客户端,通过Helm客户端与第一终端110和服务器120建立通信连接。可选的,第二终端130还可以向服务器120反馈部署信息。The second terminal 130 is at least one of electronic equipment such as a mobile phone, a desktop computer, a tablet computer, a multimedia player, and a laptop computer. The second terminal 130 is a terminal to be deployed with chart resources in the target cluster. The second terminal 130 is installed with a Helm client, and establishes a communication connection with the first terminal 110 and the server 120 through the Helm client. Optionally, the second terminal 130 may also feed back deployment information to the server 120 .

本领域技术人员可以知晓,上述第一终端和第二终端的数量可以更多或更少。比如上述第二终端可以仅为一个,或者上述终端为几十个或几百个,或者更多数量。本申请实施例对终端的数量和设备类型不加以限定。Those skilled in the art may know that the number of the above-mentioned first terminals and second terminals may be more or less. For example, there may be only one second terminal, or there may be tens or hundreds of terminals, or more. The embodiment of the present application does not limit the number of terminals and device types.

图2是本申请一个示例性实施例提供的chart资源的部署方法的流程图,本实施例以该方法用于图1所示的服务器为例进行说明。该方法包括:FIG. 2 is a flow chart of a method for deploying chart resources provided by an exemplary embodiment of the present application. This embodiment uses the server shown in FIG. 1 as an example for illustration. The method includes:

步骤201,响应于接收到第一终端发送的校验指令,对目标chart资源进行资源权限校验,目标chart资源是由第一终端上传的chart资源,且不同chart资源用于实现不同chart服务。Step 201, in response to receiving a verification instruction sent by the first terminal, perform resource authority verification on the target chart resource, the target chart resource is a chart resource uploaded by the first terminal, and different chart resources are used to implement different chart services.

集群系统中的服务器保存有第一终端上传的chart资源,chart资源由开发人员编写,其包含了一组定义Kubernetes资源相关的YAML文件,以TAR或GZ格式的压缩包存储在服务器中,chart资源至少可以部署一个chart服务,如通过chart资源提供应用程序的下载与安装,完整的HTTP服务等。The server in the cluster system stores the chart resource uploaded by the first terminal. The chart resource is written by the developer. It includes a set of YAML files that define Kubernetes resources and is stored in the server as a compressed package in TAR or GZ format. The chart resource can deploy at least one chart service, such as providing application download and installation through the chart resource, complete HTTP service, etc.

当开发人员编写完成chart资源,需要将该chart资源部署到相应的Kubernetes集群中时,通过第一终端向服务器发送校验指令,在服务器接收到第一终端发送的校验指令后,自动对第一终端上传的目标chart资源进行资源权限校验。资源权限校验的目的是为确保目标chart资源中资源文件的合法性、正确性以及能够实现相应的chart服务。现有技术中,该资源权限校验过程通常由Kubernetes平台的运维人员进行人工审核,人工审核周期较长,且审核的准确性不高。本方案将资源权限校验步骤移植到服务器中,由校验指令触发服务器自动执行,大大缩短的审核周期,降低人工审核的成本投入,且提高了资源权限校验的准确率。When the developer finishes writing the chart resource and needs to deploy the chart resource to the corresponding Kubernetes cluster, the first terminal sends a verification instruction to the server. After the server receives the verification instruction sent by the first terminal, it automatically performs resource permission verification on the target chart resource uploaded by the first terminal. The purpose of resource permission verification is to ensure the legitimacy and correctness of the resource files in the target chart resource and to realize the corresponding chart service. In the prior art, the resource permission verification process is usually manually reviewed by the operation and maintenance personnel of the Kubernetes platform. The manual review period is long and the review accuracy is not high. This solution transplants the resource permission verification steps to the server, and the server is automatically executed by the verification command, which greatly shortens the review cycle, reduces the cost of manual review, and improves the accuracy of resource permission verification.

步骤202,响应于目标chart资源通过资源权限校验,将目标chart资源设置为可部署状态。Step 202, in response to the target chart resource passing the resource permission check, setting the target chart resource to a deployable state.

当资源权限校验的结果满足集群系统的部署要求,服务器将该目标chart资源设置为可部署状态。通常情况下,集群系统中包含有多个终端,且多个终端与服务器运行在同一集群系统中,对于可部署的目标chart资源,服务器将其推送到该集群系统。When the resource permission verification result meets the deployment requirements of the cluster system, the server sets the target chart resource to a deployable state. Usually, the cluster system contains multiple terminals, and the multiple terminals and the server run in the same cluster system, and the server pushes the deployable target chart resources to the cluster system.

示意性的,以该目标chart实现应用程序的下载安装为例,对于可部署的目标chart资源,服务器以消息提醒的方式向集群系统的其他终端发送目标chart资源的上架通知,便于其他终端购买该chart资源以及对应的chart服务,该chart服务包括安装应用程序、更新和维护应用程序以及提供应用程序的后台服务等。Schematically, taking the download and installation of the target chart as an example, for a target chart resource that can be deployed, the server sends a notification of the launch of the target chart resource to other terminals in the cluster system in the form of a message reminder, so that other terminals can purchase the chart resource and the corresponding chart service. The chart service includes installing the application program, updating and maintaining the application program, and providing background services for the application program.

步骤203,响应于接收到对目标chart资源的部署指令,将目标chart资源部署至目标集群,目标集群包含至少一台待部署的第二终端。Step 203, in response to receiving a deployment instruction for the target chart resource, deploy the target chart resource to the target cluster, where the target cluster includes at least one second terminal to be deployed.

服务器中存储有实现chart服务的全部数据库资源以及配置信息,当服务器接收到第一终端发送部署指令时,说明第一终端需要将目标chart资源部署到目标集群,以便向目标集群提供对应的chart服务。在现有技术中,部署chart资源过程需要运维人员按照部署文档进行手动部署操作,包括对目标集群的信息审核、对目标chart资源的数据库配置进行检查以及对数据库进行更新等操作。而本方案中,该过程以部署指令作为触发机制,当服务器接收到部署指令后,由服务器自动执行部署操作,不再通过人工部署执行。The server stores all the database resources and configuration information for realizing the chart service. When the server receives the deployment command sent by the first terminal, it indicates that the first terminal needs to deploy the target chart resource to the target cluster in order to provide the target cluster with the corresponding chart service. In the prior art, the process of deploying chart resources requires operation and maintenance personnel to perform manual deployment operations according to the deployment documents, including information review of the target cluster, checking the database configuration of the target chart resources, and updating the database. However, in this solution, the deployment command is used as the trigger mechanism for this process. After the server receives the deployment command, the server automatically executes the deployment operation instead of manual deployment.

以上述chart服务为例,当目标集群需要使用目标chart资源对应的chart服务时,可以支付相应的费用购买该chart服务,进而通过第一终端部署该chart资源。目标集群包含至少一台待部署的第二终端,如第二终端购买社交类应用程序的通讯服务,第一终端则通过调用Helm包管理器,向服务器发送部署指令,将该社交类应用程序的镜像安装包下载到第二终端进行安装,以及提供相应的通讯服务。Taking the above chart service as an example, when the target cluster needs to use the chart service corresponding to the target chart resource, the corresponding fee can be paid to purchase the chart service, and then the chart resource can be deployed through the first terminal. The target cluster includes at least one second terminal to be deployed. If the second terminal purchases the communication service of the social application program, the first terminal will call the Helm package manager to send a deployment command to the server, download the image installation package of the social application program to the second terminal for installation, and provide corresponding communication services.

进一步地,在后续对chart服务的维护阶段,如对应用程序进行版本更新或加入对资源文件的其他校验规则,只需要对目标chart资源进行相应的更新,进而将其部署到目标集群,而无需重新编写部署文档,再次通过人工审核的方式进行人工部署,不仅降低了维护的成本投入,而且提高了部署效率。Furthermore, in the subsequent maintenance phase of the chart service, such as updating the version of the application program or adding other verification rules for resource files, it is only necessary to update the target chart resource accordingly, and then deploy it to the target cluster without rewriting the deployment document. Manual deployment is performed again through manual review, which not only reduces the cost of maintenance, but also improves deployment efficiency.

综上所述,本申请实施例提供的技术方案中,在目标chart资源校验阶段,服务器通过接收第一终端发送的校验指令自动对目标chart资源的资源文件进行资源权限校验,不再依赖人工审核,缩短了审核周期,且提高了资源权限校验的准确率;在目标chart资源的部署阶段,当服务器接收到部署指令后,同样由服务器自动执行部署操作,无需按照部署文档进行人工部署,在维护阶段,不仅降低了维护的成本投入,而且提高了部署效率。To sum up, in the technical solution provided by the embodiment of the present application, in the target chart resource verification stage, the server automatically performs resource permission verification on the resource file of the target chart resource by receiving the verification command sent by the first terminal, no longer relying on manual review, shortening the review cycle, and improving the accuracy of resource permission verification; in the deployment stage of the target chart resource, when the server receives the deployment instruction, the server also automatically executes the deployment operation without manual deployment according to the deployment document.

图3示出了本申请一个示例性实施例提供的chart资源的部署方法的流程图。本实施例以该方法用于图1所示的服务器120为例进行说明,该方法包括如下步骤:Fig. 3 shows a flowchart of a chart resource deployment method provided by an exemplary embodiment of the present application. In this embodiment, the method is described by using the server 120 shown in FIG. 1 as an example. The method includes the following steps:

步骤301,响应于接收到目标chart资源的校验指令,获取校验指令中包含的第一终端的帐号标识以及目标chart资源的资源标识。Step 301 , in response to receiving the verification instruction of the target chart resource, acquire the account identifier of the first terminal contained in the verification instruction and the resource identifier of the target chart resource.

在chart资源的开发阶段,开发人员通过第一终端编写目标chart资源,目标chart资源中包含有实现chart服务的资源文件,如chart的默认配置文件、依赖的其他chart资源,chart的基本信息以及部署文件模版目录等。In the development stage of the chart resource, the developer writes the target chart resource through the first terminal. The target chart resource contains the resource files to realize the chart service, such as the default configuration file of the chart, other dependent chart resources, the basic information of the chart, and the deployment file template directory.

当开发人员编写完成并将其打包为TAR或GZ压缩包后,通过第一终端上传至服务器中的chart仓库,chart仓库专门用于存放上传的chart资源。可选的,chart仓库以用户帐号为单位,将同一帐号下的所有chart资源存储在chart仓库中,便于后续对chart仓库中的chart资源进行管理。After the developer finishes writing and packaging it into a TAR or GZ compressed package, upload it to the chart warehouse in the server through the first terminal. The chart warehouse is specially used to store the uploaded chart resources. Optionally, the chart warehouse takes the user account as the unit, stores all chart resources under the same account in the chart warehouse, and facilitates subsequent management of the chart resources in the chart warehouse.

在一种可能的实施方式中,可以在第一终端设置本地chart仓库,用于存放开发人员临时编写的各种资源文件,进而在编写完成后,再将打包完成的目标chart资源上传至chart仓库。In a possible implementation, a local chart warehouse can be set on the first terminal to store various resource files temporarily written by developers, and then upload the packaged target chart resources to the chart warehouse after the writing is completed.

在进行资源权限校验之前,第一终端需要在chart资源管理界面选择需要进行校验的目标chart资源,在确定需要进行校验操作的目标chart资源后,向服务器发送校验指令。当服务器接收到第一终端发送的校验指令后,获取校验指令中包含的帐号标识以及目标chart资源的资源标识,便于从chart仓库中确定出目标chart资源。Before performing resource permission verification, the first terminal needs to select a target chart resource that needs to be verified on the chart resource management interface, and after determining the target chart resource that needs to be verified, send a verification instruction to the server. After receiving the verification instruction sent by the first terminal, the server obtains the account identifier contained in the verification instruction and the resource identifier of the target chart resource, so as to determine the target chart resource from the chart warehouse.

步骤302,基于资源标识,从chart仓库中获取目标chart资源,chart仓库中包含有第一终端上传的所有chart资源。Step 302, based on the resource identifier, acquire the target chart resource from the chart warehouse, which contains all the chart resources uploaded by the first terminal.

当服务器接收到校验指令后,确定出第一终端对应的帐号标识以及目标chart资源对应的资源标识。当chart仓库中包含有多个第一终端上传的候选chart资源时,服务器可以基于资源标识从多个候选chart资源中确定出需要进行资源权限校验的目标chart资源。After receiving the verification instruction, the server determines the account identifier corresponding to the first terminal and the resource identifier corresponding to the target chart resource. When the chart repository contains multiple candidate chart resources uploaded by the first terminal, the server may determine the target chart resource that needs resource permission verification from the multiple candidate chart resources based on the resource identifier.

步骤303,基于帐号标识获取第一终端对应的校验信息。Step 303: Obtain verification information corresponding to the first terminal based on the account identifier.

由于第一终端上传到chart仓库中的chart资源是以压缩包的形式进行保存,其中包括有多个资源文件,只有在确保各个资源文件的资源属性符合目标chart资源部署条件后才可以进行部署操作。校验信息用于对目标chart资源的资源属性和目标chart资源的书写规范进行校验,以确保目标chart资源能够部署到集群系统中。Since the chart resource uploaded by the first terminal to the chart warehouse is stored in the form of a compressed package, which includes multiple resource files, the deployment operation can only be performed after ensuring that the resource attributes of each resource file meet the deployment conditions of the target chart resource. The verification information is used to verify the resource attributes of the target chart resource and the writing specification of the target chart resource, so as to ensure that the target chart resource can be deployed in the cluster system.

步骤304,基于校验信息,对目标chart资源进行资源权限校验。Step 304, based on the verification information, perform resource permission verification on the target chart resource.

服务器在获取到第一终端对应的校验信息后,即开始对目标chart资源进行资源权限校验。由于目标chart资源中包含多个资源文件,不同的资源文件都对应各自的属性信息,如资源文件的资源类型(Kind)、资源名称(Name)以及空间名称(Namespace)等属性信息,服务器需要对属性信息进行校验。此外,服务器还需要对各个资源文件书写规范以及对目标chart资源中进行存储空间校验等。如图4所示,该过程具体包括如下步骤:After obtaining the verification information corresponding to the first terminal, the server starts to verify the resource authority of the target chart resource. Since the target chart resource contains multiple resource files, different resource files correspond to their own attribute information, such as the resource type (Kind), resource name (Name), and space name (Namespace) of the resource file. The server needs to verify the attribute information. In addition, the server also needs to write specifications for each resource file and verify the storage space in the target chart resource. As shown in Figure 4, the process specifically includes the following steps:

步骤304A,基于校验信息中的第一资源属性,对目标chart资源中的资源文件进行第一资源属性校验,第一资源属性为集群系统所支持的资源属性。Step 304A, based on the first resource attribute in the verification information, perform a first resource attribute verification on the resource file in the target chart resource, where the first resource attribute is a resource attribute supported by the cluster system.

当服务器从chart仓库中获取到目标chart后,需要对其进行解析,获取其中包含的所有资源文件,确定各个资源文件的资源类型。在原生Kubernetes集群中,集群系统可以支持Deployment、Service和Route等多种类型的资源文件,不同类型的资源文件用于实现相应的功能,如Service资源文件用于提供网络服务,Route资源文件用于提供存储服务等。此外,集群系统还可以根据需求自定义资源文件的资源类型,对于不同的集群系统,其能够支持的资源文件类型会有差异,当目标chart资源中资源文件的资源属性不属于集群系统所支持的资源属性时,集群系统可能无法正确识别或读取其中数据信息。因此,在服务器获取到各个资源文件的资源属性后,需要从配置中心获取集群系统的第一资源属性,对目标chart资源中的资源文件进行校验。After the server obtains the target chart from the chart warehouse, it needs to parse it, obtain all resource files contained in it, and determine the resource type of each resource file. In a native Kubernetes cluster, the cluster system can support multiple types of resource files such as Deployment, Service, and Route. Different types of resource files are used to implement corresponding functions. For example, Service resource files are used to provide network services, and Route resource files are used to provide storage services. In addition, the cluster system can also customize the resource type of the resource file according to the requirements. For different cluster systems, the types of resource files it can support will vary. When the resource attributes of the resource files in the target chart resource do not belong to the resource attributes supported by the cluster system, the cluster system may not be able to correctly identify or read the data information in it. Therefore, after the server obtains the resource attributes of each resource file, it needs to obtain the first resource attribute of the cluster system from the configuration center, and verify the resource files in the target chart resource.

示意性的,集群系统所支持的第一资源属性包括类型A、类型B和类型C,而目标chart资源中资源文件的资源属性包括类型A、类型B、类型C以及类型D,由于集群系统不支持类型D的资源文件,无法将其部署到集群系统中,此时应向第一终端反馈提示信息,以便开发人员针对无法识别的资源属性进行修改。Schematically, the first resource attributes supported by the cluster system include type A, type B, and type C, and the resource attributes of the resource files in the target chart resource include type A, type B, type C, and type D. Since the cluster system does not support resource files of type D, it cannot be deployed to the cluster system. At this time, a prompt message should be fed back to the first terminal so that developers can modify unrecognized resource attributes.

步骤304B,基于校验信息中的资源文件书写规则,对目标chart资源中的资源文件进行书写合规校验。Step 304B, based on the resource file writing rules in the verification information, check the writing compliance of the resource files in the target chart resource.

从上述内容可知,目标chart资源中各个资源文件的资源名称以及空间命由开发人员编写,开发人员无法保证资源文件的名称以及书写规范完全符合集群系统的部署要求,如chart资源中templates定义了资源文件的资源类型,appVersion定义了目标chart资源的版本信息。当文件的名称无法匹配时,服务器无法确定资源类型以及版本信息等。因此,当服务器解析目标chart资源后,还需要根据校验信息中的资源文件书写规则,对目标chart资源中的资源文件进行书写合规校验。It can be seen from the above that the resource name and space name of each resource file in the target chart resource are written by the developer, and the developer cannot guarantee that the name and writing specification of the resource file fully meet the deployment requirements of the cluster system. For example, templates in the chart resource defines the resource type of the resource file, and appVersion defines the version information of the target chart resource. When the names of the files do not match, the server cannot determine the resource type, version information, etc. Therefore, after the server parses the target chart resource, it also needs to verify the writing compliance of the resource file in the target chart resource according to the resource file writing rules in the verification information.

此外,集群系统中还定义有系统关键字,如数据类型关键字、控制语句关键字以及存储类关键字,开发人员在编写资源文件时应避免使用系统关键字,以免影响数据的识别。因此,资源文件书写规则中还可以定义资源名称以及空间名称的字符长度以及关键字等,当检测到资源名称或控件名称的字符长度超过设置阈值,或者检测到关键字时,及时向第一终端反馈提示信息。In addition, system keywords are defined in the cluster system, such as data type keywords, control statement keywords, and storage class keywords. Developers should avoid using system keywords when writing resource files, so as not to affect data identification. Therefore, the resource file writing rules can also define the character length and keywords of the resource name and space name, and when it is detected that the character length of the resource name or control name exceeds the set threshold, or when a keyword is detected, prompt information is fed back to the first terminal in time.

步骤304C,响应于通过第一资源属性校验和书写合规校验,基于校验信息中的第二资源属性,对目标chart资源中的资源文件进行第二资源属性校验,第二资源属性为第一终端具有部署权限的资源属性。Step 304C, in response to passing the first resource attribute verification and writing compliance verification, based on the second resource attribute in the verification information, perform a second resource attribute verification on the resource file in the target chart resource, and the second resource attribute is a resource attribute that the first terminal has deployment authority.

当目标chart资源通过第一资源属性校验和书写合规校验后,还需要对第一终端的权限信息进行校验。集群系统本质上属于开源系统,开发者可以通过集群系统上传和部署chart资源,但为了更好地对集群系统进行维护,需要为不同的开发者赋予不同资源属性的部署权限。在进行第二资源属性校验时,服务器根据帐号标识从权限中心获取第一终端的第二资源属性,即第一终端具有部署权限的资源属性,进而与目标chart资源中资源文件的资源属性进行匹配。After the target chart resource passes the first resource attribute verification and writing compliance verification, it is also necessary to verify the permission information of the first terminal. The cluster system is an open source system in nature. Developers can upload and deploy chart resources through the cluster system. However, in order to better maintain the cluster system, different developers need to be given deployment permissions of different resource attributes. When verifying the second resource attribute, the server obtains the second resource attribute of the first terminal from the authority center according to the account identifier, that is, the resource attribute for which the first terminal has deployment authority, and then matches it with the resource attribute of the resource file in the target chart resource.

示意性的,第二资源属性指示第一终端具备部署Deployment和Service类型的资源文件的部署权限,目标chart资源中包含有Route类型的资源文件,由于集群系统并未赋予第一终端部署Route类型的资源文件的部署权限,因此无法通过资源权限校验,相应的,可以向第一终端反馈提示信息。Schematically, the second resource attribute indicates that the first terminal has the deployment authority to deploy resource files of the Deployment and Service types, and the target chart resource contains resource files of the Route type. Since the cluster system does not grant the first terminal the deployment authority to deploy resource files of the Route type, it cannot pass the resource authority check. Correspondingly, a prompt message can be fed back to the first terminal.

需要说明的是,上述示意性的例子中仅以Deployment、Service以及Route类型作为示例,在实际的集群系统中,由于不同的集群系统够可以自定义资源类型,集群系统需要根据不同开发人员的身份或岗位职责赋予对应的资源类型的部署权限,具体的资源类型本实施例不对其进行限定。It should be noted that the above schematic examples only use Deployment, Service, and Route types as examples. In an actual cluster system, since different cluster systems can customize resource types, the cluster system needs to grant deployment permissions to corresponding resource types according to the identity or job responsibilities of different developers. The specific resource types are not limited in this embodiment.

步骤304D,基于校验信息中的总存储空间以及已占用存储空间,确定剩余存储空间,总存储空间为第一终端部署chart资源的最大可用空间,已占用存储空间为第一终端已部署chart资源所占用的空间。Step 304D, determine the remaining storage space based on the total storage space and the occupied storage space in the verification information, the total storage space is the maximum available space for deploying the chart resources of the first terminal, and the occupied storage space is the space occupied by the deployed chart resources of the first terminal.

服务器不仅需要对目标chart资源进行第一资源属性校验、第二资源属性校验和书写合规校验,还需要对目标chart资源进行存储空间校验。The server not only needs to perform first resource attribute verification, second resource attribute verification, and writing compliance verification on the target chart resource, but also needs to perform storage space verification on the target chart resource.

在集群系统中,部署的chart资源存放在命名空间(Namespace)中,Namespace是对一组资源和对象的抽象集合,比如可以用来将系统内部的对象划分为不同的项目组或用户组。常见的pods,services,replication controllers和deployments等都是属于某一个Namespace。不同的Namespace在逻辑上彼此隔离,以实现chart资源的高效管理。当第一终端部署chart资源后,对应的Namespace会占用一定的存储空间,因而服务器在进行资源权限校验时,需要根据帐号标识获取第一终端的总存储空间以及已部署chart资源所占用的空间,根据总存储空间以及已占用存储空间,进而确定出剩余存储空间。In the cluster system, the deployed chart resources are stored in the namespace (Namespace). Namespace is an abstract collection of a group of resources and objects. For example, it can be used to divide the objects in the system into different project groups or user groups. Common pods, services, replication controllers and deployments all belong to a certain Namespace. Different Namespaces are logically isolated from each other to achieve efficient management of chart resources. After the first terminal deploys chart resources, the corresponding Namespace will occupy a certain amount of storage space. Therefore, when the server performs resource permission verification, it needs to obtain the total storage space of the first terminal and the space occupied by the deployed chart resources according to the account ID, and then determine the remaining storage space according to the total storage space and the occupied storage space.

步骤305E,基于剩余存储空间以及目标chart资源的目标占用空间,对目标chart资源进行存储空间校验。Step 305E, based on the remaining storage space and the target occupied space of the target chart resource, check the storage space of the target chart resource.

由于部署目标chart资源时需要在集群系统中创建Namespace,服务器在确定出部署目标chart资源所需的存储空间后,通过将剩余存储空间和部署目标chart资源所需的存储空间进行比较。当剩余存储空间大于部署目标chart资源所需的存储空间时,确定目标chart资源满足集群系统的部署要求,进而将其部署到集群系统中。Since a Namespace needs to be created in the cluster system when deploying target chart resources, after the server determines the storage space required for deploying target chart resources, it compares the remaining storage space with the storage space required for deploying target chart resources. When the remaining storage space is greater than the storage space required for deploying the target chart resource, it is determined that the target chart resource meets the deployment requirements of the cluster system, and then it is deployed in the cluster system.

需要说明的是,对目标chart资源进行存储空间校验还可以在步骤304A和步骤304B之前执行,服务器在确定存储空间校验通过的情况下,再执行步骤304A和304B。本申请实施例不对存储空间校验的先后顺序进行限定。It should be noted that the storage space verification of the target chart resource can also be performed before step 304A and step 304B, and the server executes steps 304A and 304B after determining that the storage space verification passes. The embodiment of the present application does not limit the sequence of storage space verification.

步骤305,响应于目标chart资源通过资源权限校验,将目标chart资源设置为可部署状态。Step 305, in response to the target chart resource passing the resource permission check, setting the target chart resource to a deployable state.

在服务器确定第一资源属性校验、第二资源属性校验、书写合规校验以及存储空间全部通过的情况下,确定目标chart资源通过资源权限校验,进而将目标chart资源设置为可部署状态,向集群系统推送该目标chart资源。When the server determines that the first resource attribute verification, the second resource attribute verification, the writing compliance verification and the storage space all pass, it determines that the target chart resource has passed the resource permission verification, and then sets the target chart resource to a deployable state, and pushes the target chart resource to the cluster system.

服务器将目标chart资源设置为可部署状态后,还可以向第一终端反馈资源权限校验结果,如图5所示,在第一终端显示chart资源管理界面510,在第一终端未发送校验指令前,chart资源的生命周期显示为研发中;当用户点击目标chart资源的校验控件511后,第一终端向服务器发送校验指令,进而将生命周期更新为审核中,表示服务器正在对目标chart资源进行资源权限校验;当服务器对目标chart资源的资源权限校验通过时,向第一终端反馈资源权限校验结果,此时目标chart资源的生命周期显示为已上架。After the server sets the target chart resource to a deployable state, it can also feed back the resource permission verification result to the first terminal. As shown in Figure 5, the chart resource management interface 510 is displayed on the first terminal. Before the first terminal sends a verification command, the life cycle of the chart resource is displayed as under development; when the user clicks the verification control 511 of the target chart resource, the first terminal sends a verification command to the server, and then updates the life cycle to being under review, indicating that the server is verifying the resource permission of the target chart resource; The terminal feeds back the resource permission verification result, and the life cycle of the target chart resource is displayed as being released.

步骤306,响应于接收到对目标chart资源的部署指令,获取部署指令中包含的目标集群的集群标识以及目标chart资源的资源标识。Step 306, in response to receiving the deployment instruction for the target chart resource, acquire the cluster identifier of the target cluster and the resource identifier of the target chart resource included in the deployment instruction.

当第一终端需要向集群系统中的目标集群部署目标chart资源时,通过选定目标chart资源的资源标识以及目标集群的集群标识,进而向服务器发送部署指令。集群标识用于确定目标chart资源的名称以及版本信息,如AbcChart,V2.0。服务器接收到第一终端发送的部署指令后,首先获取校验指令中包含的目标集群的集群标识以及目标chart资源的资源标识,进而根据资源标识确定目标chart资源。When the first terminal needs to deploy the target chart resource to the target cluster in the cluster system, it sends a deployment instruction to the server by selecting the resource identifier of the target chart resource and the cluster identifier of the target cluster. The cluster identifier is used to determine the name and version information of the target chart resource, such as AbcChart, V2.0. After receiving the deployment instruction sent by the first terminal, the server first obtains the cluster identifier of the target cluster and the resource identifier of the target chart resource contained in the verification instruction, and then determines the target chart resource according to the resource identifier.

步骤307,基于资源标识,从chart仓库中获取目标chart资源。Step 307, based on the resource identifier, obtain the target chart resource from the chart warehouse.

本步骤的实施方式可以参考步骤302,本实施例在此不做赘述。For the implementation manner of this step, reference may be made to step 302, and details are not described here in this embodiment.

步骤308,基于集群标识,对目标chart资源的配置参数进行更新。Step 308, based on the cluster identifier, the configuration parameters of the target chart resource are updated.

由于集群系统通常包含有较多的终端设备,不同的设备之间可以组成多个集群,如以企业为单位建立集群,目标集群中的第二终端即为该企业内部的所有终端设备。此外,对于同一目标chart资源,目标集群之间也会存在差异,如对中国集群和新加坡集群,由于地域差异和遵循的标准各不相同,在进行部署时就需要根据集群标识对配置参数进行更新。该过程具体包括如下步骤:Since the cluster system usually includes many terminal devices, multiple clusters can be formed between different devices. For example, if a cluster is established by an enterprise, the second terminal in the target cluster is all terminal devices within the enterprise. In addition, for the same target chart resource, there will be differences between the target clusters. For example, for the Chinese cluster and the Singapore cluster, due to regional differences and different standards, configuration parameters need to be updated according to the cluster ID when deploying. The process specifically includes the following steps:

步骤308A,基于集群标识,从配置中心获取目标集群的集群配置信息。Step 308A, based on the cluster identifier, acquire cluster configuration information of the target cluster from the configuration center.

在第一终端发送部署指令前应提前根据第二终端建立目标集群,以及为目标集群提供chart服务的数据库。Before the first terminal sends the deployment command, the target cluster should be established in advance according to the second terminal, and a database providing chart service for the target cluster should be established.

在一种可能的实施方式中,当企业购买目标chart资源以及相应的chart服务后,运维人员需要通过第一终端为企业建立目标集群,以及为目标集群分配chart服务的帐号及登录密钥等。此外,还包括设置目标集群的集群标识以及对目标集群的集群配置信息(config),如工作地域、Hadoop组件版本以及实例节点规格等。实例节点规格越高,容量越大,集群运行速度越快,分析处理能力越强,相应的成本也越高。集群配置信息和集群标识关联存储在服务器的配置中心。在进行部署时,目标chart资源的配置参数则需要根据实际需要部署的目标集群来确定。In a possible implementation, after the enterprise purchases the target chart resource and the corresponding chart service, the operation and maintenance personnel need to establish the target cluster for the enterprise through the first terminal, and assign the account and login key of the chart service to the target cluster. In addition, it also includes setting the cluster ID of the target cluster and the cluster configuration information (config) of the target cluster, such as the working region, Hadoop component version, and instance node specifications. The higher the instance node specifications, the larger the capacity, the faster the cluster runs, the stronger the analysis and processing capabilities, and the higher the corresponding cost. The cluster configuration information and the cluster ID are associated and stored in the configuration center of the server. When deploying, the configuration parameters of the target chart resource need to be determined according to the target cluster that actually needs to be deployed.

步骤308B,基于集群配置信息对目标chart资源的配置参数进行更新。In step 308B, the configuration parameters of the target chart resource are updated based on the cluster configuration information.

在一种可能的实施方式中,目标chart资源中对涉及到目标集群的配置参数进行标记,在获取到目标集群的集群配置信息后,再对配置参数进行替换。如在未进行更新前,目标chart资源中实例节点设置为N,更新后的实例节点设置为16,表示16个1核SSD节点。此外,更新的配置参数还可以包括MPP数据分区数以及默认语言(Language)等,本申请实施例对此不作限定。In a possible implementation manner, the configuration parameters related to the target cluster are marked in the target chart resource, and the configuration parameters are replaced after the cluster configuration information of the target cluster is obtained. If the instance node in the target chart resource is set to N before the update, the updated instance node is set to 16, indicating 16 1-core SSD nodes. In addition, the updated configuration parameters may also include the number of MPP data partitions and a default language (Language), which are not limited in this embodiment of the present application.

步骤309,对更新后的目标chart资源进行前置校验,前置校验包括对数据库配置校验、内存资源校验以及连接状态校验。Step 309, perform pre-verification on the updated target chart resource, the pre-verification includes verification of database configuration, memory resource verification and connection status verification.

当服务器对目标chart资源的配置参数进行更新后,进而需要对目标chart资源的进行前置校验。前置校验包括对数据库配置校验、内存资源校验以及连接状态校验,目的是为了确保数据库能够向目标集群提供服务。该过程具体包括如下步骤:After the server updates the configuration parameters of the target chart resource, it needs to perform pre-verification on the target chart resource. Pre-verification includes verification of database configuration, memory resources, and connection status to ensure that the database can provide services to the target cluster. The process specifically includes the following steps:

步骤309A,基于集群标识,从配置中心获取目标集群的前置校验规则。Step 309A, based on the cluster identifier, obtain the pre-verification rules of the target cluster from the configuration center.

前置校验规则中至少包括数据库的访问地址、chart服务的帐号及登录密钥等信息。此外,前置校验规则中还有目标集群的内存资源以及域名信息等,这些都与目标集群的集群标识关联存储在配置中心。当服务器需要对目标集群进行前置校验时,首先应从配置中心获取到目标集群的前置校验规则,进而对更新后的目标chart资源进行前置校验。The pre-verification rules include at least the access address of the database, the account number and login key of the chart service, and other information. In addition, the pre-verification rules include the memory resources and domain name information of the target cluster, which are associated with the cluster ID of the target cluster and stored in the configuration center. When the server needs to pre-verify the target cluster, it should first obtain the pre-verification rules of the target cluster from the configuration center, and then perform pre-verification on the updated target chart resource.

步骤309B,基于前置校验规则对更新后的目标chart资源进行前置校验。Step 309B, perform pre-verification on the updated target chart resource based on pre-verification rules.

当服务器获取到前置校验规则后,验证数据库的访问地址是否有效、验证chart服务的帐号及登录密钥是否匹配、目标集群的内存资源是否充足等。此外,服务器还需要判断集群系统的网络带宽以及与目标集群的网络连接是否正常,以确保能够向目标集群提供服务。After the server obtains the pre-verification rules, it verifies whether the access address of the database is valid, verifies whether the account number and login key of the chart service match, and whether the memory resources of the target cluster are sufficient, etc. In addition, the server also needs to judge whether the network bandwidth of the cluster system and the network connection with the target cluster are normal, so as to ensure that services can be provided to the target cluster.

步骤310,响应于通过前置校验,对目标chart资源进行前置执行。Step 310, in response to passing the pre-verification, perform pre-execution on the target chart resource.

当目标chart资源通过前置校验时,服务器还需要进一步对目标chart资源进行前置执行,前置执行包括对目标chart资源的数据库进行更新。数据库由运维人员进行维护,当运维人员在数据库中增删数据或修改数据内容,若不及时对数据库内容进行更新而直接向目标集群提供数据服务,在向目标集群部署目标chart资源过程中会出现报错或应用程序无法实现相应的功能。因此,服务器需要在每次部署目标chart资源时对数据库进行一次数据更新,以确保数据库的实时性。When the target chart resource passes the pre-verification, the server needs to further pre-execute the target chart resource, and the pre-execution includes updating the database of the target chart resource. The database is maintained by the operation and maintenance personnel. When the operation and maintenance personnel add or delete data or modify the data content in the database, if the database content is not updated in time and the data service is directly provided to the target cluster, an error will be reported during the deployment of the target chart resource to the target cluster or the application program will not be able to achieve the corresponding functions. Therefore, the server needs to perform a data update on the database every time the target chart resource is deployed, so as to ensure the real-time performance of the database.

此外,前置执行过程还可以包括对服务配置中心进行更新,服务配置中心中保存有实现chart服务的调整参数,包括显示时间设置、限流策略、背景颜色设置以及显示挂件等相关的配置。这些服务配置没有一个固定的格式,因此需要通过独立的服务配置中心进行存储,运维人员可以根据实际需求对其进行修改。其更新的方式一般有两种,pull模式,服务器定时去拉取服务配置中心的数据;push模式,服务一直连接到服务配置中心上,一旦检测到配置有变更,自动将修改后的调整参数推送到目标集群。In addition, the pre-execution process may also include updating the service configuration center, which stores adjustment parameters for implementing chart services, including display time settings, current limiting policies, background color settings, and display widgets. These service configurations do not have a fixed format, so they need to be stored in an independent service configuration center, and operation and maintenance personnel can modify them according to actual needs. There are generally two ways to update it. In the pull mode, the server regularly pulls the data from the service configuration center; in the push mode, the service is always connected to the service configuration center. Once a configuration change is detected, the modified adjustment parameters are automatically pushed to the target cluster.

步骤311,响应于通过前置执行,将目标chart资源部署至目标集群。Step 311 , deploying the target chart resource to the target cluster in response to passing the pre-execution.

当目标chart资源通过前置执行后,将目标chart资源部部署到目标集群中,以实现向目标集群中的第二终端提供chart服务。After the target chart resource is pre-executed, the target chart resource is deployed to the target cluster, so as to provide chart services to the second terminal in the target cluster.

以安装应用程序为例,当第一终端选择目标集群以及目标chart资源后,向服务器发送部署指令。由于目标集群中的第二终端与服务器运行在同一集群系统中,第二终端通过Helm包管理器自动从集群系统下载应用程序的镜像安装包进行安装以及与数据库建立连接。Taking installing an application program as an example, after the first terminal selects a target cluster and a target chart resource, it sends a deployment instruction to the server. Since the second terminal and the server in the target cluster run in the same cluster system, the second terminal automatically downloads the image installation package of the application program from the cluster system through the Helm package manager for installation and establishes a connection with the database.

为了能够获取目标集群的部署状态,服务器在部署过程中实时监控以及接收第二终端反馈的部署信息,并生成相应的日志文件进行保存。In order to obtain the deployment status of the target cluster, the server monitors and receives the deployment information fed back by the second terminal in real time during the deployment process, and generates a corresponding log file for storage.

示意性的,如图6所示,第一终端显示Chart资源管理界面610,当用户选择目标chart资源以及目标集群后,通过点击部署控件611向服务器发送部署指令,在部署阶段,通过部署状态栏612显示目标chart资源的部署状态以及部署进度。Schematically, as shown in FIG. 6, the first terminal displays a Chart resource management interface 610. After the user selects a target chart resource and a target cluster, the user clicks on the deployment control 611 to send a deployment command to the server. In the deployment phase, the deployment status and deployment progress of the target chart resource are displayed through the deployment status bar 612.

此外,如图7所示,还可以在第一终端显示Chart资源管理界面710,在Chart资源管理界面710显示出各个chart资源的生命周期以及chart资源的版本信息等,对于未进行资源权限校验的chart资源,生命周期显示为研发中;对于进行资源权限校验的chart资源,生命周期显示为审核中;对于完成资源权限校验的chart资源,其生命周期显示为已上架;对于停止维护的chart资源,其生命周期显示为已下架。In addition, as shown in FIG. 7 , the Chart resource management interface 710 can also be displayed on the first terminal, and the life cycle of each chart resource and the version information of the chart resource are displayed on the Chart resource management interface 710. For a chart resource that has not been verified for resource permissions, the life cycle is displayed as under development; for a chart resource that has been verified for resource permissions, the life cycle is displayed as being reviewed;

步骤312,响应于接收到对目标chart资源的更新指令,获取更新指令中目标chart资源的版本信息,基于版本信息对目标chart资源进行更新。Step 312, in response to receiving an update instruction for the target chart resource, obtain version information of the target chart resource in the update instruction, and update the target chart resource based on the version information.

在完成目标chart资源部署后,第二终端安装完成应用程序安装以及使用应用程序的相关功能。在应用程序的维护阶段,若需要对应用程序进行应用更新或版本升级,第一终端需要对目标chart资源进行更新,进而部署到集群系统中。当服务器接收到对目标chart资源的更新指令后,获取更新指令中保存的目标chart资源的版本信息,基于版本信息对目标chart资源进行更新,进而自动对版本更新后的目标chart资源进行资源权限校验,完成对应用程序的版本更新。After the deployment of the target chart resource is completed, the second terminal installation completes the installation of the application program and the use of related functions of the application program. In the maintenance phase of the application program, if the application program needs to be updated or version upgraded, the first terminal needs to update the target chart resource, and then deploy it to the cluster system. When the server receives the update command for the target chart resource, it obtains the version information of the target chart resource saved in the update command, updates the target chart resource based on the version information, and then automatically checks the resource permissions of the updated target chart resource to complete the version update of the application.

本申请实施例中,服务器在接收到目标chart资源的校验指令后,自动根据校验指令中包含的帐号标识以及目标chart资源的资源标识获取校验信息;进而根据校验信息中的第一资源属性,对目标chart资源进行第一资源属性校验;根据校验信息中的资源文件书写规则,对目标chart资源文件中资源文件进行书写合规校验,在通过第一资源属性校验和资源文件书写规则的情况下,对目标chart资源中的资源文件进行第二资源属性校验,以确保第一终端具有部署相应资源文件的部署权限;In the embodiment of the present application, after receiving the verification instruction of the target chart resource, the server automatically obtains the verification information according to the account ID contained in the verification instruction and the resource ID of the target chart resource; then, according to the first resource attribute in the verification information, the first resource attribute verification is performed on the target chart resource; according to the resource file writing rules in the verification information, the writing compliance verification of the resource files in the target chart resource file is performed, and when the first resource attribute verification and the resource file writing rules are passed, the second resource attribute verification is performed on the resource files in the target chart resource to ensure that the first terminal has deployment capabilities The deployment permission of the corresponding resource file;

此外,服务器还需要对目标chart资源进行存储空间校验,以确保第一终端在集群系统中的剩余存储空间足够部署目标chart资源,由于资源权限校验步骤由服务器自动执行,相较于人工审核的方式,缩短了审核周期,且提高了资源权限校验的准确率;In addition, the server also needs to verify the storage space of the target chart resource to ensure that the remaining storage space of the first terminal in the cluster system is sufficient to deploy the target chart resource. Since the resource permission verification step is automatically performed by the server, compared with manual review, the review period is shortened and the accuracy of resource permission verification is improved;

当服务器接收到第一终端的部署指令后,自动根据部署指令中目标集群的集群标识以及目标chart资源的资源标识,对目标chart资源的配置参数进行更新以及对目标chart资源进行前置校验和前置执行步骤;When the server receives the deployment command from the first terminal, it automatically updates the configuration parameters of the target chart resource and performs pre-check and pre-execution steps on the target chart resource according to the cluster ID of the target cluster and the resource ID of the target chart resource in the deployment command;

进一步的,在前置校验和前置执行都通过的情况下,将目标chart资源部署到目标集群中,以便目标集群实现相应的chart服务,在后续的维护阶段,服务器在接收到对目标chart资源的更新指令后,自动对应用程序进行版本更新,相较于按照部署文档进行人工部署的方式,不仅降低了维护的成本投入,而且提高了部署效率。Furthermore, when both the pre-verification and pre-execution pass, the target chart resource is deployed to the target cluster, so that the target cluster can realize the corresponding chart service. In the subsequent maintenance phase, after the server receives the update command for the target chart resource, it automatically updates the version of the application. Compared with manual deployment according to the deployment document, it not only reduces the cost of maintenance, but also improves the deployment efficiency.

图8示出了本申请一个实施例提供的chart资源的部署装置的结构框图。FIG. 8 shows a structural block diagram of an apparatus for deploying chart resources provided by an embodiment of the present application.

校验模块801,用于响应于接收到第一终端发送的校验指令,对目标chart资源进行资源权限校验,所述目标chart资源是由所述第一终端上传的chart资源,且不同chart资源用于实现不同chart服务;The verification module 801 is configured to perform resource authority verification on a target chart resource in response to receiving a verification instruction sent by the first terminal, where the target chart resource is a chart resource uploaded by the first terminal, and different chart resources are used to implement different chart services;

设置模块802,用于响应于所述目标chart资源通过资源权限校验,将所述目标chart资源设置为可部署状态;A setting module 802, configured to set the target chart resource to a deployable state in response to the target chart resource passing the resource permission check;

部署模块803,用于响应于接收到对所述目标chart资源的部署指令,将所述目标chart资源部署至目标集群,所述目标集群包含至少一台待部署chart服务的第二终端。The deployment module 803 is configured to, in response to receiving a deployment instruction for the target chart resource, deploy the target chart resource to a target cluster, where the target cluster includes at least one second terminal of the chart service to be deployed.

可选的,所述校验模块801,包括:Optionally, the verification module 801 includes:

第一获取单元,用于响应于接收到所述目标chart资源的所述校验指令,获取所述校验指令中包含的所述第一终端的帐号标识以及所述目标chart资源的资源标识;A first obtaining unit, configured to, in response to receiving the verification instruction of the target chart resource, obtain the account identifier of the first terminal contained in the verification instruction and the resource identifier of the target chart resource;

第二获取单元,用于基于所述资源标识,从chart仓库中获取所述目标chart资源,所述chart仓库中包含有所述第一终端上传的所有chart资源;The second obtaining unit is configured to obtain the target chart resource from a chart warehouse based on the resource identifier, and the chart warehouse contains all the chart resources uploaded by the first terminal;

第三获取单元,用于基于所述帐号标识获取所述第一终端对应的校验信息;a third obtaining unit, configured to obtain verification information corresponding to the first terminal based on the account identifier;

校验单元,用于基于所述校验信息,对所述目标chart资源进行资源权限校验。A verification unit, configured to perform resource permission verification on the target chart resource based on the verification information.

可选的,所述校验单元,用于:Optionally, the verification unit is used for:

基于所述校验信息中的第一资源属性,对所述目标chart资源中的资源文件进行第一资源属性校验,所述第一资源属性为所述集群系统所支持的资源属性;Based on the first resource attribute in the verification information, perform a first resource attribute verification on the resource file in the target chart resource, where the first resource attribute is a resource attribute supported by the cluster system;

基于所述校验信息中的资源文件书写规则,对所述目标chart资源中的资源文件进行书写合规校验。Based on the resource file writing rules in the verification information, write compliance verification is performed on the resource files in the target chart resource.

可选的,所述校验单元,还用于:Optionally, the verification unit is also used for:

响应于通过所述第一资源属性校验和所述书写合规校验,基于所述校验信息中的第二资源属性,对所述目标chart资源中的资源文件进行第二资源属性校验,所述第二资源属性为所述第一终端具有部署权限的资源属性;In response to passing the first resource attribute verification and the writing compliance verification, based on the second resource attribute in the verification information, perform a second resource attribute verification on the resource file in the target chart resource, the second resource attribute is a resource attribute that the first terminal has deployment authority;

基于所述校验信息中的总存储空间以及已占用存储空间,确定剩余存储空间,所述总存储空间为所述第一终端部署chart资源的最大可用空间,所述已占用存储空间为所述第一终端已部署chart资源所占用的空间;Determine the remaining storage space based on the total storage space and the occupied storage space in the verification information, the total storage space is the maximum available space for the first terminal to deploy chart resources, and the occupied storage space is the space occupied by the first terminal that has deployed chart resources;

基于所述剩余存储空间以及所述目标chart资源的目标占用空间,对所述目标chart资源中进行存储空间校验。Based on the remaining storage space and the target occupied space of the target chart resource, check the storage space in the target chart resource.

可选的,所述部署模块803,包括:Optionally, the deployment module 803 includes:

第四获取单元,用于响应于接收到对所述目标chart资源的所述部署指令,获取所述部署指令中包含的所述目标集群的集群标识以及所述目标chart资源的资源标识;A fourth acquiring unit, configured to acquire the cluster identifier of the target cluster and the resource identifier of the target chart resource contained in the deployment instruction in response to receiving the deployment instruction for the target chart resource;

第五获取单元,用于基于所述资源标识,从chart仓库中获取所述目标chart资源;A fifth acquiring unit, configured to acquire the target chart resource from the chart warehouse based on the resource identifier;

更新单元,用于基于所述集群标识,对所述目标chart资源的配置参数进行更新;An updating unit, configured to update configuration parameters of the target chart resource based on the cluster identifier;

前置校验单元,用于对更新后的所述目标chart资源进行前置校验,所述前置校验包括对数据库配置校验、内存资源校验以及连接状态校验;A pre-verification unit, configured to perform pre-verification on the updated target chart resource, the pre-verification includes database configuration verification, memory resource verification and connection status verification;

前置执行单元,用于响应于通过所述前置校验,对所述目标chart资源进行前置执行;a pre-execution unit, configured to perform pre-execution on the target chart resource in response to passing the pre-check;

部署单元,用于响应于通过所述前置执行,将所述目标chart资源部署至所述目标集群。A deployment unit, configured to deploy the target chart resource to the target cluster in response to passing the pre-execution.

可选的,所述更新单元,用于:Optionally, the updating unit is used for:

基于所述集群标识,从配置中心获取所述目标集群的集群配置信息;Obtaining cluster configuration information of the target cluster from a configuration center based on the cluster identifier;

基于所述集群配置信息对所述目标chart资源的所述配置参数进行更新;updating the configuration parameters of the target chart resource based on the cluster configuration information;

可选的,所述行前置校验,用于:Optionally, the pre-verification of the line is used for:

基于所述集群标识,从所述配置中心获取所述目标集群的前置校验规则;Based on the cluster identifier, acquire the pre-verification rules of the target cluster from the configuration center;

基于所述前置校验规则对更新后的所述目标chart资源进行所述前置校验。The pre-check is performed on the updated target chart resource based on the pre-check rule.

可选的,所述装置还包括:Optionally, the device also includes:

更新模块,用于响应于接收到对所述目标chart资源的更新指令,获取所述更新指令中所述目标chart资源的版本信息,基于所述版本信息对所述目标chart资源进行更新。An update module, configured to, in response to receiving an update instruction for the target chart resource, acquire version information of the target chart resource in the update instruction, and update the target chart resource based on the version information.

图9示出了本申请一个示例性实施例提供的服务器的结构示意图。具体来讲:服务器包括中央处理单元(Central Processing Unit,CPU)901、包括随机存取存储器902和只读存储器903的系统存储器904,以及连接系统存储器904和中央处理单元901的系统总线905。服务器900还包括计算机内的各个器件之间传输信息的基本输入/输出系统(Input/Output,I/O系统)906,和用于存储操作系统913、应用程序914和其他程序模块915的大容量存储设备907。Fig. 9 shows a schematic structural diagram of a server provided by an exemplary embodiment of the present application. Specifically: the server includes a central processing unit (Central Processing Unit, CPU) 901, a system memory 904 including a random access memory 902 and a read-only memory 903, and a system bus 905 connecting the system memory 904 and the central processing unit 901. The server 900 also includes a basic input/output system (Input/Output, I/O system) 906 for transferring information between various devices in the computer, and a mass storage device 907 for storing an operating system 913, application programs 914 and other program modules 915.

基本输入/输出系统906包括有用于显示信息的显示器908和用于用户输入信息的诸如鼠标、键盘之类的输入设备909。其中显示器908和输入设备909都通过连接到系统总线905的输入输出控制器910连接到中央处理单元901。基本输入/输出系统906还可以包括输入输出控制器910以用于接收和处理来自键盘、鼠标、或电子触控笔等多个其他设备的输入。类似地,输入输出控制器910还提供输出到显示屏、打印机或其他类型的输出设备。The basic input/output system 906 includes a display 908 for displaying information and an input device 909 such as a mouse and a keyboard for a user to input information. Both the display 908 and the input device 909 are connected to the central processing unit 901 through the input and output controller 910 connected to the system bus 905 . The basic input/output system 906 may also include an input output controller 910 for receiving and processing input from a number of other devices such as a keyboard, mouse, or electronic stylus. Similarly, input output controller 910 also provides output to a display screen, printer, or other type of output device.

大容量存储设备907通过连接到系统总线905的大容量存储控制器(未示出)连接到中央处理单元901。大容量存储设备907及其相关联的计算机可读介质为服务器900提供非易失性存储。也就是说,大容量存储设备907可以包括诸如硬盘或者驱动器之类的计算机可读介质(未示出)。Mass storage device 907 is connected to central processing unit 901 through a mass storage controller (not shown) connected to system bus 905 . Mass storage device 907 and its associated computer-readable media provide non-volatile storage for server 900 . That is, mass storage device 907 may include a computer-readable medium (not shown) such as a hard disk or drive.

不失一般性,计算机可读介质可以包括计算机存储介质和通信介质。计算机存储介质包括以用于存储诸如计算机可读指令、数据结构、程序模块或其他数据等信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动介质。计算机存储介质包括随机存取记忆体(RAM,Random Access Memory)、只读存储器(ROM,Read Only Memory)、闪存或其他固态存储其技术,只读光盘(Compact Disc Read-Only Memory,CD-ROM)、数字通用光盘(Digital Versatile Disc,DVD)或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。当然,本领域技术人员可知计算机存储介质不局限于上述几种。上述的系统存储器904和大容量存储设备907可以统称为存储器。Without loss of generality, computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media include random access memory (RAM, Random Access Memory), read-only memory (ROM, Read Only Memory), flash memory or other solid-state storage technologies, compact disc read-only memory (CD-ROM), digital versatile disc (Digital Versatile Disc, DVD) or other optical storage, tape cassettes, tapes, magnetic disk storage or other magnetic storage devices. Certainly, those skilled in the art know that the computer storage medium is not limited to the above-mentioned ones. The above-mentioned system memory 904 and mass storage device 907 may be collectively referred to as memory.

存储器存储有一个或多个程序,一个或多个程序被配置成由一个或多个中央处理单元901执行,一个或多个程序包含用于实现上述方法的指令,中央处理单元901执行该一个或多个程序实现上述各个方法实施例提供的chart资源的部署方法。The memory stores one or more programs, the one or more programs are configured to be executed by one or more central processing units 901, the one or more programs include instructions for implementing the above method, and the central processing unit 901 executes the one or more programs to implement the chart resource deployment method provided by the above method embodiments.

根据本申请的各种实施例,服务器900还可以通过诸如因特网等网络连接到网络上的远程计算机运行。也即服务器900可以通过连接在系统总线905上的网络接口单元911连接到网络912,或者说,也可以使用网络接口单元911来连接到其他类型的网络或远程计算机系统(未示出)。According to various embodiments of the present application, the server 900 can also run on a remote computer connected to the network through a network such as the Internet. That is to say, the server 900 can be connected to the network 912 through the network interface unit 911 connected to the system bus 905, or can use the network interface unit 911 to connect to other types of networks or remote computer systems (not shown).

存储器还包括一个或者一个以上的程序,一个或者一个以上程序存储于存储器中,一个或者一个以上程序包含用于进行本申请实施例提供的方法中由服务器所执行的步骤。The memory also includes one or more programs, the one or more programs are stored in the memory, and the one or more programs include the steps executed by the server in the method provided by the embodiment of the present application.

除此之外,本领域技术人员可以理解,上述附图所示出的服务器的结构并不构成对服务器的限定,服务器可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。比如,服务器中还包括射频电路、输入单元、传感器、服务器、电源等部件,在此不再赘述。In addition, those skilled in the art can understand that the structure of the server shown in the above figures does not constitute a limitation on the server, and the server may include more or less components than those shown in the figure, or combine some components, or arrange different components. For example, the server also includes components such as a radio frequency circuit, an input unit, a sensor, a server, and a power supply, which will not be repeated here.

本申请提供了一种计算机可读存储介质,存储介质中存储有至少一条指令,至少一条指令由处理器加载并执行以实现上述各个方法实施例提供的chart资源的部署方法。The present application provides a computer-readable storage medium, at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the chart resource deployment method provided by the above method embodiments.

本申请还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。服务器的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该服务器执行上述实施例中任一的chart资源的部署方法。The present application also provides a computer program product or computer program, the computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the server reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the server executes the chart resource deployment method in any one of the above embodiments.

上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present application are for description only, and do not represent the advantages and disadvantages of the embodiments.

本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned embodiments can be completed by hardware, and can also be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a magnetic disk or an optical disk, etc.

以上仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are only optional embodiments of the present application, and are not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included within the protection scope of the present application.

Claims (8)

1.一种chart资源的部署方法,其特征在于,所述方法用于集群系统中的服务器,所述方法包括:1. A method for deploying chart resources, characterized in that, the method is used for a server in a cluster system, and the method includes: 响应于接收到目标chart资源的校验指令,获取所述校验指令中包含的第一终端的帐号标识以及所述目标chart资源的资源标识;In response to receiving the verification instruction of the target chart resource, acquire the account identifier of the first terminal contained in the verification instruction and the resource identifier of the target chart resource; 基于所述资源标识,从chart仓库中获取所述目标chart资源,所述chart仓库中包含有所述第一终端上传的所有chart资源;Based on the resource identifier, the target chart resource is obtained from a chart warehouse, and the chart warehouse includes all chart resources uploaded by the first terminal; 基于所述帐号标识获取所述第一终端对应的校验信息;Acquiring verification information corresponding to the first terminal based on the account identifier; 基于所述校验信息中的第一资源属性,对所述目标chart资源中的资源文件进行第一资源属性校验,所述第一资源属性为所述集群系统所支持的资源属性;Based on the first resource attribute in the verification information, perform a first resource attribute verification on the resource file in the target chart resource, where the first resource attribute is a resource attribute supported by the cluster system; 基于所述校验信息中的资源文件书写规则,对所述目标chart资源中的资源文件进行书写合规校验,所述目标chart资源是由所述第一终端上传的chart资源,不同chart资源用于实现不同chart服务;Based on the resource file writing rules in the verification information, perform writing compliance verification on the resource files in the target chart resource, the target chart resource is a chart resource uploaded by the first terminal, and different chart resources are used to implement different chart services; 响应于所述目标chart资源通过资源权限校验,将所述目标chart资源设置为可部署状态;In response to the target chart resource passing the resource permission check, setting the target chart resource to a deployable state; 响应于接收到对所述目标chart资源的部署指令,将所述目标chart资源部署至目标集群,所述目标集群包含至少一台待部署chart服务的第二终端。In response to receiving a deployment instruction for the target chart resource, deploy the target chart resource to a target cluster, where the target cluster includes at least one second terminal of the chart service to be deployed. 2.根据权利要求1所述的方法,其特征在于,所述基于所述校验信息,对所述目标chart资源进行资源权限校验,包括:2. The method according to claim 1, wherein the resource permission verification of the target chart resource based on the verification information includes: 响应于通过所述第一资源属性校验和所述书写合规校验,基于所述校验信息中的第二资源属性,对所述目标chart资源中的资源文件进行第二资源属性校验,所述第二资源属性为所述第一终端具有部署权限的资源属性;In response to passing the first resource attribute verification and the writing compliance verification, based on the second resource attribute in the verification information, perform a second resource attribute verification on the resource file in the target chart resource, the second resource attribute is a resource attribute that the first terminal has deployment authority; 基于所述校验信息中的总存储空间以及已占用存储空间,确定剩余存储空间,所述总存储空间为所述第一终端部署chart资源的最大可用空间,所述已占用存储空间为所述第一终端已部署chart资源所占用的空间;Determine the remaining storage space based on the total storage space and the occupied storage space in the verification information, the total storage space is the maximum available space for the first terminal to deploy chart resources, and the occupied storage space is the space occupied by the first terminal that has deployed chart resources; 基于所述剩余存储空间以及所述目标chart资源的目标占用空间,对所述目标chart资源中进行存储空间校验。Based on the remaining storage space and the target occupied space of the target chart resource, check the storage space in the target chart resource. 3.根据权利要求1或2所述的方法,其特征在于,所述响应于接收到对所述目标chart资源的部署指令,将所述目标chart资源部署至目标集群,包括:3. The method according to claim 1 or 2, wherein the deploying the target chart resource to the target cluster in response to receiving a deployment instruction for the target chart resource comprises: 响应于接收到对所述目标chart资源的所述部署指令,获取所述部署指令中包含的所述目标集群的集群标识以及所述目标chart资源的资源标识;In response to receiving the deployment instruction for the target chart resource, acquire the cluster identifier of the target cluster and the resource identifier of the target chart resource included in the deployment instruction; 基于所述资源标识,从chart仓库中获取所述目标chart资源;Obtaining the target chart resource from a chart warehouse based on the resource identifier; 基于所述集群标识,对所述目标chart资源的配置参数进行更新;updating configuration parameters of the target chart resource based on the cluster identifier; 对更新后的所述目标chart资源进行前置校验,所述前置校验包括对数据库配置校验、内存资源校验以及连接状态校验;Carrying out pre-verification on the updated target chart resource, the pre-verification includes database configuration verification, memory resource verification and connection status verification; 响应于通过所述前置校验,对所述目标chart资源进行前置执行;In response to passing the pre-check, perform pre-execution on the target chart resource; 响应于通过所述前置执行,将所述目标chart资源部署至所述目标集群;In response to passing the pre-execution, deploying the target chart resource to the target cluster; 其中,所述前置执行包括:对所述目标chart资源的数据库进行更新,或,对服务配置中心进行更新。Wherein, the pre-execution includes: updating the database of the target chart resource, or updating the service configuration center. 4.根据权利要求3所述的方法,其特征在于,所述基于所述集群标识,对所述目标chart资源的配置参数进行更新,包括:4. The method according to claim 3, wherein the updating the configuration parameters of the target chart resource based on the cluster identifier comprises: 基于所述集群标识,从配置中心获取所述目标集群的集群配置信息;Obtaining cluster configuration information of the target cluster from a configuration center based on the cluster identifier; 基于所述集群配置信息对所述目标chart资源的所述配置参数进行更新;updating the configuration parameters of the target chart resource based on the cluster configuration information; 所述对更新后的所述目标chart资源进行前置校验,包括:The pre-verification of the updated target chart resource includes: 基于所述集群标识,从所述配置中心获取所述目标集群的前置校验规则;Based on the cluster identifier, acquire the pre-verification rules of the target cluster from the configuration center; 基于所述前置校验规则对更新后的所述目标chart资源进行所述前置校验。The pre-check is performed on the updated target chart resource based on the pre-check rule. 5.根据权利要求1或2所述的方法,其特征在于,所述将所述目标chart资源部署至目标集群后,所述方法还包括:5. The method according to claim 1 or 2, wherein after the target chart resource is deployed to the target cluster, the method further comprises: 响应于接收到对所述目标chart资源的更新指令,获取所述更新指令中所述目标chart资源的版本信息,基于所述版本信息对所述目标chart资源进行更新。In response to receiving an update instruction for the target chart resource, acquire version information of the target chart resource in the update instruction, and update the target chart resource based on the version information. 6.一种chart资源的部署装置,其特征在于,所述装置用于集群系统中的服务器,所述装置包括:6. A device for deploying chart resources, characterized in that the device is used for servers in a cluster system, and the device includes: 校验模块,用于响应于接收到目标chart资源的校验指令,获取所述校验指令中包含的第一终端的帐号标识以及所述目标chart资源的资源标识;基于所述资源标识,从chart仓库中获取所述目标chart资源,所述chart仓库中包含有所述第一终端上传的所有chart资源;基于所述帐号标识获取所述第一终端对应的校验信息;基于所述校验信息中的第一资源属性,对所述目标chart资源中的资源文件进行第一资源属性校验,所述第一资源属性为所述集群系统所支持的资源属性;基于所述校验信息中的资源文件书写规则,对所述目标chart资源中的资源文件进行书写合规校验,所述目标chart资源是由所述第一终端上传的chart资源,且不同chart资源用于实现不同chart服务;A verification module, configured to, in response to receiving a verification instruction of a target chart resource, obtain the account identifier of the first terminal included in the verification instruction and the resource identifier of the target chart resource; based on the resource identifier, obtain the target chart resource from a chart warehouse, the chart warehouse including all chart resources uploaded by the first terminal; obtain verification information corresponding to the first terminal based on the account identifier; perform a first resource attribute verification on a resource file in the target chart resource based on a first resource attribute in the verification information, and the first resource attribute is supported by the cluster system resource attributes; based on the resource file writing rules in the verification information, writing compliance verification is performed on the resource files in the target chart resource, the target chart resource is a chart resource uploaded by the first terminal, and different chart resources are used to implement different chart services; 设置模块,用于响应于所述目标chart资源通过资源权限校验,将所述目标chart资源设置为可部署状态;A setting module, configured to set the target chart resource to a deployable state in response to the target chart resource passing the resource permission check; 部署模块,用于响应于接收到对所述目标chart资源的部署指令,将所述目标chart资源部署至目标集群,所述目标集群包含至少一台待部署chart服务的第二终端。The deployment module is configured to, in response to receiving a deployment instruction for the target chart resource, deploy the target chart resource to a target cluster, and the target cluster includes at least one second terminal of the chart service to be deployed. 7.一种服务器,其特征在于,所述服务器包括处理器和存储器;所述存储器存储有至少一条指令,所述至少一条指令用于被所述处理器执行以实现如权利要求1至5任一所述的chart资源的部署方法。7. A server, characterized in that the server comprises a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the chart resource deployment method according to any one of claims 1 to 5. 8.一种计算机可读存储介质,其特征在于,所述存储介质存储有至少一条指令,所述至少一条指令用于被处理器执行以实现如权利要求1至5任一所述的chart资源的部署方法。8. A computer-readable storage medium, wherein at least one instruction is stored in the storage medium, and the at least one instruction is used to be executed by a processor to implement the chart resource deployment method according to any one of claims 1 to 5.
CN202210049979.6A 2022-01-17 2022-01-17 Deployment method, device, server and storage medium of chart resources Expired - Fee Related CN114500268B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210049979.6A CN114500268B (en) 2022-01-17 2022-01-17 Deployment method, device, server and storage medium of chart resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210049979.6A CN114500268B (en) 2022-01-17 2022-01-17 Deployment method, device, server and storage medium of chart resources

Publications (2)

Publication Number Publication Date
CN114500268A CN114500268A (en) 2022-05-13
CN114500268B true CN114500268B (en) 2023-07-21

Family

ID=81511518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210049979.6A Expired - Fee Related CN114500268B (en) 2022-01-17 2022-01-17 Deployment method, device, server and storage medium of chart resources

Country Status (1)

Country Link
CN (1) CN114500268B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115168035A (en) * 2022-06-30 2022-10-11 北京天融信网络安全技术有限公司 System resource management method, device, equipment and medium
CN115567596B (en) * 2022-09-28 2024-08-16 建信金融科技有限责任公司 Cloud service resource deployment method, device, equipment and storage medium
CN115617389A (en) * 2022-10-27 2023-01-17 上海云轴信息科技有限公司 A method and device for publishing applications under multiple Kubernetes clusters

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008023A (en) * 2019-12-06 2020-04-14 无锡华云数据技术服务有限公司 Instance deployment method and system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108737416A (en) * 2018-05-16 2018-11-02 北京握奇智能科技有限公司 Trusted application management method and trusted application management server
US11074091B1 (en) * 2018-09-27 2021-07-27 Juniper Networks, Inc. Deployment of microservices-based network controller
US11941021B2 (en) * 2019-10-25 2024-03-26 Accenture Global Solutions Limited Automatic creation of blockchain network infrastructures
CN110753121A (en) * 2019-10-25 2020-02-04 北京浪潮数据技术有限公司 Mirror image warehouse deployment method, device, equipment and medium
CN110990025B (en) * 2019-12-06 2024-02-06 无锡华云数据技术服务有限公司 Instance deployment method and system
CN111142881B (en) * 2019-12-27 2023-10-27 浪潮云信息技术股份公司 A system and method for automated deployment of orchestrated charts based on kubernetes
US11403401B2 (en) * 2020-06-17 2022-08-02 International Business Machines Corporation Preventing unauthorized package deployment in clusters
CN112558987A (en) * 2020-12-16 2021-03-26 中盈优创资讯科技有限公司 Helm-based automatic deployment method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008023A (en) * 2019-12-06 2020-04-14 无锡华云数据技术服务有限公司 Instance deployment method and system

Also Published As

Publication number Publication date
CN114500268A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
CN114500268B (en) Deployment method, device, server and storage medium of chart resources
WO2022170801A1 (en) Ios application program construction method and apparatus, electronic device, and storage medium
US10411961B2 (en) Image management in cloud environments
CN103226493B (en) The dispositions method and system of multi-operation system service
WO2021022713A1 (en) Distributed module update method, device, and storage medium
CN110673923A (en) XWIKI system configuration method, system and computer equipment
CN111984269A (en) Method for providing application construction service and application construction platform
US20190303213A1 (en) Orchestrator and console agnostic method to deploy infrastructure through self-describing deployment templates
CN109240716B (en) Big data platform version management and rapid iterative deployment method and system
CN113687858B (en) Configuration file checking method and device, electronic equipment and storage medium
CN115129348A (en) Resource updating method, device and equipment of application program and readable storage medium
US12112154B2 (en) Automated software deployment techniques
CN116225617A (en) Management migration method and device for container instance, electronic equipment and storage medium
US12039473B2 (en) Software development project infrastructure builder tool
CN113326052B (en) Business component upgrade method, device, computer equipment and storage medium
CN106406980B (en) A kind of dispositions method and device of virtual machine
CN117112122A (en) Cluster deployment method and device
CN120856710A (en) Application resource processing methods, devices, cloud platforms, media and products
CN118092982B (en) Multi-cluster operation and maintenance method, equipment and medium for cloud native application
CN118012453B (en) Software deployment method, device, electronic device, storage medium and program product
CN117170916B (en) Fault analysis method, device, equipment and storage medium
CN113806007A (en) Disk mounting method, device, storage medium and electronic device
CN118626207A (en) A method and device for uniformly deploying container applications and non-container applications based on Kubernetes
US20230259347A1 (en) Container based generation of inputs for generic functions
CN120104152A (en) Method, device, computer equipment and storage medium for updating shared components

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20230721