WO2021098392A1 - Application deployment method and apparatus, electronic device and storage medium - Google Patents

Application deployment method and apparatus, electronic device and storage medium Download PDF

Info

Publication number
WO2021098392A1
WO2021098392A1 PCT/CN2020/119215 CN2020119215W WO2021098392A1 WO 2021098392 A1 WO2021098392 A1 WO 2021098392A1 CN 2020119215 W CN2020119215 W CN 2020119215W WO 2021098392 A1 WO2021098392 A1 WO 2021098392A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
helm
deployment
deployed
collective
Prior art date
Application number
PCT/CN2020/119215
Other languages
French (fr)
Chinese (zh)
Inventor
琚汝强
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021098392A1 publication Critical patent/WO2021098392A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment

Definitions

  • This application relates to the field of computer technology, and in particular to an application deployment method, device, electronic equipment, and storage medium.
  • This application provides an application deployment method, device, electronic equipment, and storage medium.
  • This application also provides an application deployment method, which includes:
  • each Helm application template containing information about the corresponding Docker image
  • This application also provides an application deployment device, which includes:
  • the first obtaining module is used to obtain multiple Docker images packaged by the executable programs of multiple applications to be deployed;
  • the first saving module is used to save the multiple Docker images to the Docker image warehouse
  • the second obtaining module is configured to obtain multiple Helm application templates corresponding to the multiple applications to be deployed selected by the user on the client, and each Helm application template contains information about the corresponding Docker image;
  • the second saving module is used to save the plurality of Helm application templates to the application template warehouse
  • a creation module configured to obtain collective deployment task information for the multiple Helm application templates, and create a collective deployment task according to the collective deployment task information;
  • the processing module is configured to receive a deployment instruction for executing the collective deployment task, and call Helm CLI based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the kube-apiserver in the Kubernetes cluster calls Helm's Tiller, the Tiller Deploy the multiple applications to be deployed based on the Helm application template and the Docker image in the application template warehouse.
  • the present application also provides an electronic device that includes a memory and a processor, the memory stores an application deployment program that can run on the processor, and the application deployment program is executed when the processor is executed The following steps:
  • each Helm application template containing information about the corresponding Docker image
  • the present application also provides a computer-readable storage medium having an application deployment program stored on the computer-readable storage medium, and the application deployment program may be executed by one or more processors to implement the following steps:
  • each Helm application template containing information about the corresponding Docker image
  • FIG. 1 is a schematic flowchart of an application deployment method provided by an embodiment of this application
  • FIG. 2 is a schematic diagram of the internal structure of an electronic device provided by an embodiment of the application.
  • FIG. 3 is a schematic diagram of modules of an application deployment apparatus provided by an embodiment of the application.
  • This application provides an application deployment method.
  • FIG. 1 it is a schematic flowchart of an application deployment method provided by an embodiment of this application. The method can be executed by an electronic device.
  • the application deployment method includes:
  • Step S11 Obtain multiple Docker images packaged by multiple executable programs of applications to be deployed.
  • the application to be deployed refers to an application to be deployed in Kubernetes, and the number of the multiple applications to be deployed is at least two.
  • the Docker image is a read-only template, an independent file system, including the data required to run the container, which can be used to create a new container.
  • the obtaining multiple Docker images packaged by executable programs of multiple applications to be deployed includes:
  • the source code of the multiple applications to be deployed passes the quality inspection, the source code of the multiple applications to be deployed is compiled and the multiple executable programs obtained after the compilation are packaged into multiple Docker images.
  • the code warehouse may be a system capable of code management such as Github and Gitlab.
  • the source code may be quality checked by a third-party code checking tool such as SonarQube, so as to avoid large quality defects in the deployed application.
  • a third-party code checking tool such as SonarQube
  • the source code of the application to be deployed is not compiled. For example, if there are 5 applications to be deployed, the source code of these 5 applications to be deployed is tested for quality. If all pass the quality inspection, the source code of these 5 applications to be deployed is compiled, and the 5 obtained after compilation The executable program is packaged into 5 Docker images; if the source code of the 5 applications to be deployed is checked for quality, the source code of 2 applications to be deployed fails the quality inspection, then the other 3 applications to be deployed that pass the quality inspection Compile the source code of, and package the 3 executable programs obtained after compilation into 3 Docker images.
  • Docker when the Docker image is packaged and generated, Docker can be packaged and generated based on the Dockerfile.
  • the user writes or modifies the source code of multiple applications to be deployed through the integrated development environment of the application deployment platform, and compiles the source code through the integrated development environment to obtain an executable program, which is packaged into a Docker image.
  • Step S12 Save the multiple Docker images in the Docker image warehouse.
  • the structure of the Docker image is: the bottom end of the Docker image is a file boot system, namely bootfs.
  • the second layer of the Docker image is the root file system rootfs, which is usually one or more operating systems, such as ubuntu.
  • the file system is always read-only, and every time it is modified, it is copied and superimposed to form the final file system. Docker calls such files an image.
  • One mirror can be iterated on top of another mirror. The mirror at the bottom is called the parent mirror, and the mirror at the bottom is called the base mirror.
  • Docker will load a read-write file system at the top level as the container.
  • the Docker image warehouse is used to store the Docker image of the application to be deployed.
  • saving the multiple Docker images in the Docker mirror warehouse includes: acquiring the address of the Docker mirror warehouse, and saving the multiple Docker images in the Docker mirror warehouse based on the acquired address of the Docker mirror warehouse .
  • Step S13 Obtain multiple Helm application templates corresponding to the multiple applications to be deployed selected by the user on the client, and each Helm application template contains information about the corresponding Docker image.
  • the client provides a window for interaction.
  • the client is a client of an application deployment platform. For example, multiple application templates corresponding to multiple applications to be deployed selected in the webpage of the browser are obtained.
  • the Helm application template is also called a Helm package, or a chart.
  • a Helm application template contains images, dependencies, and resource definitions required to run an application, and can also contain service definitions in the Kubernetes cluster.
  • Helm application templates are written in Go template language, and the values of the template are recorded in the values.yaml file.
  • the Helm application template corresponding to the application to be deployed includes images, dependencies, and resource definitions required to run the application to be deployed.
  • Each Helm application template contains the information of the corresponding Docker image, that is, each Helm application template contains the image name, image version and other information of the corresponding Docker image.
  • the number of Helm application templates corresponding to the application to be deployed can be less than 5, for example, there are 5 applications to be deployed, and the Helm corresponding to the application to be deployed is obtained.
  • the acquiring multiple Helm application templates selected by the user on the client side and corresponding to the multiple applications to be deployed includes:
  • the application template warehouse contains preset application templates.
  • the preset application templates are common applications or middleware application templates provided by public cloud vendors, such as Redis/Zookeeper/RabbitMQ/Eureka, etc.
  • the selectable preset application template is displayed on the webpage of the browser, and the preset application template selected by the user is determined to be the Helm application template corresponding to the application to be deployed.
  • the application template of the application to be deployed can be quickly obtained, thereby facilitating the rapid deployment of the application to be deployed.
  • the acquiring multiple Helm application templates selected by the user on the client side and corresponding to the multiple applications to be deployed includes:
  • the multiple application templates obtained after the modification are Helm application templates corresponding to the application to be deployed.
  • the user can copy an existing public template for modification, thereby generating a private application template. For example, modify the image name.
  • the private application template can be saved persistently and is only available to the user. Or, the user can set the private template to be shared with other users.
  • Step S14 Save the multiple Helm application templates to the application template warehouse.
  • the application template warehouse may store public application templates and private application templates.
  • Step S15 Obtain collective deployment task information for the multiple Helm application templates, and create a collective deployment task according to the collective deployment task information.
  • the deployment task includes, but is not limited to, the application template name, template version number, and information about the cluster to which it will be deployed.
  • the collective deployment task includes each Helm application template, each template version number, and information about each cluster to be deployed (such as the cluster name).
  • the collective deployment task information includes deployment information of these 5 applications to be deployed respectively, and the created collective deployment task can be used to deploy these 5 applications to be deployed.
  • the deployment information of the two applications is deployed.
  • the collective deployment task information is information input by the user on the web page of the browser, such as application template name, template version number, cluster name, etc.
  • the acquisition of collective deployment task information for the multiple Helm application templates includes:
  • Step S16 receiving a deployment instruction for executing the collective deployment task, and calling Helm CLI based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the kube-apiserver in the Kubernetes cluster calls Helm's Tiller, which is based on the The Helm application template and the Docker image in the application template warehouse deploy the multiple applications to be deployed.
  • the Helm CLI is the client of Helm
  • the Tiller is the server of Helm
  • the Tiller runs in a Kubernetes cluster.
  • the applications to be deployed are deployed concurrently.
  • the application deployment method further includes:
  • the deployment progress is displayed as 3/5, it means that there are 5 deployments and 3 deployments have been completed.
  • a deployment list is displayed through a web page, and the deployment list includes completed deployment tasks. Conducive to quickly and easily understand the deployment progress and deployment status.
  • the application deployment method proposed in this embodiment obtains multiple Docker images packaged by the executable programs of multiple applications to be deployed; saves the multiple Docker images in the Docker mirror warehouse;
  • the collective deployment task information is created based on the collective deployment task information; the deployment instruction for executing the collective deployment task is received, and Helm CLI is called based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the Kubernetes cluster
  • the kube-apiserver in, calls Tiller of Helm, and the Tiller deploys the multiple applications to be deployed based on the Helm application template and the Docker image in the application template repository.
  • the Helm application template is a template that packs the resources required to run the application, this The form makes the files of each application to be deployed are unified and well managed, which is conducive to the rapid deployment of rapid applications; and by combining multiple applications to be deployed into a deployment task for deployment, there is no need to deploy each application to be deployed separately, which further improves The speed of deployment achieves the goal of improving the efficiency of deploying multiple applications.
  • the application also provides an electronic device.
  • FIG. 2 it is a schematic diagram of the internal structure of an electronic device provided by an embodiment of this application.
  • the electronic device 1 may be a PC (Personal Computer, personal computer), or a terminal device such as a smart phone, a tablet computer, or a portable computer.
  • the electronic device 1 at least includes a memory 11, a processor 12, a network interface 13, and a communication bus 14.
  • the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, and the like.
  • the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), or a secure digital (Secure Digital, SD) equipped on the electronic device 1. Flash memory card Card) and so on. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
  • the memory 11 can be used not only to store application software and various data installed in the electronic device 1, such as the code of the application deployment program 01, etc., but also to temporarily store data that has been output or will be output.
  • the processor 12 may be a central processing unit (Central Processing Unit) in some embodiments.
  • Central Processing Unit CPU
  • controller a controller
  • microcontroller a microprocessor
  • other data processing chips are used to run program codes or process data stored in the memory 11, such as executing application deployment program 01.
  • the network interface 13 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface), and is usually used to establish a communication connection between the electronic device 1 and other electronic devices.
  • a standard wired interface and a wireless interface such as a WI-FI interface
  • the communication bus 14 is used to realize the connection and communication between these components.
  • the electronic device 1 may further include a user interface.
  • the user interface may include a display (Display) and an input unit such as a keyboard (Keyboard).
  • the optional user interface may also include a standard wired interface and a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device and so on.
  • the display can also be appropriately called a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visualized user interface.
  • FIG. 2 only shows the electronic device 1 with components 11-14 and the application deployment program 01. Those skilled in the art can understand that the structure shown in FIG. 2 does not constitute a limitation on the electronic device 1, and may include a comparison diagram Show fewer or more components, or combinations of certain components, or different component arrangements.
  • the application deployment program 01 is stored in the memory 11; when the processor 12 executes the application deployment program 01 stored in the memory 11, the following steps are implemented:
  • the application to be deployed refers to an application to be deployed in Kubernetes, and the number of the multiple applications to be deployed is at least two.
  • the Docker image is a read-only template, an independent file system, including the data required to run the container, which can be used to create a new container.
  • the obtaining multiple Docker images packaged by executable programs of multiple applications to be deployed includes:
  • the source code of the multiple applications to be deployed passes the quality inspection, the source code of the multiple applications to be deployed is compiled and the multiple executable programs obtained after the compilation are packaged into multiple Docker images.
  • the code warehouse may be a system capable of code management such as Github and Gitlab.
  • the source code may be quality checked by a third-party code checking tool such as SonarQube, so as to avoid large quality defects in the deployed application.
  • a third-party code checking tool such as SonarQube
  • the source code of the application to be deployed is not compiled. For example, if there are 5 applications to be deployed, the source code of these 5 applications to be deployed is tested for quality. If all pass the quality inspection, the source code of these 5 applications to be deployed is compiled, and the 5 obtained after compilation The executable program is packaged into 5 Docker images; if after the quality inspection of the source code of the 5 applications to be deployed, the source code of 2 applications to be deployed fails the quality inspection, then the other 3 applications to be deployed that pass the quality inspection Compile the source code of, and package the 3 executable programs obtained after compilation into 3 Docker images.
  • Docker when the Docker image is packaged and generated, Docker can be packaged and generated based on the Dockerfile.
  • the user writes or modifies the source code of multiple applications to be deployed through the integrated development environment of the application deployment platform, and compiles the source code through the integrated development environment to obtain an executable program, which is packaged into a Docker image.
  • the structure of the Docker image is: the bottom end of the Docker image is a file boot system, namely bootfs.
  • the second layer of the Docker image is the root file system rootfs, which is usually one or more operating systems, such as ubuntu.
  • the file system is always read-only, and every time it is modified, it is copied and superimposed to form the final file system. Docker calls such files an image.
  • One mirror can be iterated on top of another mirror. The mirror at the bottom is called the parent mirror, and the mirror at the bottom is called the base mirror.
  • Docker will load a read-write file system at the top level as the container.
  • the Docker image warehouse is used to store the Docker image of the application to be deployed.
  • saving the multiple Docker images in the Docker mirror warehouse includes: acquiring the address of the Docker mirror warehouse, and saving the multiple Docker images in the Docker mirror warehouse based on the acquired address of the Docker mirror warehouse .
  • each Helm application template includes information about a corresponding Docker image.
  • the client provides a window for interaction.
  • the client is a client of an application deployment platform. For example, multiple application templates corresponding to multiple applications to be deployed selected in the webpage of the browser are obtained.
  • the Helm application template is also called a Helm package, or a chart.
  • a Helm application template contains images, dependencies, and resource definitions required to run an application, and can also contain service definitions in the Kubernetes cluster.
  • Helm application templates are written in Go template language, and the values of the template are recorded in the values.yaml file.
  • the Helm application template corresponding to the application to be deployed includes images, dependencies, and resource definitions required to run the application to be deployed.
  • Each Helm application template contains the information of the corresponding Docker image, that is, each Helm application template contains the image name, image version and other information of the corresponding Docker image.
  • the number of Helm application templates corresponding to the application to be deployed can be less than 5, for example, there are 5 applications to be deployed, and the Helm corresponding to the application to be deployed is obtained.
  • the acquiring multiple Helm application templates selected by the user on the client side and corresponding to the multiple applications to be deployed includes:
  • the application template warehouse contains preset application templates.
  • the preset application templates are common applications or middleware application templates provided by public cloud vendors, such as Redis/Zookeeper/RabbitMQ/Eureka, etc.
  • the selectable preset application template is displayed on the webpage of the browser, and the preset application template selected by the user is determined to be the Helm application template corresponding to the application to be deployed.
  • the application template of the application to be deployed can be quickly obtained, thereby facilitating the rapid deployment of the application to be deployed.
  • the acquiring multiple Helm application templates selected by the user on the client side and corresponding to the multiple applications to be deployed includes:
  • the multiple application templates obtained after the modification are Helm application templates corresponding to the application to be deployed.
  • the user can copy an existing public template for modification, thereby generating a private application template. For example, modify the image name.
  • the private application template can be saved persistently and is only available to the user. Or, the user can set the private template to be shared with other users.
  • the application template warehouse may store public application templates and private application templates.
  • the deployment task includes, but is not limited to, the application template name, template version number, and information about the cluster to which it will be deployed.
  • the collective deployment task includes each Helm application template, each template version number, and information about each cluster to be deployed (such as the cluster name).
  • the collective deployment task information includes deployment information of these 5 applications to be deployed respectively, and the created collective deployment task can be used to deploy these 5 applications to be deployed.
  • the deployment information of the two applications is deployed.
  • the collective deployment task information is information input by the user on the web page of the browser, such as application template name, template version number, cluster name, etc.
  • the acquisition of collective deployment task information for the multiple Helm application templates includes:
  • the Helm CLI is the client of Helm
  • the Tiller is the server of Helm
  • the Tiller runs in a Kubernetes cluster.
  • the applications to be deployed are deployed concurrently.
  • the application deployment method further includes:
  • the deployment progress is displayed as 3/5, it means that there are 5 deployments and 3 deployments have been completed.
  • a deployment list is displayed through a web page, and the deployment list includes completed deployment tasks. Conducive to quickly and easily understand the deployment progress and deployment status.
  • the application deployment device proposed in this embodiment obtains multiple Docker images packaged by the executable programs of multiple applications to be deployed; saves the multiple Docker images in the Docker mirror warehouse; obtains the information selected by the user on the client
  • the collective deployment task information is created based on the collective deployment task information; the deployment instruction for executing the collective deployment task is received, and Helm CLI is called based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the Kubernetes cluster
  • the kube-apiserver in, calls Tiller of Helm, and the Tiller deploys the multiple applications to be deployed based on the Helm application template and the Docker image in the application template repository.
  • the Helm application template is a template that packs the resources required to run the application, this The form makes the files of each application to be deployed are unified and well managed, which is conducive to the rapid deployment of rapid applications; and by combining multiple applications to be deployed into a deployment task for deployment, there is no need to deploy each application to be deployed separately, which further improves The speed of deployment achieves the goal of improving the efficiency of deploying multiple applications.
  • the application deployment apparatus includes a first acquisition module 10, a first storage module 20, a second acquisition module 30, and a second storage module. 40.
  • the creation module 50 and the processing module 60 exemplarily:
  • the first obtaining module 10 is used to: obtain multiple Docker images packaged by executable programs of multiple applications to be deployed;
  • the first saving module 20 is used to: save the multiple Docker images to the Docker image warehouse;
  • the second obtaining module 30 is configured to obtain a plurality of Helm application templates corresponding to the plurality of applications to be deployed selected by the user on the client, and each Helm application template includes information of a corresponding Docker image;
  • the second saving module 40 is configured to: save the plurality of Helm application templates to the application template warehouse;
  • the creation module 50 is configured to obtain collective deployment task information for the plurality of Helm application templates, and create a collective deployment task according to the collective deployment task information;
  • the processing module 60 is configured to receive a deployment instruction for executing the collective deployment task, and call Helm CLI based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the kube-apiserver in the Kubernetes cluster calls Helm's Tiller. Tiller deploys the multiple applications to be deployed based on the Helm application template and the Docker image in the application template warehouse.
  • the embodiment of the present application also proposes a computer-readable storage medium, the computer-readable storage medium may be non-volatile or volatile, and the computer-readable storage medium stores an application deployment program,
  • the application deployment program may be executed by one or more processors to implement the following operations:
  • each Helm application template containing information about the corresponding Docker image

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

