CN110753119A - Application package deployment system based on K8s cluster - Google Patents

Application package deployment system based on K8s cluster Download PDF

Info

Publication number
CN110753119A
CN110753119A CN201911025115.5A CN201911025115A CN110753119A CN 110753119 A CN110753119 A CN 110753119A CN 201911025115 A CN201911025115 A CN 201911025115A CN 110753119 A CN110753119 A CN 110753119A
Authority
CN
China
Prior art keywords
application
application package
container
cluster
storage volume
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911025115.5A
Other languages
Chinese (zh)
Inventor
张少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN201911025115.5A priority Critical patent/CN110753119A/en
Publication of CN110753119A publication Critical patent/CN110753119A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Abstract

The embodiment of the invention discloses an application package deployment system based on a K8s cluster, which comprises a K8s management cluster and at least one K8s managed cluster; the K8s management cluster is provided with an application package management server for storing application package files, and each K8s managed cluster is provided with an initialization container and an application container. And the initialization container acquires the application package file from the application package management server according to the address information of the application package management server and stores the application package file. The initialization container and the application container share the same storage space, the application container can acquire the application package file from the storage space according to the corresponding data reading path, the application package file is copied to the working path of the application server, and the application server is started to decompress and deploy the application package file. The managed cluster of the K8s can realize the rapid containerized deployment of the application package without making a container mirror image of a specific application, and the application deployment efficiency of the K8s management software is improved.

Description

