CN115562691A - Container-based cloud application publishing method and system - Google Patents
Container-based cloud application publishing method and system Download PDFInfo
- Publication number
- CN115562691A CN115562691A CN202211547424.0A CN202211547424A CN115562691A CN 115562691 A CN115562691 A CN 115562691A CN 202211547424 A CN202211547424 A CN 202211547424A CN 115562691 A CN115562691 A CN 115562691A
- Authority
- CN
- China
- Prior art keywords
- application
- cloud
- container
- mirror image
- publishing
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 29
- 238000004806 packaging method and process Methods 0.000 claims description 10
- 230000008569 process Effects 0.000 abstract description 9
- 238000010586 diagram Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 230000006872 improvement Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/63—Image based installation; Cloning; Build to order
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a container-based cloud application publishing method and system, and belongs to the technical field of cloud computing. According to the cloud application publishing method and system, the cloud application to be published is described by using the application publishing template, the application mirror image is packaged according to the application publishing template, the corresponding application mirror image is pushed to the mirror image warehouse, and finally the container cloud platform is informed to obtain the corresponding application mirror image from the mirror image warehouse and start the corresponding application mirror image to complete cloud application publishing. According to the cloud application publishing method and device, a set of automatic process is realized to publish the cloud application, the problem that manual operation needs to be carried out for many times in the whole technical process of traditional cloud application publishing is solved, automation capacity is provided for the cloud application publishing process, and cloud application publishing efficiency is improved.
Description
Technical Field
The invention relates to the technical field of cloud computing, in particular to a container-based cloud application publishing method and system.
Background
Currently, in the field of cloud computing, applications need to be rapidly and flexibly released to a cloud platform. To achieve this objective and solve the above problems, virtualization technologies have been developed. The container technology is an indispensable ring in the development of virtualization technology in the cloud computing industry in recent years.
In computer technology, a container is a more lightweight and flexible way of virtualization, which packages everything needed by an application together. The container contains all code, various dependencies and even the operating system, which allows applications to run almost anywhere. Ensuring proper operation of the application moving from one environment to another. It just virtualizes the operating system, not to the underlying computer as a virtual machine. The container technology has the advantages that all service applications can directly run on an operating system of a physical host, a disk can be directly read and written, the applications are isolated through a namespace of calculation, storage and network resources, and a logically independent container operating system is formed for each application.
In the existing container-based cloud application release process, four steps of manual operation are often required, namely: the method comprises the steps of manually positioning an application file, manually constructing a container mirror image, manually pushing the container mirror image and manually deploying the container mirror image. For a user, the steps are complicated and not smooth, and even operation errors are easy to occur, so that the cloud application release quality and efficiency are influenced. Accordingly, there is a need for a corresponding improvement.
Disclosure of Invention
Aiming at the defects and shortcomings in the prior art, the invention aims to provide a container-based cloud application publishing method and system so as to conveniently publish an application on a cloud platform, improve publishing efficiency and reduce cloud application publishing time and labor cost.
Specifically, the invention discloses a cloud application release method based on a container, which adopts the technical scheme that: the cloud application to be issued is described by using an application issuing template file, the application issuing template file comprises a use description, a mirror image description file and a program starting file, the use description describes a description of the mirror image description file and the program starting file in the application issuing template file, the mirror image description file describes a related command executed by the cloud application to be issued, and the program starting file comprises a related application program operated by the cloud application to be issued and/or a called application resource; according to the application release template file, the cloud application to be released is packaged into an application mirror image, and the corresponding application mirror image is pushed to a mirror image warehouse; and informing the container cloud platform to acquire and start the corresponding application mirror image from the mirror image warehouse, and completing the release of the cloud application to be released.
Further, the content of the image description file specifically includes: the cloud application to be issued inherits the command of the basic mirror image; a command of constructing a mirror image by the cloud application needing to be issued; the issued commands used when the cloud application running program starts the file are needed.
Further, the base image includes an operating system, a language compilation environment, and a monitor.
Further, the program starting file is formed by placing the relevant application programs and/or application resources operated by the cloud application to be published under the directory position specified by the usage description according to the usage description of the application publishing template file.
Further, the content of the image description file is formed by writing a related command executed by the cloud application to be published into the image description file according to the use specification of the application publishing template file.
Further, the step of packaging the cloud application to be published into the application mirror image according to the application publishing template file and pushing the corresponding application mirror image to the mirror image warehouse is that the application publishing template file is analyzed by calling an interface of a docker service, the cloud application to be published is packaged into the application mirror image according to the content of the application publishing template file, and the application mirror image is pushed to the mirror image warehouse by calling the interface of the docker service.
Further, the informing of the container cloud platform of acquiring and starting the corresponding application image from the image warehouse is to send parameter information including CPU information, memory information, hard disk resource information, and a container start command through an interface of a calling container cloud platform, pull the corresponding application image from the image warehouse by the container cloud platform according to the parameter information, generate and start a container according to the application image, configure a distribution numerical value including the size of the CPU, the memory, and the hard disk when the container is running, complete the creation of the corresponding application container, execute a related command by the corresponding application container, run a related application program, and/or call an application resource.
The invention discloses a container-based cloud application release system which uses the cloud application release method to release cloud applications, and the method comprises the following steps:
the application configuration unit is used for configuring an application release template file corresponding to the cloud application to be released;
the application packaging unit is used for packaging the cloud application to be published into an application mirror image according to the configured application publishing template file;
the mirror image issuing unit is used for pushing the packed application mirror image to a mirror image warehouse;
and the application deployment unit informs the container cloud platform to acquire and start the corresponding application mirror image from the mirror image warehouse, and completes the release of the cloud application to be released.
Further, the application publishing template file configured by the application configuration unit is from an existing application publishing template file already stored in the publishing system or a new application publishing template file newly uploaded to the publishing system.
Further, the application configuration unit determines a container cloud platform that needs to publish the application.
The invention has the following beneficial effects: according to the cloud application publishing method and device, the cloud application to be published is described by using the application publishing template file, so that the cloud application is published by using a set of automatic process, the problem that manual operation needs to be carried out for many times in the whole technical process of traditional cloud application publishing is solved, automation capacity is provided for the cloud application publishing process, and the cloud application publishing efficiency is improved.
Drawings
FIG. 1 is a diagram of an embodiment 1 of the present invention.
Fig. 2 is a schematic diagram of the contents of an image description file.
FIG. 3 is a schematic diagram of a process for building an application image and publishing the image.
Fig. 4 is an architectural diagram of a container-based cloud application publication system.
Fig. 5 is a content structure diagram of application mirroring.
Detailed Description
The invention is further described below with reference to the drawings and examples.
Example 1:
an embodiment of the present invention is a cloud application publishing system based on a container, and an architecture of the system is shown in fig. 4, and the system mainly includes the following four constituent units, which are:
and the application configuration unit is used for configuring an application release template file corresponding to the cloud application to be released.
And the application packaging unit is used for packaging the cloud application to be published into the application mirror image according to the configured application publishing template file.
And the mirror image releasing unit is used for pushing the packed application mirror image to a mirror image warehouse.
And the application deployment unit informs the container cloud platform to acquire and start the corresponding application mirror image from the mirror image warehouse, and completes the release of the cloud application to be released.
The content of the application publishing template file comprises three parts of a use description, a mirror image description file and a program starting file, wherein the use description describes the description of the mirror image description file and the program starting file in the application publishing template file; the mirror image description file describes related commands executed by the cloud application to be issued, and the content of the mirror image description file is formed by writing the related commands executed by the cloud application to be issued into the mirror image description file according to the use specification of the application issuing template file; the program starting file comprises related application programs and/or called application resources operated by the cloud application to be published, and is formed by placing the related application programs and/or the application resources operated by the cloud application to be published under a directory position specified by a use description according to the use description of the application publishing template file.
As shown in fig. 2, the content of the image description file specifically includes: the cloud application to be issued inherits the command of the basic mirror image; a command of mirror image is constructed by the cloud application needing to be issued; the issued commands used when the cloud application running program starts the file are needed. The basic mirror image comprises an operating system, a language compiling environment and a monitoring program (Agent program), and provides a default system running environment and a container monitoring function for application running. The command of constructing the mirror image allows the custom addition of the mirror image construction command, and enriches the system environment and components in the basic mirror image. Commands used when the program starting file is operated comprise commands for starting the program in the basic image, and also allow custom addition of starting commands or other commands of the application program of the cloud application to be issued.
In this embodiment, the application publishing template file configured by the application configuration unit is from an existing application publishing template file already stored in the publishing system, or may be a new application publishing template file newly uploaded to the publishing system. When designing a new application publishing template file, the existing application publishing template file may be modified to change the corresponding usage specification, image description file, and program startup file, for example, placing a new application program and application resources in the template file to update the program startup file.
The release system can be designed to release the application on various container cloud platforms, the application configuration unit determines the container cloud platform needing to release the application, and the plurality of container cloud platforms are allowed to be selected as the release platform.
As shown in fig. 3, the application packaging unit performs identification and analysis on the application release template file configured by the application configuration unit by calling an interface of the docker service, determines relevant information such as a basic image and an application file required by the application release according to the content of the application release template file, and constructs an application image, so as to package a cloud application to be released into an application image, and then pushes the application image to an image warehouse by calling the interface of the docker service, thereby implementing image release. The resulting application image content structure is shown in fig. 5.
And finally, the application deployment unit informs the container cloud platform to acquire and start a corresponding application mirror image from the mirror image warehouse, parameter information including CPU information, memory information, hard disk resource information and a container start command is sent by calling an interface of the container cloud platform, the container cloud platform pulls the corresponding application mirror image from the mirror image warehouse according to the parameter information, the container is generated and started according to the application mirror image, distribution numerical values including the sizes of the CPU, the memory and the hard disk during the operation of the container are configured, the creation of the corresponding application container is completed, the corresponding application container executes the related command, operates the related application program and/or calls the application resource, and finally the release of the cloud application to be released is completed.
The following description takes an example of selecting to publish a new application (the new application is obtained by modifying an existing application publishing template) on the k8s cloud platform, and a specific implementation process of the new application is shown in fig. 1:
s1) selecting a k8S cloud platform as a container cloud platform needing to release an application in a release system;
s2) then, acquiring an application release template file from a release system, and modifying the application release template file to form a new application release template file;
s3) uploading a new application release template file to a release system;
s4) the release system automatically packs the application mirror image according to the new application release template file and pushes the application mirror image to a mirror image warehouse;
and S5) the release system automatically informs the k8S cloud platform to acquire and start the mirror image as an application container, and application release is completed.
The above description is only a preferred embodiment of the present invention, and should not be construed as limiting the scope of the present invention. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims (10)
1. A cloud application release method based on a container is characterized by comprising the following steps:
the cloud application needing to be issued is described by using an application issuing template file, the application issuing template file comprises a use description, a mirror image description file and a program starting file, the use description describes a description of the mirror image description file and the program starting file in the application issuing template file, the mirror image description file describes a related command executed by the cloud application needing to be issued, and the program starting file comprises a related application program operated by the cloud application needing to be issued and/or a called application resource;
according to the application release template file, the cloud application to be released is packaged into an application mirror image, and the corresponding application mirror image is pushed to a mirror image warehouse;
and informing the container cloud platform to acquire and start the corresponding application mirror image from the mirror image warehouse, and completing the release of the cloud application to be released.
2. The container-based cloud application publishing method according to claim 1, wherein the content of the image description file specifically comprises:
the cloud application to be issued inherits the command of the basic mirror image;
a command of constructing a mirror image by the cloud application needing to be issued;
the issued commands used when the cloud application running program starts the file are needed.
3. The container-based cloud application publishing method of claim 2, wherein said base image comprises an operating system, a language compilation environment, and a monitor.
4. The container-based cloud application publishing method according to claim 1, wherein the program launch file is formed by placing the relevant application programs and/or application resources run by the cloud application to be published under the directory location specified by the usage specification according to the usage specification of the application publishing template file.
5. The container-based cloud application publishing method according to claim 1, wherein the content of the image description file is formed by writing a related command executed by the cloud application to be published into the image description file according to the usage specification of the application publishing template file.
6. The method for publishing the cloud application based on the container according to any of claims 1~5, wherein the packaging of the cloud application to be published as the application image according to the application publishing template file and the pushing of the corresponding application image to the image repository are performed by parsing the application publishing template file by calling an interface of a docker service, packaging the cloud application to be published as the application image according to the content of the application publishing template file, and pushing the application image to the image repository by calling the interface of the docker service.
7. The method for releasing container-based cloud application of claim 1~5, wherein the notifying the container cloud platform to obtain and start a corresponding application image from the image repository is sending parameter information including CPU information, memory information, hard disk resource information, and a container start command through calling an interface of the container cloud platform, the container cloud platform pulling the corresponding application image from the image repository according to the parameter information, generating and starting a container according to the application image, configuring a distribution value including the size of the CPU, the memory, and the hard disk when the container is running, completing creation of a corresponding application container, executing a related command by the corresponding application container, running a related application program, and/or calling an application resource.
8. A container-based cloud application publishing system for publishing a cloud application using the cloud application publishing method of any of claims 1~7, comprising:
the application configuration unit is used for configuring an application release template file corresponding to the cloud application to be released;
the application packaging unit is used for packaging the cloud application to be published into an application mirror image according to the configured application publishing template file;
the mirror image issuing unit is used for pushing the packed application mirror image to a mirror image warehouse;
and the application deployment unit informs the container cloud platform to acquire and start the corresponding application mirror image from the mirror image warehouse, and completes the release of the cloud application to be released.
9. The cloud application publishing system of claim 8, wherein the application publishing template file configured by the application configuration unit is from an existing application publishing template file already stored in the publishing system or a new application publishing template file newly uploaded into the publishing system.
10. The cloud application publishing system of claim 8 or 9, wherein the application configuration unit further determines a container cloud platform on which the application needs to be published.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211547424.0A CN115562691A (en) | 2022-12-05 | 2022-12-05 | Container-based cloud application publishing method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211547424.0A CN115562691A (en) | 2022-12-05 | 2022-12-05 | Container-based cloud application publishing method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115562691A true CN115562691A (en) | 2023-01-03 |
Family
ID=84770761
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211547424.0A Pending CN115562691A (en) | 2022-12-05 | 2022-12-05 | Container-based cloud application publishing method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115562691A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108205481A (en) * | 2016-12-19 | 2018-06-26 | 华为技术有限公司 | The container instance creation method and device of application |
CN108984205A (en) * | 2018-07-26 | 2018-12-11 | 浙江大学 | A kind of method and device of application automation building and deployment based on container technique |
US20190213004A1 (en) * | 2016-08-19 | 2019-07-11 | Huawei Technologies Co., Ltd. | Application component deployment method and deployment node |
CN110502577A (en) * | 2019-08-15 | 2019-11-26 | 苏州浪潮智能科技有限公司 | A kind of method, equipment and the medium of the application of cloud management Platform deployment container |
CN111459509A (en) * | 2020-03-27 | 2020-07-28 | 北京金山云网络技术有限公司 | Container mirror image construction method and device and server |
-
2022
- 2022-12-05 CN CN202211547424.0A patent/CN115562691A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190213004A1 (en) * | 2016-08-19 | 2019-07-11 | Huawei Technologies Co., Ltd. | Application component deployment method and deployment node |
CN108205481A (en) * | 2016-12-19 | 2018-06-26 | 华为技术有限公司 | The container instance creation method and device of application |
CN108984205A (en) * | 2018-07-26 | 2018-12-11 | 浙江大学 | A kind of method and device of application automation building and deployment based on container technique |
CN110502577A (en) * | 2019-08-15 | 2019-11-26 | 苏州浪潮智能科技有限公司 | A kind of method, equipment and the medium of the application of cloud management Platform deployment container |
CN111459509A (en) * | 2020-03-27 | 2020-07-28 | 北京金山云网络技术有限公司 | Container mirror image construction method and device and server |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017092672A1 (en) | Method and device for operating docker container | |
US8185889B2 (en) | Methods and systems for porting software packages from one format to another | |
CN106406960B (en) | Method for rapidly deploying software in linux environment | |
CN102053831B (en) | Linux operating system customizing method and system | |
CN108897547B (en) | Software automation deployment method and device | |
CN109343854B (en) | Intelligent automatic compiling method and system based on zynq system | |
CN108196843A (en) | Visualization Docker containers compile the O&M method of deployment automatically | |
CN110088733A (en) | The layout based on accumulation layer of virtual machine (vm) migration | |
CN102004635B (en) | Simulation model system supporting reusing and development method thereof | |
US20170153930A1 (en) | Application container runtime | |
US20100138808A1 (en) | Embedded system design device and a method thereof using a target independent model | |
CN105204913A (en) | Method and system for running Linux application on Android operating system and system | |
CN104317642A (en) | Method and device for configuring software in cloud calculation environment | |
JP4836419B2 (en) | Online modification of CIL code program for industrial automation | |
CN111857801B (en) | Construction method of mobile application | |
CN112068845A (en) | Multi-architecture-adaptive containerized CICD service deployment method and device | |
CN114461182A (en) | Method and device for pipeline construction, electronic equipment and computer readable storage medium | |
CN111158743A (en) | Big data operation and maintenance management platform | |
CN111813420A (en) | Method for carrying out automated performance test on OpenStack cluster | |
CN113760462B (en) | Construction method and device for verification environment of dispatching automation system | |
CN107544813B (en) | Switching method and system for static library configuration | |
CN115562691A (en) | Container-based cloud application publishing method and system | |
JP2015125713A (en) | Programmable controller and system, support device thereof, programmable controller, and program | |
CN110806891A (en) | Method and device for generating software version of embedded equipment | |
CN103150181B (en) | Method and device for starting process |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20230103 |