An application deployment method. The method comprises: acquiring a plurality of Docker images obtained by packaging executable programs of a plurality of applications to be deployed (S11); storing the plurality of Docker images into a Docker image warehouse (S12); acquiring a plurality of Helm application templates, selected by a user at a client, corresponding to the plurality of said applications, each Helm application template containing information of a corresponding Docker image (S13); storing the plurality of Helm application templates into an application template warehouse (S14); acquiring collective deployment task information of the plurality of Helm application templates, and creating a collective deployment task according to the collective deployment task information (S15); and receiving a deployment instruction for executing the collective deployment task; invoking a Helm CLI on the basis of the deployment instruction to send a deployment request to a Kubernetes cluster, a kube-apiserver in the Kubernetes cluster invoking a Tiller of the Helm, and the Tiller deploying the plurality of said applications on the basis of the Helm application template and the Docker images in the application template warehouse (S16). Also disclosed are an application deployment apparatus and a computer-readable storage medium, which can increase the efficiency of deploying a plurality of applications.

Description

应用部署方法、装置、电子设备及存储介质Application deployment method, device, electronic equipment and storage medium
本申请要求于2019年11月19日提交中国专利局、申请号为CN201911139848.1,发明名称为“应用部署方法、装置及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on November 19, 2019, the application number is CN201911139848.1, and the invention title is "application deployment method, device and computer-readable storage medium". The entire content of the application is approved The reference is incorporated in this application.
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种应用部署方法、装置、电子设备及存储介质。This application relates to the field of computer technology, and in particular to an application deployment method, device, electronic equipment, and storage medium.
背景技术Background technique
随着业务容器化以及系统架构向微服务架构转变,将巨大的单体应用分解为多个服务的方式已成为一种开发趋势,这种方式分解了单体应用的复杂性,使每个微服务都可以独立部署和扩展,有利于敏捷开发和快速迭代。With the containerization of business and the transformation of system architecture to microservice architecture, it has become a development trend to decompose huge monolithic applications into multiple services. This approach decomposes the complexity of monolithic applications and makes each microservice Services can be deployed and expanded independently, which is conducive to agile development and rapid iteration.
技术问题technical problem
发明人意识到在将巨大的单体应用分解为多个服务时,由于应用被拆分成多个服务(或组件),导致服务数量大幅增加,而每个服务通常有自己的资源文件,因此在部署时需要管理、编辑、安装每个服务所需的各种文件(镜像、依赖等),这使得目前在做较多数量的服务部署时效率不高。The inventor realized that when a huge monolithic application was decomposed into multiple services, the number of services increased greatly due to the application being split into multiple services (or components), and each service usually had its own resource file, so During deployment, it is necessary to manage, edit, and install various files (images, dependencies, etc.) required by each service, which makes it inefficient when deploying a large number of services.
技术解决方案Technical solutions
本申请提供一种应用部署方法、装置、电子设备及存储介质。This application provides an application deployment method, device, electronic equipment, and storage medium.
本申请还提供一种应用部署方法,该方法包括:This application also provides an application deployment method, which includes:
获取由多个待部署应用的可执行程序打包得到的多个Docker镜像;Obtain multiple Docker images packaged by the executable programs of multiple applications to be deployed;
将所述多个Docker镜像保存至Docker镜像仓库;Save the multiple Docker images to the Docker image warehouse;
获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板,每个Helm应用模板包含对应的Docker镜像的信息;Acquiring multiple Helm application templates corresponding to the multiple applications to be deployed selected by the user on the client, each Helm application template containing information about the corresponding Docker image;
将所述多个Helm应用模板保存至应用模板仓库;Saving the multiple Helm application templates to the application template warehouse;
获取对所述多个Helm应用模板的集合部署任务信息,根据所述集合部署任务信息创建集合部署任务;Acquiring collective deployment task information for the plurality of Helm application templates, and creating a collective deployment task according to the collective deployment task information;
接收执行所述集合部署任务的部署指令,基于所述部署指令调用Helm CLI向Kubernetes集群发送部署请求,以使所述Kubernetes集群中的kube-apiserver调用Helm的Tiller,所述Tiller基于所述应用模板仓库中的所述Helm应用模板和所述Docker镜像对所述多个待部署应用进行部署。Receive a deployment instruction for executing the collective deployment task, and call Helm CLI based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the kube-apiserver in the Kubernetes cluster calls Helm's Tiller, which is based on the application template The Helm application template and the Docker image in the warehouse deploy the multiple applications to be deployed.
本申请还提供一种应用部署装置,该装置包括:This application also provides an application deployment device, which includes:
第一获取模块,用于获取由多个待部署应用的可执行程序打包得到的多个Docker镜像;The first obtaining module is used to obtain multiple Docker images packaged by the executable programs of multiple applications to be deployed;
第一保存模块,用于将所述多个Docker镜像保存至Docker镜像仓库;The first saving module is used to save the multiple Docker images to the Docker image warehouse;
第二获取模块,用于获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板,每个Helm应用模板包含对应的Docker镜像的信息;The second obtaining module is configured to obtain multiple Helm application templates corresponding to the multiple applications to be deployed selected by the user on the client, and each Helm application template contains information about the corresponding Docker image;
第二保存模块,用于将所述多个Helm应用模板保存至应用模板仓库;The second saving module is used to save the plurality of Helm application templates to the application template warehouse;
创建模块,用于获取对所述多个Helm应用模板的集合部署任务信息,根据所述集合部署任务信息创建集合部署任务;A creation module, configured to obtain collective deployment task information for the multiple Helm application templates, and create a collective deployment task according to the collective deployment task information;
处理模块,用于接收执行所述集合部署任务的部署指令,基于所述部署指令调用Helm CLI向Kubernetes集群发送部署请求,以使所述Kubernetes集群中的kube-apiserver调用Helm的Tiller,所述Tiller基于所述应用模板仓库中的所述Helm应用模板和所述Docker镜像对所述多个待部署应用进行部署。The processing module is configured to receive a deployment instruction for executing the collective deployment task, and call Helm CLI based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the kube-apiserver in the Kubernetes cluster calls Helm's Tiller, the Tiller Deploy the multiple applications to be deployed based on the Helm application template and the Docker image in the application template warehouse.
本申请还提供一种电子设备,该电子设备包括存储器和处理器,所述存储器中存储有可在所述处理器上运行的应用部署程序,所述应用部署程序被所述处理器执行时实现如下步骤:The present application also provides an electronic device that includes a memory and a processor, the memory stores an application deployment program that can run on the processor, and the application deployment program is executed when the processor is executed The following steps:
获取由多个待部署应用的可执行程序打包得到的多个Docker镜像;Obtain multiple Docker images packaged by the executable programs of multiple applications to be deployed;
将所述多个Docker镜像保存至Docker镜像仓库;Save the multiple Docker images to the Docker image warehouse;
获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板,每个Helm应用模板包含对应的Docker镜像的信息;Acquiring multiple Helm application templates corresponding to the multiple applications to be deployed selected by the user on the client, each Helm application template containing information about the corresponding Docker image;
将所述多个Helm应用模板保存至应用模板仓库;Saving the multiple Helm application templates to the application template warehouse;
获取对所述多个Helm应用模板的集合部署任务信息,根据所述集合部署任务信息创建集合部署任务;Acquiring collective deployment task information for the plurality of Helm application templates, and creating a collective deployment task according to the collective deployment task information;
接收执行所述集合部署任务的部署指令,基于所述部署指令调用Helm CLI向Kubernetes集群发送部署请求,以使所述Kubernetes集群中的kube-apiserver调用Helm的Tiller,所述Tiller基于所述应用模板仓库中的所述Helm应用模板和所述Docker镜像对所述多个待部署应用进行部署。Receive a deployment instruction for executing the collective deployment task, and call Helm CLI based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the kube-apiserver in the Kubernetes cluster calls Helm's Tiller, which is based on the application template The Helm application template and the Docker image in the warehouse deploy the multiple applications to be deployed.
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有应用部署程序,所述应用部署程序可被一个或者多个处理器执行,以实现如下步骤:The present application also provides a computer-readable storage medium having an application deployment program stored on the computer-readable storage medium, and the application deployment program may be executed by one or more processors to implement the following steps:
获取由多个待部署应用的可执行程序打包得到的多个Docker镜像;Obtain multiple Docker images packaged by the executable programs of multiple applications to be deployed;
将所述多个Docker镜像保存至Docker镜像仓库;Save the multiple Docker images to the Docker image warehouse;
获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板,每个Helm应用模板包含对应的Docker镜像的信息;Acquiring multiple Helm application templates corresponding to the multiple applications to be deployed selected by the user on the client, each Helm application template containing information about the corresponding Docker image;
将所述多个Helm应用模板保存至应用模板仓库;Saving the multiple Helm application templates to the application template warehouse;
获取对所述多个Helm应用模板的集合部署任务信息,根据所述集合部署任务信息创建集合部署任务;Acquiring collective deployment task information for the plurality of Helm application templates, and creating a collective deployment task according to the collective deployment task information;
接收执行所述集合部署任务的部署指令,基于所述部署指令调用Helm CLI向Kubernetes集群发送部署请求,以使所述Kubernetes集群中的kube-apiserver调用Helm的Tiller,所述Tiller基于所述应用模板仓库中的所述Helm应用模板和所述Docker镜像对所述多个待部署应用进行部署。Receive a deployment instruction for executing the collective deployment task, and call Helm CLI based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the kube-apiserver in the Kubernetes cluster calls Helm's Tiller, which is based on the application template The Helm application template and the Docker image in the warehouse deploy the multiple applications to be deployed.
附图说明Description of the drawings
图1为本申请一实施例提供的应用部署方法的流程示意图;FIG. 1 is a schematic flowchart of an application deployment method provided by an embodiment of this application;
图2为本申请一实施例提供的电子设备的内部结构示意图;2 is a schematic diagram of the internal structure of an electronic device provided by an embodiment of the application;
图3为本申请一实施例提供的应用部署装置的模块示意图。FIG. 3 is a schematic diagram of modules of an application deployment apparatus provided by an embodiment of the application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics, and advantages of the purpose of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
本发明的实施方式Embodiments of the present invention
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the application, and not used to limit the application.
本申请提供一种应用部署方法。参照图1所示,为本申请一实施例提供的应用部署方法的流程示意图。该方法可以由一个电子装置执行。This application provides an application deployment method. Referring to FIG. 1, it is a schematic flowchart of an application deployment method provided by an embodiment of this application. The method can be executed by an electronic device.
在本实施例中,应用部署方法包括:In this embodiment, the application deployment method includes:
步骤S11,获取由多个待部署应用的可执行程序打包得到的多个Docker镜像。Step S11: Obtain multiple Docker images packaged by multiple executable programs of applications to be deployed.
本实施例中,所述待部署应用是指要部署到Kubernetes中的应用,所述多个待部署应用的数量为至少两个。In this embodiment, the application to be deployed refers to an application to be deployed in Kubernetes, and the number of the multiple applications to be deployed is at least two.
Docker镜像是一个只读的模板,一个独立的文件系统,包括运行容器所需的数据,可以用来创建新的容器。The Docker image is a read-only template, an independent file system, including the data required to run the container, which can be used to create a new container.
可选的,在本申请另一实施例中,所述获取由多个待部署应用的可执行程序打包得到的多个Docker镜像包括:Optionally, in another embodiment of the present application, the obtaining multiple Docker images packaged by executable programs of multiple applications to be deployed includes:
若检测到向代码仓库提交所述多个待部署应用的源码的提交指令,对所述多个待部署应用的源码进行质量检测;If a submission instruction for submitting the source code of the multiple applications to be deployed to the code repository is detected, quality inspection is performed on the source code of the multiple applications to be deployed;
若所述多个待部署应用的源码通过所述质量检测,对所述多个待部署应用的源码进行编译并将编译后得到的多个可执行程序打包成多个Docker镜像。If the source code of the multiple applications to be deployed passes the quality inspection, the source code of the multiple applications to be deployed is compiled and the multiple executable programs obtained after the compilation are packaged into multiple Docker images.
所述代码仓库可以是Github、Gitlab等可以进行代码管理的系统。The code warehouse may be a system capable of code management such as Github and Gitlab.
一种可选实施例中,可以通过SonarQube等第三方代码检测工具对源码进行质量检测,从而避免部署的应用存在较大的质量缺陷。In an optional embodiment, the source code may be quality checked by a third-party code checking tool such as SonarQube, so as to avoid large quality defects in the deployed application.
当对多个待部署应用的源码进行质量检测时,若存在没有通过质量检测的待部署应用的源码,则不对该待部署应用的源码进行编译。例如,若有5个待部署应用,对这5个待部署应用的源码进行质量检测,若都通过质量检测,则对这5个待部署应用的源码进行编译,并将编译后得到的5个可执行程序打包成5个Docker镜像;若对这5个待部署应用的源码进行质量检测之后,存在2个待部署应用的源码未通过质量检测,则对其他3个通过质量检测的待部署应用的源码进行编译,并将编译后得到的3个可执行程序打包成3个Docker镜像。When performing quality inspection on the source code of multiple applications to be deployed, if there is a source code of the application to be deployed that has not passed the quality inspection, the source code of the application to be deployed is not compiled. For example, if there are 5 applications to be deployed, the source code of these 5 applications to be deployed is tested for quality. If all pass the quality inspection, the source code of these 5 applications to be deployed is compiled, and the 5 obtained after compilation The executable program is packaged into 5 Docker images; if the source code of the 5 applications to be deployed is checked for quality, the source code of 2 applications to be deployed fails the quality inspection, then the other 3 applications to be deployed that pass the quality inspection Compile the source code of, and package the 3 executable programs obtained after compilation into 3 Docker images.
本实施例中,在打包生成Docker镜像时,可以基于Dockerfile来打包生成Docker。In this embodiment, when the Docker image is packaged and generated, Docker can be packaged and generated based on the Dockerfile.
在本申请另一实施例中,用户通过应用部署平台的集成开发环境编写或修改多个待部署应用的源码,以及通过集成开发环境编译源码得到可执行程序,并打包成Docker镜像。获取用户在应用部署平台的客户端配置的Docker镜像的路径,进而通过该Docker镜像的路径获取该Docker镜像。In another embodiment of the present application, the user writes or modifies the source code of multiple applications to be deployed through the integrated development environment of the application deployment platform, and compiles the source code through the integrated development environment to obtain an executable program, which is packaged into a Docker image. Obtain the path of the Docker image configured by the user on the client side of the application deployment platform, and then obtain the Docker image through the path of the Docker image.
步骤S12,将所述多个Docker镜像保存至Docker镜像仓库。Step S12: Save the multiple Docker images in the Docker image warehouse.
Docker镜像的结构是:Docker镜像的最底端是一个文件引导系统,即bootfs。Docker镜像的第二层是root文件系统rootfs,通常是一种或多种操作系统,例如ubuntu等。在Docker中,文件系统永远都是只读的,在每次修改时,都是进行拷贝叠加从而形成最终的文件系统。Docker称这样的文件为镜像。一个镜像可以迭代在另一个镜像的顶部。位于下方的镜像称之为父镜像,最底层的镜像称之为基础镜像。最后,当从一个镜像启动容器时,Docker会在最顶层加载一个读写文件系统作为容器。The structure of the Docker image is: the bottom end of the Docker image is a file boot system, namely bootfs. The second layer of the Docker image is the root file system rootfs, which is usually one or more operating systems, such as ubuntu. In Docker, the file system is always read-only, and every time it is modified, it is copied and superimposed to form the final file system. Docker calls such files an image. One mirror can be iterated on top of another mirror. The mirror at the bottom is called the parent mirror, and the mirror at the bottom is called the base mirror. Finally, when starting a container from an image, Docker will load a read-write file system at the top level as the container.
本实施例中,所述Docker镜像仓库用于保存待部署应用的Docker镜像。In this embodiment, the Docker image warehouse is used to store the Docker image of the application to be deployed.
一种可选实施例中,将所述多个Docker镜像保存至Docker镜像仓库包括:获取Docker镜像仓库的地址,基于获取到的Docker镜像仓库的地址将所述多个Docker镜像保存至Docker镜像仓库。In an optional embodiment, saving the multiple Docker images in the Docker mirror warehouse includes: acquiring the address of the Docker mirror warehouse, and saving the multiple Docker images in the Docker mirror warehouse based on the acquired address of the Docker mirror warehouse .
步骤S13,获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板,每个Helm应用模板包含对应的Docker镜像的信息。Step S13: Obtain multiple Helm application templates corresponding to the multiple applications to be deployed selected by the user on the client, and each Helm application template contains information about the corresponding Docker image.
本实施例中,客户端提供可供进行交互的窗口。In this embodiment, the client provides a window for interaction.
一种可选实施例中,所述客户端是应用部署平台的客户端。例如,获取在浏览器的网页中选取的与多个待部署应用对应的多个应用模板。In an optional embodiment, the client is a client of an application deployment platform. For example, multiple application templates corresponding to multiple applications to be deployed selected in the webpage of the browser are obtained.
本实施例中,Helm应用模板又称为Helm包,也可称为一个chart,一个Helm应用模板包含了运行一个应用所需要的镜像、依赖和资源定义等,还可以包含Kubernetes集群中的服务定义。Helm应用模板采用go模板语言编写 Go template language,模板的值记录在values.yaml文件中。In this embodiment, the Helm application template is also called a Helm package, or a chart. A Helm application template contains images, dependencies, and resource definitions required to run an application, and can also contain service definitions in the Kubernetes cluster. . Helm application templates are written in Go template language, and the values of the template are recorded in the values.yaml file.
在本实施例中与待部署应用对应的Helm应用模板包含运行该待部署应用所需的镜像、依赖和资源定义等。In this embodiment, the Helm application template corresponding to the application to be deployed includes images, dependencies, and resource definitions required to run the application to be deployed.
每个Helm应用模板包含对应的Docker镜像的信息,即每个Helm应用模板包含对应的Docker镜像的镜像名,镜像版本等信息。Each Helm application template contains the information of the corresponding Docker image, that is, each Helm application template contains the image name, image version and other information of the corresponding Docker image.
在本实施例中,例如,待部署应用为5个,则获取到的待部署应用对应的Helm应用模板也为5个。或者,当待部署应用运行时所需的资源包存在重叠时,待部署应用对应的Helm应用模板的数量可以少于5个,比如待部署应用为5个,获取到的待部署应用对应的Helm应用模板为3个。In this embodiment, for example, if there are 5 applications to be deployed, there are also 5 Helm application templates corresponding to the acquired applications to be deployed. Or, when there is overlap in the resource packs required by the application to be deployed when running, the number of Helm application templates corresponding to the application to be deployed can be less than 5, for example, there are 5 applications to be deployed, and the Helm corresponding to the application to be deployed is obtained. There are 3 application templates.
进一步的,在本申请另一实施例中,所述获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板包括:Further, in another embodiment of the present application, the acquiring multiple Helm application templates selected by the user on the client side and corresponding to the multiple applications to be deployed includes:
获取用户从应用模板仓库包含的预设应用模板中选取的多个应用模板为所述待部署应用对应的多个Helm应用模板。Obtain multiple application templates selected by the user from preset application templates included in the application template warehouse as multiple Helm application templates corresponding to the application to be deployed.
本实施例中,所述应用模板仓库中包含预设应用模板。例如,预设应用模板为公有云厂商提供的常见应用或中间件的应用模板,如Redis/Zookeeper/RabbitMQ/Eureka等。In this embodiment, the application template warehouse contains preset application templates. For example, the preset application templates are common applications or middleware application templates provided by public cloud vendors, such as Redis/Zookeeper/RabbitMQ/Eureka, etc.
例如,在浏览器的网页中显示可选择的预设应用模板,确定用户选取的预设应用模板为待部署应用对应的Helm应用模板。For example, the selectable preset application template is displayed on the webpage of the browser, and the preset application template selected by the user is determined to be the Helm application template corresponding to the application to be deployed.
通过本实施例,可以快速的获取待部署应用的应用模板进而有利于快速部署待部署应用。Through this embodiment, the application template of the application to be deployed can be quickly obtained, thereby facilitating the rapid deployment of the application to be deployed.
或者,在本申请其他实施例中,所述获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板包括:Or, in other embodiments of the present application, the acquiring multiple Helm application templates selected by the user on the client side and corresponding to the multiple applications to be deployed includes:
获取用户从应用模板仓库包含的预设应用模板中选取的至少一个应用模板为待修改应用模板,获取用户基于所述待修改应用模板进行修改之后得到的多个应用模板为所述待部署应用对应的Helm应用模板。Obtain at least one application template selected by the user from the preset application templates contained in the application template warehouse as the application template to be modified, and obtain multiple application templates obtained after the user is modified based on the application template to be modified as corresponding to the application to be deployed Helm application template.
例如,用户选取一个应用模板,并基于该应用模板进行多次修改得到不同的多个应用模板,则修改后得到的多个应用模板为待部署应用对应的Helm应用模板。For example, if the user selects an application template and makes multiple modifications based on the application template to obtain multiple different application templates, the multiple application templates obtained after the modification are Helm application templates corresponding to the application to be deployed.
在本实施例中,用户可以复制已有的公有模板进行修改,从而生成私有应用模板。例如,修改镜像名。In this embodiment, the user can copy an existing public template for modification, thereby generating a private application template. For example, modify the image name.
该私有应用模板可以持久化保存,并且仅供该用户使用。或者,用户可以设置该私有模板可共享给其他用户使用。The private application template can be saved persistently and is only available to the user. Or, the user can set the private template to be shared with other users.
通过本实施例,可以快速的基于应该用模板创建适用于待部署应用的Helm应用模板,提高了Helm应该用模板获取的速度,实现了便捷化定制Helm应用模板。Through this embodiment, it is possible to quickly create a Helm application template suitable for the application to be deployed based on the template that should be used, which improves the speed of obtaining the Helm template using the template, and realizes convenient customization of the Helm application template.
步骤S14,将所述多个Helm应用模板保存至应用模板仓库。Step S14: Save the multiple Helm application templates to the application template warehouse.
一种可选实施例中,应用模板仓库可存放公有应用模板和私有应用模板。In an optional embodiment, the application template warehouse may store public application templates and private application templates.
步骤S15,获取对所述多个Helm应用模板的集合部署任务信息,根据所述集合部署任务信息创建集合部署任务。Step S15: Obtain collective deployment task information for the multiple Helm application templates, and create a collective deployment task according to the collective deployment task information.
本实施例中,部署任务包含但不限于应用模板名,模板版本号,将部署到的集群的信息。则集合部署任务包括每个Helm应用模板、每个模板版本号、以及每个要部署到的集群的信息(如集群名称)。In this embodiment, the deployment task includes, but is not limited to, the application template name, template version number, and information about the cluster to which it will be deployed. The collective deployment task includes each Helm application template, each template version number, and information about each cluster to be deployed (such as the cluster name).
例如,待部署应用为5个时,集合部署任务信息中分别包括这5个待部署应用的部署信息,创建的集合部署任务可以用于部署这5个待部署应用。For example, when there are 5 applications to be deployed, the collective deployment task information includes deployment information of these 5 applications to be deployed respectively, and the created collective deployment task can be used to deploy these 5 applications to be deployed.
比如,a应用的b版本要部署到c集群,d应用的e版本要保护到f集群,则部署任务信息这两个应用的部署信息。For example, if the b version of a application is to be deployed to the c cluster, and the e version of the d application is to be protected to the f cluster, the deployment information of the two applications is deployed.
其他可选实施例中,所述集合部署任务信息为用户在浏览器的web页面输入的信息,如应用模板名、模板版本号、集群名称等。In other optional embodiments, the collective deployment task information is information input by the user on the web page of the browser, such as application template name, template version number, cluster name, etc.
可选的,在本申请另一实施例中国,所述获取对所述多个Helm应用模板的集合部署任务信息包括:Optionally, in another embodiment of the present application, the acquisition of collective deployment task information for the multiple Helm application templates includes:
获取集合部署任务文件,所述集合部署任务文件为XML格式的文件;Acquiring a collective deployment task file, where the collective deployment task file is a file in XML format;
解析所述集合部署任务文件,得到对所述多个Helm应用模板的集合部署任务信息。Parse the collective deployment task file to obtain collective deployment task information for the multiple Helm application templates.
步骤S16,接收执行所述集合部署任务的部署指令,基于所述部署指令调用Helm CLI向Kubernetes集群发送部署请求,以使所述Kubernetes集群中的kube-apiserver调用Helm的Tiller,所述Tiller基于所述应用模板仓库中的所述Helm应用模板和所述Docker镜像对所述多个待部署应用进行部署。Step S16, receiving a deployment instruction for executing the collective deployment task, and calling Helm CLI based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the kube-apiserver in the Kubernetes cluster calls Helm's Tiller, which is based on the The Helm application template and the Docker image in the application template warehouse deploy the multiple applications to be deployed.
本实施例中,所述Helm CLI为Helm的客户端,所述Tiller为Helm的服务器端,该Tiller运行于Kubernetes集群中。In this embodiment, the Helm CLI is the client of Helm, the Tiller is the server of Helm, and the Tiller runs in a Kubernetes cluster.
在本实施例中,当集合部署任务包含多个待部署应用时,并发部署待部署应用。In this embodiment, when the collective deployment task contains multiple applications to be deployed, the applications to be deployed are deployed concurrently.
通过本实施例创建集合部署任务进而执行集合部署任务可以快速地对多个应用进行部署,无需对单个应用进行一一部署,提高了应用部署的效率。By creating a collective deployment task and then executing the collective deployment task in this embodiment, multiple applications can be deployed quickly without deploying a single application one by one, which improves the efficiency of application deployment.
可选的,在本申请另一实施例中,所述应用部署方法还包括:Optionally, in another embodiment of the present application, the application deployment method further includes:
接收对所述集合部署任务的显示指令,显示所述集合部署任务的部署进度。Receive a display instruction for the collective deployment task, and display the deployment progress of the collective deployment task.
例如,显示部署进度为3/5,表示共有5个需要部署,已经完成部署3个。For example, if the deployment progress is displayed as 3/5, it means that there are 5 deployments and 3 deployments have been completed.
在本申请其他实施例中,通过web页面显示部署列表,该部署列表包括已完成的部署任务。有利于用快速便捷地了解部署进度与部署状态。In other embodiments of the present application, a deployment list is displayed through a web page, and the deployment list includes completed deployment tasks. Conducive to quickly and easily understand the deployment progress and deployment status.
本实施例提出的应用部署方法,获取由多个待部署应用的可执行程序打包得到的多个Docker镜像;将所述多个Docker镜像保存至Docker镜像仓库;获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板,每个Helm应用模板包含对应的Docker镜像的信息;将所述多个Helm应用模板保存至应用模板仓库;获取对所述多个Helm应用模板的集合部署任务信息,根据所述集合部署任务信息创建集合部署任务;接收执行所述集合部署任务的部署指令,基于所述部署指令调用Helm CLI向Kubernetes集群发送部署请求,以使所述Kubernetes集群中的kube-apiserver调用Helm的Tiller,所述Tiller基于所述应用模板仓库中的所述Helm应用模板和所述Docker镜像对所述多个待部署应用进行部署。由于用户选取Helm应用模板进行应用的部署,使得用户可以方便快捷的操作,无需通过命令行的形式进行部署;同时由于Helm应用模板是将运行应用所需的资源打包而成的模板,因此这种形式使得每个待部署应用的文件统一好管理,有利于快速应用的快速部署;并且通过将多个待部署应用组合成一个部署任务进行部署,无需将每个待部署应用分别部署,进一步提高了部署的速度,实现了提高对多个应用进行部署的效率的目的。The application deployment method proposed in this embodiment obtains multiple Docker images packaged by the executable programs of multiple applications to be deployed; saves the multiple Docker images in the Docker mirror warehouse; The multiple Helm application templates corresponding to the multiple applications to be deployed, each Helm application template contains the information of the corresponding Docker image; save the multiple Helm application templates in the application template warehouse; obtain the multiple Helm application templates The collective deployment task information is created based on the collective deployment task information; the deployment instruction for executing the collective deployment task is received, and Helm CLI is called based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the Kubernetes cluster The kube-apiserver in, calls Tiller of Helm, and the Tiller deploys the multiple applications to be deployed based on the Helm application template and the Docker image in the application template repository. Because the user selects the Helm application template for application deployment, users can operate conveniently and quickly without deploying through the form of command lines; at the same time, because the Helm application template is a template that packs the resources required to run the application, this The form makes the files of each application to be deployed are unified and well managed, which is conducive to the rapid deployment of rapid applications; and by combining multiple applications to be deployed into a deployment task for deployment, there is no need to deploy each application to be deployed separately, which further improves The speed of deployment achieves the goal of improving the efficiency of deploying multiple applications.
本申请还提供一种电子设备。参照图2所示,为本申请一实施例提供的电子设备的内部结构示意图。The application also provides an electronic device. Referring to FIG. 2, it is a schematic diagram of the internal structure of an electronic device provided by an embodiment of this application.
在本实施例中,电子设备1可以是PC(Personal Computer,个人电脑),也可以是智能手机、平板电脑、便携计算机等终端设备。该电子设备1至少包括存储器11、处理器12,网络接口13以及通信总线14。In this embodiment, the electronic device 1 may be a PC (Personal Computer, personal computer), or a terminal device such as a smart phone, a tablet computer, or a portable computer. The electronic device 1 at least includes a memory 11, a processor 12, a network interface 13, and a communication bus 14.
其中,存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、磁性存储器、磁盘、光盘等。存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的硬盘。存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如应用部署程序01的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, and the like. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), or a secure digital (Secure Digital, SD) equipped on the electronic device 1. Flash memory card Card) and so on. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can be used not only to store application software and various data installed in the electronic device 1, such as the code of the application deployment program 01, etc., but also to temporarily store data that has been output or will be output.
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit, CPU)、控制器、微控制器、微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行应用部署程序01等。The processor 12 may be a central processing unit (Central Processing Unit) in some embodiments. Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips are used to run program codes or process data stored in the memory 11, such as executing application deployment program 01.
网络接口13可选的可以包括标准的有线接口、无线接口(如WI-FI接口),通常用于在该电子设备1与其他电子设备之间建立通信连接。The network interface 13 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface), and is usually used to establish a communication connection between the electronic device 1 and other electronic devices.
通信总线14用于实现这些组件之间的连接通信。The communication bus 14 is used to realize the connection and communication between these components.
可选地,该电子设备1还可以包括用户接口,用户接口可以包括显示器(Display)、输入单元比如键盘(Keyboard),可选的用户接口还可以包括标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。Optionally, the electronic device 1 may further include a user interface. The user interface may include a display (Display) and an input unit such as a keyboard (Keyboard). The optional user interface may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device and so on. Among them, the display can also be appropriately called a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visualized user interface.
图2仅示出了具有组件11-14以及应用部署程序01的电子设备1,本领域技术人员可以理解的是,图2示出的结构并不构成对电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG. 2 only shows the electronic device 1 with components 11-14 and the application deployment program 01. Those skilled in the art can understand that the structure shown in FIG. 2 does not constitute a limitation on the electronic device 1, and may include a comparison diagram Show fewer or more components, or combinations of certain components, or different component arrangements.
在图2所示的电子设备1实施例中,存储器11中存储有应用部署程序01;处理器12执行存储器11中存储的应用部署程序01时实现如下步骤:In the embodiment of the electronic device 1 shown in FIG. 2, the application deployment program 01 is stored in the memory 11; when the processor 12 executes the application deployment program 01 stored in the memory 11, the following steps are implemented:
获取由多个待部署应用的可执行程序打包得到的多个Docker镜像。Obtain multiple Docker images packaged by the executable programs of multiple applications to be deployed.
本实施例中,所述待部署应用是指要部署到Kubernetes中的应用,所述多个待部署应用的数量为至少两个。In this embodiment, the application to be deployed refers to an application to be deployed in Kubernetes, and the number of the multiple applications to be deployed is at least two.
Docker镜像是一个只读的模板,一个独立的文件系统,包括运行容器所需的数据,可以用来创建新的容器。The Docker image is a read-only template, an independent file system, including the data required to run the container, which can be used to create a new container.
可选的,在本申请另一实施例中,所述获取由多个待部署应用的可执行程序打包得到的多个Docker镜像包括:Optionally, in another embodiment of the present application, the obtaining multiple Docker images packaged by executable programs of multiple applications to be deployed includes:
若检测到向代码仓库提交所述多个待部署应用的源码的提交指令,对所述多个待部署应用的源码进行质量检测;If a submission instruction for submitting the source code of the multiple applications to be deployed to the code repository is detected, quality inspection is performed on the source code of the multiple applications to be deployed;
若所述多个待部署应用的源码通过所述质量检测,对所述多个待部署应用的源码进行编译并将编译后得到的多个可执行程序打包成多个Docker镜像。If the source code of the multiple applications to be deployed passes the quality inspection, the source code of the multiple applications to be deployed is compiled and the multiple executable programs obtained after the compilation are packaged into multiple Docker images.
所述代码仓库可以是Github、Gitlab等可以进行代码管理的系统。The code warehouse may be a system capable of code management such as Github and Gitlab.
一种可选实施例中,可以通过SonarQube等第三方代码检测工具对源码进行质量检测,从而避免部署的应用存在较大的质量缺陷。In an optional embodiment, the source code may be quality checked by a third-party code checking tool such as SonarQube, so as to avoid large quality defects in the deployed application.
当对多个待部署应用的源码进行质量检测时,若存在没有通过质量检测的待部署应用的源码,则不对该待部署应用的源码进行编译。例如,若有5个待部署应用,对这5个待部署应用的源码进行质量检测,若都通过质量检测,则对这5个待部署应用的源码进行编译,并将编译后得到的5个可执行程序打包成5个Docker镜像;若对这5个待部署应用的源码进行质量检测之后,存在2个待部署应用的源码未通过质量检测,则对其他3个通过质量检测的待部署应用的源码进行编译,并将编译后得到的3个可执行程序打包成3个Docker镜像。When performing quality inspection on the source code of multiple applications to be deployed, if there is a source code of the application to be deployed that has not passed the quality inspection, the source code of the application to be deployed is not compiled. For example, if there are 5 applications to be deployed, the source code of these 5 applications to be deployed is tested for quality. If all pass the quality inspection, the source code of these 5 applications to be deployed is compiled, and the 5 obtained after compilation The executable program is packaged into 5 Docker images; if after the quality inspection of the source code of the 5 applications to be deployed, the source code of 2 applications to be deployed fails the quality inspection, then the other 3 applications to be deployed that pass the quality inspection Compile the source code of, and package the 3 executable programs obtained after compilation into 3 Docker images.
本实施例中,在打包生成Docker镜像时,可以基于Dockerfile来打包生成Docker。In this embodiment, when the Docker image is packaged and generated, Docker can be packaged and generated based on the Dockerfile.
在本申请另一实施例中,用户通过应用部署平台的集成开发环境编写或修改多个待部署应用的源码,以及通过集成开发环境编译源码得到可执行程序,并打包成Docker镜像。获取用户在应用部署平台的客户端配置的Docker镜像的路径,进而通过该Docker镜像的路径获取该Docker镜像。In another embodiment of the present application, the user writes or modifies the source code of multiple applications to be deployed through the integrated development environment of the application deployment platform, and compiles the source code through the integrated development environment to obtain an executable program, which is packaged into a Docker image. Obtain the path of the Docker image configured by the user on the client side of the application deployment platform, and then obtain the Docker image through the path of the Docker image.
将所述多个Docker镜像保存至Docker镜像仓库。Save the multiple Docker images to the Docker image warehouse.
Docker镜像的结构是:Docker镜像的最底端是一个文件引导系统,即bootfs。Docker镜像的第二层是root文件系统rootfs,通常是一种或多种操作系统,例如ubuntu等。在Docker中,文件系统永远都是只读的,在每次修改时,都是进行拷贝叠加从而形成最终的文件系统。Docker称这样的文件为镜像。一个镜像可以迭代在另一个镜像的顶部。位于下方的镜像称之为父镜像,最底层的镜像称之为基础镜像。最后,当从一个镜像启动容器时,Docker会在最顶层加载一个读写文件系统作为容器。The structure of the Docker image is: the bottom end of the Docker image is a file boot system, namely bootfs. The second layer of the Docker image is the root file system rootfs, which is usually one or more operating systems, such as ubuntu. In Docker, the file system is always read-only, and every time it is modified, it is copied and superimposed to form the final file system. Docker calls such files an image. One mirror can be iterated on top of another mirror. The mirror at the bottom is called the parent mirror, and the mirror at the bottom is called the base mirror. Finally, when starting a container from an image, Docker will load a read-write file system at the top level as the container.
本实施例中,所述Docker镜像仓库用于保存待部署应用的Docker镜像。In this embodiment, the Docker image warehouse is used to store the Docker image of the application to be deployed.
一种可选实施例中,将所述多个Docker镜像保存至Docker镜像仓库包括:获取Docker镜像仓库的地址,基于获取到的Docker镜像仓库的地址将所述多个Docker镜像保存至Docker镜像仓库。In an optional embodiment, saving the multiple Docker images in the Docker mirror warehouse includes: acquiring the address of the Docker mirror warehouse, and saving the multiple Docker images in the Docker mirror warehouse based on the acquired address of the Docker mirror warehouse .
获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板,每个Helm应用模板包含对应的Docker镜像的信息。Acquire multiple Helm application templates corresponding to the multiple applications to be deployed selected by the user on the client, and each Helm application template includes information about a corresponding Docker image.
本实施例中,客户端提供可供进行交互的窗口。In this embodiment, the client provides a window for interaction.
一种可选实施例中,所述客户端是应用部署平台的客户端。例如,获取在浏览器的网页中选取的与多个待部署应用对应的多个应用模板。In an optional embodiment, the client is a client of an application deployment platform. For example, multiple application templates corresponding to multiple applications to be deployed selected in the webpage of the browser are obtained.
本实施例中,Helm应用模板又称为Helm包,也可称为一个chart,一个Helm应用模板包含了运行一个应用所需要的镜像、依赖和资源定义等,还可以包含Kubernetes集群中的服务定义。Helm应用模板采用go模板语言编写 Go template language,模板的值记录在values.yaml文件中。In this embodiment, the Helm application template is also called a Helm package, or a chart. A Helm application template contains images, dependencies, and resource definitions required to run an application, and can also contain service definitions in the Kubernetes cluster. . Helm application templates are written in Go template language, and the values of the template are recorded in the values.yaml file.
在本实施例中与待部署应用对应的Helm应用模板包含运行该待部署应用所需的镜像、依赖和资源定义等。In this embodiment, the Helm application template corresponding to the application to be deployed includes images, dependencies, and resource definitions required to run the application to be deployed.
每个Helm应用模板包含对应的Docker镜像的信息,即每个Helm应用模板包含对应的Docker镜像的镜像名,镜像版本等信息。Each Helm application template contains the information of the corresponding Docker image, that is, each Helm application template contains the image name, image version and other information of the corresponding Docker image.
在本实施例中,例如,待部署应用为5个,则获取到的待部署应用对应的Helm应用模板也为5个。或者,当待部署应用运行时所需的资源包存在重叠时,待部署应用对应的Helm应用模板的数量可以少于5个,比如待部署应用为5个,获取到的待部署应用对应的Helm应用模板为3个。In this embodiment, for example, if there are 5 applications to be deployed, there are also 5 Helm application templates corresponding to the acquired applications to be deployed. Or, when there is overlap in the resource packs required by the application to be deployed when running, the number of Helm application templates corresponding to the application to be deployed can be less than 5, for example, there are 5 applications to be deployed, and the Helm corresponding to the application to be deployed is obtained. There are 3 application templates.
进一步的,在本申请另一实施例中,所述获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板包括:Further, in another embodiment of the present application, the acquiring multiple Helm application templates selected by the user on the client side and corresponding to the multiple applications to be deployed includes:
获取用户从应用模板仓库包含的预设应用模板中选取的多个应用模板为所述待部署应用对应的多个Helm应用模板。Obtain multiple application templates selected by the user from preset application templates included in the application template warehouse as multiple Helm application templates corresponding to the application to be deployed.
本实施例中,所述应用模板仓库中包含预设应用模板。例如,预设应用模板为公有云厂商提供的常见应用或中间件的应用模板,如Redis/Zookeeper/RabbitMQ/Eureka等。In this embodiment, the application template warehouse contains preset application templates. For example, the preset application templates are common applications or middleware application templates provided by public cloud vendors, such as Redis/Zookeeper/RabbitMQ/Eureka, etc.
例如,在浏览器的网页中显示可选择的预设应用模板,确定用户选取的预设应用模板为待部署应用对应的Helm应用模板。For example, the selectable preset application template is displayed on the webpage of the browser, and the preset application template selected by the user is determined to be the Helm application template corresponding to the application to be deployed.
通过本实施例,可以快速的获取待部署应用的应用模板进而有利于快速部署待部署应用。Through this embodiment, the application template of the application to be deployed can be quickly obtained, thereby facilitating the rapid deployment of the application to be deployed.
或者,在本申请其他实施例中,所述获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板包括:Or, in other embodiments of the present application, the acquiring multiple Helm application templates selected by the user on the client side and corresponding to the multiple applications to be deployed includes:
获取用户从应用模板仓库包含的预设应用模板中选取的至少一个应用模板为待修改应用模板,获取用户基于所述待修改应用模板进行修改之后得到的多个应用模板为所述待部署应用对应的Helm应用模板。Obtain at least one application template selected by the user from the preset application templates contained in the application template warehouse as the application template to be modified, and obtain multiple application templates obtained after the user is modified based on the application template to be modified as corresponding to the application to be deployed Helm application template.
例如,用户选取一个应用模板,并基于该应用模板进行多次修改得到不同的多个应用模板,则修改后得到的多个应用模板为待部署应用对应的Helm应用模板。For example, if the user selects an application template and makes multiple modifications based on the application template to obtain multiple different application templates, the multiple application templates obtained after the modification are Helm application templates corresponding to the application to be deployed.
在本实施例中,用户可以复制已有的公有模板进行修改,从而生成私有应用模板。例如,修改镜像名。In this embodiment, the user can copy an existing public template for modification, thereby generating a private application template. For example, modify the image name.
该私有应用模板可以持久化保存,并且仅供该用户使用。或者,用户可以设置该私有模板可共享给其他用户使用。The private application template can be saved persistently and is only available to the user. Or, the user can set the private template to be shared with other users.
通过本实施例,可以快速的基于应该用模板创建适用于待部署应用的Helm应用模板,提高了Helm应该用模板获取的速度,实现了便捷化定制Helm应用模板。Through this embodiment, it is possible to quickly create a Helm application template suitable for the application to be deployed based on the template that should be used, which improves the speed of obtaining the Helm template using the template, and realizes convenient customization of the Helm application template.
将所述多个Helm应用模板保存至应用模板仓库。Save the plurality of Helm application templates to the application template warehouse.
一种可选实施例中,应用模板仓库可存放公有应用模板和私有应用模板。In an optional embodiment, the application template warehouse may store public application templates and private application templates.
获取对所述多个Helm应用模板的集合部署任务信息,根据所述集合部署任务信息创建集合部署任务。Acquire collective deployment task information for the multiple Helm application templates, and create a collective deployment task according to the collective deployment task information.
本实施例中,部署任务包含但不限于应用模板名,模板版本号,将部署到的集群的信息。则集合部署任务包括每个Helm应用模板、每个模板版本号、以及每个要部署到的集群的信息(如集群名称)。In this embodiment, the deployment task includes, but is not limited to, the application template name, template version number, and information about the cluster to which it will be deployed. The collective deployment task includes each Helm application template, each template version number, and information about each cluster to be deployed (such as the cluster name).
例如,待部署应用为5个时,集合部署任务信息中分别包括这5个待部署应用的部署信息,创建的集合部署任务可以用于部署这5个待部署应用。For example, when there are 5 applications to be deployed, the collective deployment task information includes deployment information of these 5 applications to be deployed respectively, and the created collective deployment task can be used to deploy these 5 applications to be deployed.
比如,a应用的b版本要部署到c集群,d应用的e版本要保护到f集群,则部署任务信息这两个应用的部署信息。For example, if the b version of a application is to be deployed to the c cluster, and the e version of the d application is to be protected to the f cluster, the deployment information of the two applications is deployed.
其他可选实施例中,所述集合部署任务信息为用户在浏览器的web页面输入的信息,如应用模板名、模板版本号、集群名称等。In other optional embodiments, the collective deployment task information is information input by the user on the web page of the browser, such as application template name, template version number, cluster name, etc.
可选的,在本申请另一实施例中国,所述获取对所述多个Helm应用模板的集合部署任务信息包括:Optionally, in another embodiment of the present application, the acquisition of collective deployment task information for the multiple Helm application templates includes:
获取集合部署任务文件,所述集合部署任务文件为XML格式的文件;Acquiring a collective deployment task file, where the collective deployment task file is a file in XML format;
解析所述集合部署任务文件,得到对所述多个Helm应用模板的集合部署任务信息。Parse the collective deployment task file to obtain collective deployment task information for the multiple Helm application templates.
接收执行所述集合部署任务的部署指令,基于所述部署指令调用Helm CLI向Kubernetes集群发送部署请求,以使所述Kubernetes集群中的kube-apiserver调用Helm的Tiller,所述Tiller基于所述应用模板仓库中的所述Helm应用模板和所述Docker镜像对所述多个待部署应用进行部署。Receive a deployment instruction for executing the collective deployment task, and call Helm CLI based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the kube-apiserver in the Kubernetes cluster calls Helm's Tiller, which is based on the application template The Helm application template and the Docker image in the warehouse deploy the multiple applications to be deployed.
本实施例中,所述Helm CLI为Helm的客户端,所述Tiller为Helm的服务器端,该Tiller运行于Kubernetes集群中。In this embodiment, the Helm CLI is the client of Helm, the Tiller is the server of Helm, and the Tiller runs in a Kubernetes cluster.
在本实施例中,当集合部署任务包含多个待部署应用时,并发部署待部署应用。In this embodiment, when the collective deployment task contains multiple applications to be deployed, the applications to be deployed are deployed concurrently.
通过本实施例创建集合部署任务进而执行集合部署任务可以快速地对多个应用进行部署,无需对单个应用进行一一部署,提高了应用部署的效率。By creating a collective deployment task and then executing the collective deployment task in this embodiment, multiple applications can be deployed quickly without deploying a single application one by one, which improves the efficiency of application deployment.
可选的,在本申请另一实施例中,所述应用部署方法还包括:Optionally, in another embodiment of the present application, the application deployment method further includes:
接收对所述集合部署任务的显示指令,显示所述集合部署任务的部署进度。Receive a display instruction for the collective deployment task, and display the deployment progress of the collective deployment task.
例如,显示部署进度为3/5,表示共有5个需要部署,已经完成部署3个。For example, if the deployment progress is displayed as 3/5, it means that there are 5 deployments and 3 deployments have been completed.
在本申请其他实施例中,通过web页面显示部署列表,该部署列表包括已完成的部署任务。有利于用快速便捷地了解部署进度与部署状态。In other embodiments of the present application, a deployment list is displayed through a web page, and the deployment list includes completed deployment tasks. Conducive to quickly and easily understand the deployment progress and deployment status.
本实施例提出的应用部署装置,获取由多个待部署应用的可执行程序打包得到的多个Docker镜像;将所述多个Docker镜像保存至Docker镜像仓库;获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板,每个Helm应用模板包含对应的Docker镜像的信息;将所述多个Helm应用模板保存至应用模板仓库;获取对所述多个Helm应用模板的集合部署任务信息,根据所述集合部署任务信息创建集合部署任务;接收执行所述集合部署任务的部署指令,基于所述部署指令调用Helm CLI向Kubernetes集群发送部署请求,以使所述Kubernetes集群中的kube-apiserver调用Helm的Tiller,所述Tiller基于所述应用模板仓库中的所述Helm应用模板和所述Docker镜像对所述多个待部署应用进行部署。由于用户选取Helm应用模板进行应用的部署,使得用户可以方便快捷的操作,无需通过命令行的形式进行部署;同时由于Helm应用模板是将运行应用所需的资源打包而成的模板,因此这种形式使得每个待部署应用的文件统一好管理,有利于快速应用的快速部署;并且通过将多个待部署应用组合成一个部署任务进行部署,无需将每个待部署应用分别部署,进一步提高了部署的速度,实现了提高对多个应用进行部署的效率的目的。The application deployment device proposed in this embodiment obtains multiple Docker images packaged by the executable programs of multiple applications to be deployed; saves the multiple Docker images in the Docker mirror warehouse; obtains the information selected by the user on the client The multiple Helm application templates corresponding to the multiple applications to be deployed, each Helm application template contains the information of the corresponding Docker image; save the multiple Helm application templates in the application template warehouse; obtain the multiple Helm application templates The collective deployment task information is created based on the collective deployment task information; the deployment instruction for executing the collective deployment task is received, and Helm CLI is called based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the Kubernetes cluster The kube-apiserver in, calls Tiller of Helm, and the Tiller deploys the multiple applications to be deployed based on the Helm application template and the Docker image in the application template repository. Because the user selects the Helm application template for application deployment, users can operate conveniently and quickly without deploying through the form of command lines; at the same time, because the Helm application template is a template that packs the resources required to run the application, this The form makes the files of each application to be deployed are unified and well managed, which is conducive to the rapid deployment of rapid applications; and by combining multiple applications to be deployed into a deployment task for deployment, there is no need to deploy each application to be deployed separately, which further improves The speed of deployment achieves the goal of improving the efficiency of deploying multiple applications.
参照图3所示,为本申请应用部署装置一实施例的模块示意图,该实施例中,应用部署装置包括第一获取模块10、第一保存模块20、第二获取模块30、第二保存模块40、创建模块50和处理模块60,示例性地:3, this is a schematic diagram of modules of an embodiment of the application deployment apparatus of this application. In this embodiment, the application deployment apparatus includes a first acquisition module 10, a first storage module 20, a second acquisition module 30, and a second storage module. 40. The creation module 50 and the processing module 60, exemplarily:
第一获取模块10用于:获取由多个待部署应用的可执行程序打包得到的多个Docker镜像;The first obtaining module 10 is used to: obtain multiple Docker images packaged by executable programs of multiple applications to be deployed;
第一保存模块20用于:将所述多个Docker镜像保存至Docker镜像仓库;The first saving module 20 is used to: save the multiple Docker images to the Docker image warehouse;
第二获取模块30用于:获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板,每个Helm应用模板包含对应的Docker镜像的信息;The second obtaining module 30 is configured to obtain a plurality of Helm application templates corresponding to the plurality of applications to be deployed selected by the user on the client, and each Helm application template includes information of a corresponding Docker image;
第二保存模块40用于:将所述多个Helm应用模板保存至应用模板仓库;The second saving module 40 is configured to: save the plurality of Helm application templates to the application template warehouse;
创建模块50用于:获取对所述多个Helm应用模板的集合部署任务信息,根据所述集合部署任务信息创建集合部署任务;The creation module 50 is configured to obtain collective deployment task information for the plurality of Helm application templates, and create a collective deployment task according to the collective deployment task information;
处理模块60用于:接收执行所述集合部署任务的部署指令,基于所述部署指令调用Helm CLI向Kubernetes集群发送部署请求,以使所述Kubernetes集群中的kube-apiserver调用Helm的Tiller,所述Tiller基于所述应用模板仓库中的所述Helm应用模板和所述Docker镜像对所述多个待部署应用进行部署。The processing module 60 is configured to receive a deployment instruction for executing the collective deployment task, and call Helm CLI based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the kube-apiserver in the Kubernetes cluster calls Helm's Tiller. Tiller deploys the multiple applications to be deployed based on the Helm application template and the Docker image in the application template warehouse.
上述第一获取模块10、第一保存模块20、第二获取模块30、第二保存模块40、创建模块50和处理模块60等程序模块被执行时所实现的功能或操作步骤与上述实施例大体相同,在此不再赘述。The functions or operation steps implemented when the program modules such as the first acquisition module 10, the first storage module 20, the second acquisition module 30, the second storage module 40, the creation module 50, and the processing module 60 are executed are substantially the same as those in the foregoing embodiment. The same, so I won't repeat them here.
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,所述计算机可读存储介质上存储有应用部署程序,所述应用部署程序可被一个或多个处理器执行,以实现如下操作:In addition, the embodiment of the present application also proposes a computer-readable storage medium, the computer-readable storage medium may be non-volatile or volatile, and the computer-readable storage medium stores an application deployment program, The application deployment program may be executed by one or more processors to implement the following operations:
获取由多个待部署应用的可执行程序打包得到的多个Docker镜像;Obtain multiple Docker images packaged by the executable programs of multiple applications to be deployed;
将所述多个Docker镜像保存至Docker镜像仓库;Save the multiple Docker images to the Docker image warehouse;
获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板,每个Helm应用模板包含对应的Docker镜像的信息;Acquiring multiple Helm application templates corresponding to the multiple applications to be deployed selected by the user on the client, each Helm application template containing information about the corresponding Docker image;
将所述多个Helm应用模板保存至应用模板仓库;Saving the multiple Helm application templates to the application template warehouse;
获取对所述多个Helm应用模板的集合部署任务信息,根据所述集合部署任务信息创建集合部署任务;Acquiring collective deployment task information for the plurality of Helm application templates, and creating a collective deployment task according to the collective deployment task information;
接收执行所述集合部署任务的部署指令,基于所述部署指令调用Helm CLI向Kubernetes集群发送部署请求,以使所述Kubernetes集群中的kube-apiserver调用Helm的Tiller,所述Tiller基于所述应用模板仓库中的所述Helm应用模板和所述Docker镜像对所述多个待部署应用进行部署。Receive a deployment instruction for executing the collective deployment task, and call Helm CLI based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the kube-apiserver in the Kubernetes cluster calls Helm's Tiller, which is based on the application template The Helm application template and the Docker image in the warehouse deploy the multiple applications to be deployed.
本申请计算机可读存储介质具体实施方式与上述应用部署装置和方法各实施例基本相同,在此不作累述。The specific implementation of the computer-readable storage medium of the present application is basically the same as the above-mentioned embodiments of the application deployment apparatus and method, and is not described here.
需要说明的是,上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。并且本文中的术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。It should be noted that the serial numbers of the foregoing embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments. And the terms "include", "include" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements not only includes those elements, but also includes those elements that are not explicitly included. The other elements listed may also include elements inherent to the process, device, article, or method. Without more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, device, article, or method that includes the element.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above implementation manners, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM) as described above. , Magnetic disks, optical disks), including several instructions to make a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) execute the method described in each embodiment of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred embodiments of the application, and do not limit the scope of the patent for this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of the application, or directly or indirectly applied to other related technical fields , The same reason is included in the scope of patent protection of this application.