Application package deployment system based on K8s cluster
Technical Field
The invention relates to the technical field of container deployment, in particular to an application package deployment system based on a K8s cluster.
Background
Container technology is a more computing resource-saving and more flexible virtualization technology than virtual machine technology. With the development of container technology, a number of container arrangement engines have emerged for managing containers, and kubernets technology has emerged as a de facto standard in the field of container arrangement. Kubernetes is abbreviated K8 s. When the container technology is applied to an actual production environment, application system deployment using only K8s is difficult due to technical threshold, and for this reason, a software system for managing the K8s cluster needs to be developed.
In a software system for managing a K8s cluster, if an application package obtained by conventional software development is deployed in a container manner, an application package file and an application server image are often used to make a container image, which makes containerized deployment of applications difficult.
Therefore, how to reduce the difficulty of containerized deployment and achieve rapid deployment of applications is a problem to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the invention aims to provide an application package deployment system based on a K8s cluster, which can reduce the difficulty of containerization deployment and realize quick deployment of applications.
In order to solve the foregoing technical problem, an embodiment of the present invention provides an application package deployment system based on a K8s cluster, including a K8s management cluster and at least one K8s managed cluster; an application package management server for storing application package files is deployed in the K8s management cluster, and an initialization container and an application container are deployed in each K8s managed cluster; the initialization container and the application container share the same storage space;
the initialization container is used for acquiring an application package file from the application package management server according to the address information of the application package management server and storing the application package file;
and the application container is used for acquiring the application package file according to the data reading path, copying the application package file to a working path of an application server, and starting the application server to decompress and deploy the application package file.
Optionally, a first storage volume for storing the application package file is mounted on the application package management server.
Optionally, the K8s management cluster is configured to predefine a storage volume according to the received storage volume creation instruction, and mount the storage volume on the application package management server as the first storage volume.
Optionally, the initialization container and the application container mount a second storage volume;
the initialization container is specifically configured to store the application package file in a path of being mounted on the second storage volume after acquiring the application package file from the application package management server;
the application container is specifically used for acquiring the application package file according to the path mounted on the second storage volume.
Optionally, the K8s managed cluster is configured to predefine a storage volume according to the received storage volume creation instruction, and mount the storage volume as a second storage volume on the initialization container and the application container, respectively.
Optionally, the K8s managed cluster is further configured to release the second storage volume after the application server completes decompressing and deploying the application package file.
Optionally, the application package management server is an FTP server.
According to the technical scheme, the application package deployment system based on the K8s cluster comprises a K8s management cluster and at least one K8s managed cluster; the K8s management cluster is provided with an application package management server for storing application package files, and each K8s managed cluster is provided with an initialization container and an application container. One container can only execute one task, and the managed cluster deploys an initialization container at K8s to realize the interaction with the application package management server; the managed cluster deploys the application container at K8s, enabling interaction with the application servers. The initialization container may obtain the application package file from the application package management server according to the address information of the application package management server, and store the application package file. Because the initialization container and the application container share the same storage space, the application container can acquire the application package file from the storage space according to the corresponding data reading path, copy the application package file to the working path of the application server, and start the application server to decompress and deploy the application package file. Through the mutual matching of the application package management server, the initialization container and the application container, each managed cluster of K8s can acquire an application package file from the managed cluster of K8s, and the managed cluster of K8s can realize the rapid container deployment of the application package without making a container mirror image of a specific application, so that the application deployment efficiency of the management software of K8s is improved.
Drawings
In order to illustrate the embodiments of the present invention more clearly, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a schematic structural diagram of an application package deployment system based on a K8s cluster according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative work belong to the protection scope of the present invention.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Next, an application package deployment system based on the K8s cluster provided by the embodiment of the present invention is described in detail. Fig. 1 is a schematic structural diagram of an application package deployment system based on a K8s cluster, which includes a K8s management cluster 1 and at least one K8s managed cluster 2. Fig. 1 is a schematic diagram illustrating 1 managed cluster 2 of K8s as an example, and in the embodiment of the present invention, the number of the managed clusters 2 of K8s is not limited.
The application package management server 11 for storing the application package file is deployed in the K8s management cluster 1, and the initialization container 21 and the application container 22 are deployed in each K8s managed cluster 2; the initialization container 21 shares the same storage space as the application container 22.
In an embodiment of the present invention, one K8s managing cluster 1 may provide an application package file to multiple K8s managed clusters 2 at the same time. Each K8s managed cluster 2 implements containerized deployment of application packages in a similar manner, and in the following description, a K8s managed cluster 2 is used as an example for description.
The initialization container 21 and the application container 22 are provided in the managed cluster 2 at K8s, depending on the task to be performed. The initialization container 21 is a container in the pod of K8s that is dedicated to initialization, and the initialization container 21 can be used to acquire the application package file.
In a specific implementation, the initialization container 21 may obtain the application package file from the application package management server 11 according to the address information of the application package management server 11, and store the application package file.
The initialization container 21 may store the acquired application package file in a mounted path thereof, and the initialization container 21 and the application container 22 share the same storage space, so that the application container 22 can acquire the application package file according to a data reading path.
The application container 22 may copy the application package file to the working path of the application server, and initiate the application server to decompress and deploy the application package file.
In the embodiment of the invention, the storage volume can be adopted to store the application package file, and the storage volume can realize the persistent storage of the application package file.
Taking K8s as an example for managing the cluster 1, a first storage volume for storing an application package file may be mounted on the application package management server 11.
The first storage volume may be predefined by a user, the user may input a storage volume creation instruction to the server of the K8s management cluster 1, and the K8s management cluster 1 predefines a storage volume according to the received storage volume creation instruction and mounts the storage volume as the first storage volume on the application package management server 11.
In practical applications, the application package management server 11 may employ a File Transfer Protocol (FTP) server.
Taking K8s as an example for managed cluster 2, initialization container 21 and application container 22 may mount a second storage volume.
Similarly to the manner of creating the first storage volume, the second storage volume may be predefined by a user, the user may input a storage volume creation instruction to the server of the K8s managed cluster 2, and the K8s managed cluster 2 may predefine a storage volume according to the received storage volume creation instruction, and mount the storage volume as the second storage volume on the initialization container 21 and the application container 22, respectively.
Accordingly, after acquiring the application package file from the application package management server 11, the initialization container 21 may store the application package file in a path of being mounted on the second storage volume; the application container 22 may obtain the application package file according to the path mounted on the second storage volume.
In the embodiment of the present invention, the initialization container 21 and the application container 22 both mount the same storage volume, and after the initialization container 21 is started, the uploaded application package file is obtained from the FTP service deployed in the cluster where the K8s management software is located, that is, the K8s management cluster 1, in an FTP manner, and is stored in the path mounted in the initialization container 21. Then, the application container 22 is started, and since the initialization container 21 and the application container 22 mount the same storage volume, the application package file stored in the initialization container 21 can be seen in the path where the application container 22 mounts the storage volume. The application container 22 copies the application package file to the working path of the application server, and then starts the application server, at this time, the application server will automatically decompress and deploy the application package file in the working path, so that the application server can provide the service provided by the application package file after starting.
In the embodiment of the present invention, after the K8s is completed by the application server of the management cluster 2 to decompress and deploy the application package file, the second storage volume may be released in order to reduce the occupation of the storage resource.
According to the technical scheme, the application package deployment system based on the K8s cluster comprises a K8s management cluster and at least one K8s managed cluster; the K8s management cluster is provided with an application package management server for storing application package files, and each K8s managed cluster is provided with an initialization container and an application container. One container can only execute one task, and the managed cluster deploys an initialization container at K8s to realize the interaction with the application package management server; the managed cluster deploys the application container at K8s, enabling interaction with the application servers. The initialization container may obtain the application package file from the application package management server according to the address information of the application package management server, and store the application package file. Because the initialization container and the application container share the same storage space, the application container can acquire the application package file from the storage space according to the corresponding data reading path, copy the application package file to the working path of the application server, and start the application server to decompress and deploy the application package file. Through the mutual matching of the application package management server, the initialization container and the application container, each managed cluster of K8s can acquire an application package file from the managed cluster of K8s, and the managed cluster of K8s can realize the rapid container deployment of the application package without making a container mirror image of a specific application, so that the application deployment efficiency of the management software of K8s is improved.
The application package deployment system based on the K8s cluster provided by the embodiment of the present invention is described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