Claims (20)

  1. 一种应用部署方法,其中,所述方法包括:An application deployment method, wherein the method includes:
    获取由多个待部署应用的可执行程序打包得到的多个Docker镜像;Obtain multiple Docker images packaged by the executable programs of multiple applications to be deployed;
    将所述多个Docker镜像保存至Docker镜像仓库;Save the multiple Docker images to the Docker image warehouse;
    获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板,每个Helm应用模板包含对应的Docker镜像的信息;Acquiring multiple Helm application templates corresponding to the multiple applications to be deployed selected by the user on the client, each Helm application template containing information about the corresponding Docker image;
    将所述多个Helm应用模板保存至应用模板仓库;Saving the multiple Helm application templates to the application template warehouse;
    获取对所述多个Helm应用模板的集合部署任务信息,根据所述集合部署任务信息创建集合部署任务;Acquiring collective deployment task information for the plurality of Helm application templates, and creating a collective deployment task according to the collective deployment task information;
    接收执行所述集合部署任务的部署指令,基于所述部署指令调用Helm CLI向Kubernetes集群发送部署请求,以使所述Kubernetes集群中的kube-apiserver调用Helm的Tiller,所述Tiller基于所述应用模板仓库中的所述Helm应用模板和所述Docker镜像对所述多个待部署应用进行部署。Receive a deployment instruction for executing the collective deployment task, and call Helm CLI based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the kube-apiserver in the Kubernetes cluster calls Helm's Tiller, which is based on the application template The Helm application template and the Docker image in the warehouse deploy the multiple applications to be deployed.
  2. 如权利要求1所述的应用部署方法,其中,所述获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板包括:5. The application deployment method according to claim 1, wherein said acquiring a plurality of Helm application templates corresponding to the plurality of applications to be deployed selected by the user at the client terminal comprises:
    获取用户从应用模板仓库包含的预设应用模板中选取的多个应用模板为所述待部署应用对应的多个Helm应用模板;或者Acquiring multiple application templates selected by the user from the preset application templates contained in the application template warehouse as multiple Helm application templates corresponding to the application to be deployed; or
    获取用户从应用模板仓库包含的预设应用模板中选取的至少一个应用模板为待修改应用模板,获取用户基于所述待修改应用模板进行修改之后得到的多个应用模板为所述待部署应用对应的Helm应用模板。Obtain at least one application template selected by the user from the preset application templates contained in the application template warehouse as the application template to be modified, and obtain multiple application templates obtained after the user is modified based on the application template to be modified as corresponding to the application to be deployed Helm application template.
  3. 如权利要求1所述的应用部署方法,其中,所述获取由多个待部署应用的可执行程序打包得到的多个Docker镜像包括:8. The application deployment method of claim 1, wherein said obtaining multiple Docker images packaged by executable programs of multiple applications to be deployed comprises:
    若检测到向代码仓库提交所述多个待部署应用的源码的提交指令,对所述多个待部署应用的源码进行质量检测;If a submission instruction for submitting the source code of the multiple applications to be deployed to the code repository is detected, quality inspection is performed on the source code of the multiple applications to be deployed;
    若所述多个待部署应用的源码通过所述质量检测,对所述多个待部署应用的源码进行编译并将编译后得到的多个可执行程序打包成多个Docker镜像。If the source code of the multiple applications to be deployed passes the quality inspection, the source code of the multiple applications to be deployed is compiled and the multiple executable programs obtained after the compilation are packaged into multiple Docker images.
  4. 如权利要求1所述的应用部署方法,其中,所述获取对所述多个Helm应用模板的集合部署任务信息包括:5. The application deployment method according to claim 1, wherein said acquiring collective deployment task information for said plurality of Helm application templates comprises:
    获取集合部署任务文件,所述集合部署任务文件为XML格式的文件;Acquiring a collective deployment task file, where the collective deployment task file is a file in XML format;
    解析所述集合部署任务文件,得到对所述多个Helm应用模板的集合部署任务信息。Parse the collective deployment task file to obtain collective deployment task information for the multiple Helm application templates.
  5. 如权利要求1至4中任一项所述的应用部署方法,其中,所述方法还包括:The application deployment method according to any one of claims 1 to 4, wherein the method further comprises:
    接收对所述集合部署任务的显示指令,显示所述集合部署任务的部署进度。Receive a display instruction for the collective deployment task, and display the deployment progress of the collective deployment task.
  6. 如权利要求3所述的应用部署方法,其中,所述代码仓库为Github或Gitlab。The application deployment method of claim 3, wherein the code repository is Github or Gitlab.
  7. 如权利要求1所述的应用部署方法,其中,所述将所述多个Docker镜像保存至Docker镜像仓库包括:5. The application deployment method of claim 1, wherein the storing the multiple Docker images in a Docker image warehouse comprises:
    获取Docker镜像仓库的地址,基于获取到的Docker镜像仓库的地址将所述多个Docker镜像保存至Docker镜像仓库。Obtain the address of the Docker image warehouse, and save the multiple Docker images to the Docker image warehouse based on the acquired address of the Docker image warehouse.
  8. 一种应用部署装置,其中,所述装置包括:An application deployment device, wherein the device includes:
    第一获取模块,用于获取由多个待部署应用的可执行程序打包得到的多个Docker镜像;The first obtaining module is used to obtain multiple Docker images packaged by the executable programs of multiple applications to be deployed;
    第一保存模块,用于将所述多个Docker镜像保存至Docker镜像仓库;The first saving module is used to save the multiple Docker images to the Docker image warehouse;
    第二获取模块,用于获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板,每个Helm应用模板包含对应的Docker镜像的信息;The second obtaining module is configured to obtain multiple Helm application templates corresponding to the multiple applications to be deployed selected by the user on the client, and each Helm application template contains information about the corresponding Docker image;
    第二保存模块,用于将所述多个Helm应用模板保存至应用模板仓库;The second saving module is used to save the plurality of Helm application templates to the application template warehouse;
    创建模块,用于获取对所述多个Helm应用模板的集合部署任务信息,根据所述集合部署任务信息创建集合部署任务;A creation module, configured to obtain collective deployment task information for the multiple Helm application templates, and create a collective deployment task according to the collective deployment task information;
    处理模块,用于接收执行所述集合部署任务的部署指令,基于所述部署指令调用Helm CLI向Kubernetes集群发送部署请求,以使所述Kubernetes集群中的kube-apiserver调用Helm的Tiller,所述Tiller基于所述应用模板仓库中的所述Helm应用模板和所述Docker镜像对所述多个待部署应用进行部署。The processing module is configured to receive a deployment instruction for executing the collective deployment task, and call Helm CLI based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the kube-apiserver in the Kubernetes cluster calls Helm's Tiller, the Tiller Deploy the multiple applications to be deployed based on the Helm application template and the Docker image in the application template warehouse.
  9. 一种电子设备,其中,所述电子设备包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的应用部署程序,所述应用部署程序被所述处理器执行时实现如下步骤:An electronic device, wherein the electronic device includes a memory and a processor, the memory stores an application deployment program that can run on the processor, and the application deployment program is executed by the processor as follows step:
    获取由多个待部署应用的可执行程序打包得到的多个Docker镜像;Obtain multiple Docker images packaged by the executable programs of multiple applications to be deployed;
    将所述多个Docker镜像保存至Docker镜像仓库;Save the multiple Docker images to the Docker image warehouse;
    获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板,每个Helm应用模板包含对应的Docker镜像的信息;Acquiring multiple Helm application templates corresponding to the multiple applications to be deployed selected by the user on the client, each Helm application template containing information about the corresponding Docker image;
    将所述多个Helm应用模板保存至应用模板仓库;Saving the multiple Helm application templates to the application template warehouse;
    获取对所述多个Helm应用模板的集合部署任务信息,根据所述集合部署任务信息创建集合部署任务;Acquiring collective deployment task information for the plurality of Helm application templates, and creating a collective deployment task according to the collective deployment task information;
    接收执行所述集合部署任务的部署指令,基于所述部署指令调用Helm CLI向Kubernetes集群发送部署请求,以使所述Kubernetes集群中的kube-apiserver调用Helm的Tiller,所述Tiller基于所述应用模板仓库中的所述Helm应用模板和所述Docker镜像对所述多个待部署应用进行部署。Receive a deployment instruction for executing the collective deployment task, and call Helm CLI based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the kube-apiserver in the Kubernetes cluster calls Helm's Tiller, which is based on the application template The Helm application template and the Docker image in the warehouse deploy the multiple applications to be deployed.
  10. 如权利要求9所述的电子设备,其中,所述获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板包括:9. The electronic device according to claim 9, wherein said acquiring the plurality of Helm application templates corresponding to the plurality of applications to be deployed selected by the user at the client terminal comprises:
    获取用户从应用模板仓库包含的预设应用模板中选取的多个应用模板为所述待部署应用对应的多个Helm应用模板;或者Acquiring multiple application templates selected by the user from the preset application templates contained in the application template warehouse as multiple Helm application templates corresponding to the application to be deployed; or
    获取用户从应用模板仓库包含的预设应用模板中选取的至少一个应用模板为待修改应用模板,获取用户基于所述待修改应用模板进行修改之后得到的多个应用模板为所述待部署应用对应的Helm应用模板。Obtain at least one application template selected by the user from the preset application templates contained in the application template warehouse as the application template to be modified, and obtain multiple application templates obtained after the user is modified based on the application template to be modified as corresponding to the application to be deployed Helm application template.
  11. 如权利要求9所述的电子设备,其中,所述获取由多个待部署应用的可执行程序打包得到的多个Docker镜像包括:9. The electronic device according to claim 9, wherein said obtaining multiple Docker images packaged by executable programs of multiple applications to be deployed comprises:
    若检测到向代码仓库提交所述多个待部署应用的源码的提交指令,对所述多个待部署应用的源码进行质量检测;If a submission instruction for submitting the source code of the multiple applications to be deployed to the code repository is detected, quality inspection is performed on the source code of the multiple applications to be deployed;
    若所述多个待部署应用的源码通过所述质量检测,对所述多个待部署应用的源码进行编译并将编译后得到的多个可执行程序打包成多个Docker镜像。If the source code of the multiple applications to be deployed passes the quality inspection, the source code of the multiple applications to be deployed is compiled and the multiple executable programs obtained after the compilation are packaged into multiple Docker images.
  12. 如权利要求9至11中任一项所述的电子设备,其中,所述应用部署程序可被所述处理器执行,还实现如下步骤:The electronic device according to any one of claims 9 to 11, wherein the application deployment program can be executed by the processor, and further implements the following steps:
    接收对所述集合部署任务的显示指令,显示所述集合部署任务的部署进度。Receive a display instruction for the collective deployment task, and display the deployment progress of the collective deployment task.
  13. 如权利要求9所述的电子设备,其中,所述获取对所述多个Helm应用模板的集合部署任务信息包括:9. The electronic device according to claim 9, wherein said acquiring collective deployment task information for said plurality of Helm application templates comprises:
    获取集合部署任务文件,所述集合部署任务文件为XML格式的文件;Acquiring a collective deployment task file, where the collective deployment task file is a file in XML format;
    解析所述集合部署任务文件,得到对所述多个Helm应用模板的集合部署任务信息。Parse the collective deployment task file to obtain collective deployment task information for the multiple Helm application templates.
  14. 如权利要求11所述的电子设备,其中,所述代码仓库为Github或Gitlab。The electronic device of claim 11, wherein the code repository is Github or Gitlab.
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有应用部署程序,所述应用部署程序可被一个或者多个处理器执行,以实现如下步骤:A computer-readable storage medium, wherein an application deployment program is stored on the computer-readable storage medium, and the application deployment program can be executed by one or more processors to implement the following steps:
    获取由多个待部署应用的可执行程序打包得到的多个Docker镜像;Obtain multiple Docker images packaged by the executable programs of multiple applications to be deployed;
    将所述多个Docker镜像保存至Docker镜像仓库;Save the multiple Docker images to the Docker image warehouse;
    获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板,每个Helm应用模板包含对应的Docker镜像的信息;Acquiring multiple Helm application templates corresponding to the multiple applications to be deployed selected by the user on the client, each Helm application template containing information about the corresponding Docker image;
    将所述多个Helm应用模板保存至应用模板仓库;Saving the multiple Helm application templates to the application template warehouse;
    获取对所述多个Helm应用模板的集合部署任务信息,根据所述集合部署任务信息创建集合部署任务;Acquiring collective deployment task information for the plurality of Helm application templates, and creating a collective deployment task according to the collective deployment task information;
    接收执行所述集合部署任务的部署指令,基于所述部署指令调用Helm CLI向Kubernetes集群发送部署请求,以使所述Kubernetes集群中的kube-apiserver调用Helm的Tiller,所述Tiller基于所述应用模板仓库中的所述Helm应用模板和所述Docker镜像对所述多个待部署应用进行部署。Receive a deployment instruction for executing the collective deployment task, and call Helm CLI based on the deployment instruction to send a deployment request to the Kubernetes cluster, so that the kube-apiserver in the Kubernetes cluster calls Helm's Tiller, which is based on the application template The Helm application template and the Docker image in the warehouse deploy the multiple applications to be deployed.
  16. 如权利要求15所述的计算机可读存储介质,其中,所述获取用户在客户端选取的与所述多个待部署应用对应的多个Helm应用模板包括:15. The computer-readable storage medium according to claim 15, wherein said acquiring the plurality of Helm application templates corresponding to the plurality of applications to be deployed selected by the user at the client terminal comprises:
    获取用户从应用模板仓库包含的预设应用模板中选取的多个应用模板为所述待部署应用对应的多个Helm应用模板;或者Acquiring multiple application templates selected by the user from the preset application templates contained in the application template warehouse as multiple Helm application templates corresponding to the application to be deployed; or
    获取用户从应用模板仓库包含的预设应用模板中选取的至少一个应用模板为待修改应用模板,获取用户基于所述待修改应用模板进行修改之后得到的多个应用模板为所述待部署应用对应的Helm应用模板。Obtain at least one application template selected by the user from the preset application templates contained in the application template warehouse as the application template to be modified, and obtain multiple application templates obtained after the user is modified based on the application template to be modified as corresponding to the application to be deployed Helm application template.
  17. 如权利要求15所述的计算机可读存储介质,其中,所述获取由多个待部署应用的可执行程序打包得到的多个Docker镜像包括:15. The computer-readable storage medium according to claim 15, wherein said obtaining a plurality of Docker images packaged by executable programs of a plurality of applications to be deployed comprises:
    若检测到向代码仓库提交所述多个待部署应用的源码的提交指令,对所述多个待部署应用的源码进行质量检测;If a submission instruction for submitting the source code of the multiple applications to be deployed to the code repository is detected, quality inspection is performed on the source code of the multiple applications to be deployed;
    若所述多个待部署应用的源码通过所述质量检测,对所述多个待部署应用的源码进行编译并将编译后得到的多个可执行程序打包成多个Docker镜像。If the source code of the multiple applications to be deployed passes the quality inspection, the source code of the multiple applications to be deployed is compiled and the multiple executable programs obtained after the compilation are packaged into multiple Docker images.
  18. 如权利要求15所述的计算机可读存储介质,其中,所述获取对所述多个Helm应用模板的集合部署任务信息包括:15. The computer-readable storage medium according to claim 15, wherein said acquiring collective deployment task information for said plurality of Helm application templates comprises:
    获取集合部署任务文件,所述集合部署任务文件为XML格式的文件;Acquiring a collective deployment task file, where the collective deployment task file is a file in XML format;
    解析所述集合部署任务文件,得到对所述多个Helm应用模板的集合部署任务信息。Parse the collective deployment task file to obtain collective deployment task information for the multiple Helm application templates.
  19. 如权利要求15至18中任一项所述的计算机可读存储介质,其中,所述应用部署程序可被一个或者多个处理器执行时还实现如下步骤:18. The computer-readable storage medium according to any one of claims 15 to 18, wherein the application deployment program further implements the following steps when the application deployment program can be executed by one or more processors:
    接收对所述集合部署任务的显示指令,显示所述集合部署任务的部署进度。Receive a display instruction for the collective deployment task, and display the deployment progress of the collective deployment task.
  20. 如权利要求17所述的计算机可读存储介质,其中,所述代码仓库为Github或Gitlab。The computer-readable storage medium of claim 17, wherein the code repository is Github or Gitlab.
PCT/CN2020/119215 2019-11-19 2020-09-30 Application deployment method and apparatus, electronic device and storage medium WO2021098392A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911139848.1A CN111090437B (en) 2019-11-19 2019-11-19 Application deployment method and device and computer readable storage medium
CN201911139848.1 2019-11-19

Publications (1)

Publication Number Publication Date
WO2021098392A1 true WO2021098392A1 (en) 2021-05-27

Family

ID=70393535

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/119215 WO2021098392A1 (en) 2019-11-19 2020-09-30 Application deployment method and apparatus, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN111090437B (en)
WO (1) WO2021098392A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113485795A (en) * 2021-07-26 2021-10-08 四川万益能源科技有限公司 Automatic container starting method based on multiple types of projects
CN117931221A (en) * 2024-03-22 2024-04-26 千巡科技(深圳)有限公司 Deployment system and method of application system based on k8s environment

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111090437B (en) * 2019-11-19 2024-03-12 平安科技(深圳)有限公司 Application deployment method and device and computer readable storage medium
CN111596927B (en) * 2020-05-15 2023-08-18 北京金山云网络技术有限公司 Service deployment method and device and electronic equipment
CN112558987A (en) * 2020-12-16 2021-03-26 中盈优创资讯科技有限公司 Helm-based automatic deployment method and device
CN112817674B (en) * 2021-01-20 2023-12-26 上海浪潮云计算服务有限公司 Tool and method for deploying X window system in kubernetes cluster
CN113094151A (en) * 2021-04-23 2021-07-09 汇能云科技(宁波)有限公司 Helm-based micro-service application deployment system and method
CN113238763A (en) * 2021-05-17 2021-08-10 京东数字科技控股股份有限公司 Application deployment method, device, storage medium and program product
CN113377346B (en) * 2021-06-10 2023-01-31 北京滴普科技有限公司 Integrated environment building method and device, electronic equipment and storage medium
CN114840225B (en) * 2022-04-26 2023-09-19 光大科技有限公司 Application deployment method and device, storage medium and electronic device
CN116431277A (en) * 2023-03-13 2023-07-14 浙江海规技术有限公司 Multi-place operation and maintenance containerization method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180173512A1 (en) * 2016-12-19 2018-06-21 International Business Machines Corporation Optimized Creation of Distributed Storage and Distributed Processing Clusters on Demand
CN109634621A (en) * 2018-11-30 2019-04-16 武汉烽火信息集成技术有限公司 Openstack Platform deployment method, storage medium, electronic equipment and system
CN109981351A (en) * 2019-03-06 2019-07-05 浪潮通用软件有限公司 A kind of private clound dispositions method
CN110058863A (en) * 2019-03-16 2019-07-26 平安城市建设科技(深圳)有限公司 Construction method, device, equipment and the storage medium of Docker container
CN111090437A (en) * 2019-11-19 2020-05-01 平安科技(深圳)有限公司 Application deployment method and device and computer readable storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3364623B1 (en) * 2016-02-25 2022-05-04 Huawei Technologies Co., Ltd. Method for automatically deploying application, and cloud management node
US9983891B1 (en) * 2017-03-21 2018-05-29 Veritas Technologies Llc Systems and methods for distributing configuration templates with application containers
CN107766126B (en) * 2017-11-15 2023-01-13 腾讯科技(深圳)有限公司 Container mirror image construction method, system and device and storage medium
CN108959030A (en) * 2018-07-02 2018-12-07 郑州云海信息技术有限公司 A kind of cluster management method and system
CN109799998B (en) * 2018-12-18 2023-02-10 深圳先进技术研究院 OpenStack cluster configuration and batch deployment method and system
CN110286885A (en) * 2019-06-27 2019-09-27 江苏满运软件科技有限公司 Automate initial development method, system, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180173512A1 (en) * 2016-12-19 2018-06-21 International Business Machines Corporation Optimized Creation of Distributed Storage and Distributed Processing Clusters on Demand
CN109634621A (en) * 2018-11-30 2019-04-16 武汉烽火信息集成技术有限公司 Openstack Platform deployment method, storage medium, electronic equipment and system
CN109981351A (en) * 2019-03-06 2019-07-05 浪潮通用软件有限公司 A kind of private clound dispositions method
CN110058863A (en) * 2019-03-16 2019-07-26 平安城市建设科技(深圳)有限公司 Construction method, device, equipment and the storage medium of Docker container
CN111090437A (en) * 2019-11-19 2020-05-01 平安科技(深圳)有限公司 Application deployment method and device and computer readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113485795A (en) * 2021-07-26 2021-10-08 四川万益能源科技有限公司 Automatic container starting method based on multiple types of projects
CN113485795B (en) * 2021-07-26 2024-03-26 四川万益能源科技有限公司 Automatic container starting method based on multiple types of items
CN117931221A (en) * 2024-03-22 2024-04-26 千巡科技(深圳)有限公司 Deployment system and method of application system based on k8s environment
CN117931221B (en) * 2024-03-22 2024-05-24 千巡科技(深圳)有限公司 Deployment system and method of application system based on k8s environment