Claims (7)

1. The application package deployment system based on the K8s cluster is characterized by comprising a K8s management cluster and at least one K8s managed cluster; an application package management server for storing application package files is deployed in the K8s management cluster, and an initialization container and an application container are deployed in each K8s managed cluster; the initialization container and the application container share the same storage space;
the initialization container is used for acquiring an application package file from the application package management server according to the address information of the application package management server and storing the application package file;
and the application container is used for acquiring the application package file according to the data reading path, copying the application package file to a working path of an application server, and starting the application server to decompress and deploy the application package file.
2. The system according to claim 1, wherein a first storage volume for storing the application package file is mounted on the application package management server.
3. The system according to claim 2, wherein the K8s management cluster is configured to predefine a storage volume according to the received storage volume creation instruction, and mount the storage volume as the first storage volume on the application package management server.
4. The system of claim 1, wherein the initialization container and the application container mount a second storage volume;
the initialization container is specifically configured to store the application package file in a path of being mounted on the second storage volume after acquiring the application package file from the application package management server;
the application container is specifically used for acquiring the application package file according to the path mounted on the second storage volume.
5. The system according to claim 4, wherein the K8s managed cluster is configured to predefine a storage volume according to the received storage volume creation instruction, and mount the storage volume as a second storage volume on the initialization container and the application container, respectively.
6. The system of claim 5, wherein the K8s managed cluster is further configured to release the second storage volume after an application server completes decompressing and deploying the application package file.
7. The system of claim 1, wherein the application package management server is an FTP server.
CN201911025115.5A 2019-10-25 2019-10-25 Application package deployment system based on K8s cluster Pending CN110753119A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911025115.5A CN110753119A (en) 2019-10-25 2019-10-25 Application package deployment system based on K8s cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911025115.5A CN110753119A (en) 2019-10-25 2019-10-25 Application package deployment system based on K8s cluster

Publications (1)

Publication Number Publication Date
CN110753119A true CN110753119A (en) 2020-02-04

Family

ID=69280080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911025115.5A Pending CN110753119A (en) 2019-10-25 2019-10-25 Application package deployment system based on K8s cluster

Country Status (1)