Also Published As

Publication number Publication date
CN111090437A (en) 2020-05-01
CN111090437B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
WO2021098392A1 (en) Application deployment method and apparatus, electronic device and storage medium
US8627303B2 (en) Memory optimization of virtual machine code by partitioning extraneous information
US9778924B2 (en) Platform for enabling creation and use of an API for a specific solution
US20190102201A1 (en) Component invoking method and apparatus, and component data processing method and apparatus
US20150220308A1 (en) Model-based development
CN111740948B (en) Data packet issuing method, dynamic updating method, device, equipment and medium
CN107656729B (en) List view updating apparatus, method and computer-readable storage medium
CN107943485B (en) Patch compiling platform and patch compiling method
WO2020015191A1 (en) Business rule releasing and managing method, electronic device and readable storage medium
US9460109B1 (en) Centralized provisioning process leveraging network attached storage
JP2021111368A (en) API-based software development platform
CN112769706B (en) Componentized routing method and system
CN110895471A (en) Installation package generation method, device, medium and electronic equipment
US20220374217A1 (en) Automated machine deployment and configuration
JP2006048645A (en) Method and system for embedding context information in document
WO2020015170A1 (en) Interface invoking method and apparatus, and computer-readable storage medium
CN111694613A (en) Decoupling method between application program modules, electronic device and storage medium
US10514940B2 (en) Virtual application package reconstruction
Botturi et al. Model-driven design for the development of multi-platform smartphone applications
CN110764746B (en) Script generation method and device and computer readable storage medium
CN112631563A (en) System development method and device based on framework, computer equipment and storage medium
US10789048B2 (en) Namespace and class utilities for managed packages
CN111158777A (en) Component calling method and device and computer readable storage medium
CN115248680A (en) Software construction method, system, device, medium, and program product
CN115729604A (en) Micro application integration method, system, electronic device and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20890409

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20890409

Country of ref document: EP

Kind code of ref document: A1