Country Link
CN (1) CN110753119A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113556375A (en) * 2020-04-26 2021-10-26 阿里巴巴集团控股有限公司 Cloud computing service method and device, electronic equipment and computer storage medium
US11526599B2 (en) 2021-04-19 2022-12-13 International Business Machines Corporation Clustered application policy generation

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130151706A1 (en) * 2011-12-08 2013-06-13 Microsoft Corporation Resource launch from application within application container
CN103942063A (en) * 2013-11-08 2014-07-23 国家电网公司 Centralized configuration and remote deployment method for Java Web application
CN105653329A (en) * 2015-12-30 2016-06-08 国网信息通信产业集团有限公司 Application management method, apparatus and system
CN106357738A (en) * 2016-08-26 2017-01-25 北京奇虎科技有限公司 Automatic arrangement method for server cluster and device as well as system thereof
CN106502797A (en) * 2016-10-28 2017-03-15 郑州云海信息技术有限公司 A kind of group system and the dispositions method of group system
US20170206123A1 (en) * 2016-01-15 2017-07-20 Google Inc. Application containers with updatable application programming interface layers
CN107391141A (en) * 2017-07-26 2017-11-24 浪潮软件集团有限公司 Full-memory operating system supporting container operation
CN109992278A (en) * 2017-12-29 2019-07-09 中国移动通信集团北京有限公司 A kind of application issued method and device based on container

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130151706A1 (en) * 2011-12-08 2013-06-13 Microsoft Corporation Resource launch from application within application container
CN103942063A (en) * 2013-11-08 2014-07-23 国家电网公司 Centralized configuration and remote deployment method for Java Web application
CN105653329A (en) * 2015-12-30 2016-06-08 国网信息通信产业集团有限公司 Application management method, apparatus and system
US20170206123A1 (en) * 2016-01-15 2017-07-20 Google Inc. Application containers with updatable application programming interface layers
CN106357738A (en) * 2016-08-26 2017-01-25 北京奇虎科技有限公司 Automatic arrangement method for server cluster and device as well as system thereof
CN106502797A (en) * 2016-10-28 2017-03-15 郑州云海信息技术有限公司 A kind of group system and the dispositions method of group system
CN107391141A (en) * 2017-07-26 2017-11-24 浪潮软件集团有限公司 Full-memory operating system supporting container operation
CN109992278A (en) * 2017-12-29 2019-07-09 中国移动通信集团北京有限公司 A kind of application issued method and device based on container

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113556375A (en) * 2020-04-26 2021-10-26 阿里巴巴集团控股有限公司 Cloud computing service method and device, electronic equipment and computer storage medium
US11526599B2 (en) 2021-04-19 2022-12-13 International Business Machines Corporation Clustered application policy generation

Similar Documents

Publication Publication Date Title
EP3355193B1 (en) Security-based container scheduling
US20110131293A1 (en) Data delivery apparatus and data delivery method
CN113296792B (en) Storage method, device, equipment, storage medium and system
CN106371889B (en) Method and device for realizing high-performance cluster system of scheduling mirror image
CN106713493B (en) System and method for constructing distributed file in computer cluster environment
CN104750555A (en) Management method and device for progresses in Android program
CN114615340B (en) Request processing method and device, computer equipment and storage device
CN110753119A (en) Application package deployment system based on K8s cluster
CN112600931B (en) API gateway deployment method and device
CN110083366B (en) Application running environment generation method and device, computing equipment and storage medium
CN110045998A (en) Load the method and device of dynamic base
CN113420005A (en) Data storage method, system, electronic device and computer storage medium
CN111459619A (en) Method and device for realizing service based on cloud platform
CN115016862A (en) Kubernetes cluster-based software starting method, device, server and storage medium
CN111488322B (en) File system service method and device and server equipment
US20230062517A1 (en) Storage Provisioning
CN114579127A (en) Page deployment method and device, computer equipment and storage medium
CN112583740B (en) Network communication method and device
CN111435299B (en) Application processing method and device
CN113821303A (en) Method and device for deploying hardor cluster and readable storage medium
CN112597406A (en) File transmission method and device, terminal equipment and storage medium
CN114911421B (en) Data storage method, system, device and storage medium based on CSI plug-in
CN111078135A (en) Enhanced data storage for virtual nodes in a data processing environment
CN111694611B (en) Data processing method and device and electronic equipment
CN112162757A (en) Client dependency relationship processing method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200204

RJ01 Rejection of invention patent application after publication