CN109167826B - Method, device and system for putting WEB application on shelf - Google Patents

Method, device and system for putting WEB application on shelf Download PDF

Info

Publication number
CN109167826B
CN109167826B CN201810952359.7A CN201810952359A CN109167826B CN 109167826 B CN109167826 B CN 109167826B CN 201810952359 A CN201810952359 A CN 201810952359A CN 109167826 B CN109167826 B CN 109167826B
Authority
CN
China
Prior art keywords
web application
cpk
application
container
package
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810952359.7A
Other languages
Chinese (zh)
Other versions
CN109167826A (en
Inventor
符兴斌
李锁在
韩鹏
程志斌
徐志亮
宋天朝
鲁振
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chinasoft Information System Engineering Co ltd
Original Assignee
Chinasoft Information System Engineering 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 Chinasoft Information System Engineering Co ltd filed Critical Chinasoft Information System Engineering Co ltd
Priority to CN201810952359.7A priority Critical patent/CN109167826B/en
Publication of CN109167826A publication Critical patent/CN109167826A/en
Application granted granted Critical
Publication of CN109167826B publication Critical patent/CN109167826B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method, a device and a system for putting on the shelf of WEB application, which relate to the technical field of information security, and the method is applied to front-end equipment of a system for putting on the shelf of WEB application, and comprises the following steps: firstly, packaging a WEB application source file based on a preset CPK package specification to generate a CPK package; wherein, the CPK packet specification comprises the application range of the CPK packet; then uploading the data files in the CPK package to a preset shared storage; after receiving a synchronization notification from the container cloud, acquiring an operation instruction from an administrator; sending an operation instruction to the container cloud so that the container cloud generates a container of the target WEB application based on the operation instruction; updating the CPK package when the accessible address of the target WEB container is received through the container cloud; and taking the updated CPK package as a target WEB application, and putting the target WEB application on shelf. The method provided by the invention defines the application range of the CPK package through the CPK package specification, can limit the access authority of the user, and effectively improves the security of the WEB application service.

Description

Method, device and system for putting WEB application on shelf
Technical Field
The invention relates to the technical field of information security, in particular to a method, a device and a system for putting on the shelf of WEB application.
Background
With the rapid development of the current world informatization technology, information safety becomes one of the key points of informatization construction, and the construction of a safe and efficient application software service system is very important.
At present, a WEB website is built to provide application service for a user; or publish the application service through the operator's application assistant. Such a method does not generally limit the access rights of users, has low security, and is not suitable for providing application services for group users who need to engage in special services.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus, and a system for installing a WEB application to improve security of WEB application services.
In a first aspect, an embodiment of the present invention provides a method for shelving WEB applications, where the method is applied to a front-end device of a shelving system for WEB applications, and the method includes: based on a preset CPK packaging specification, packaging a WEB application source file to generate a CPK package; wherein, the CPK packet specification comprises the application range of the CPK packet; cutting the CPK package, and uploading the data file in the CPK package to a preset shared memory; the data files comprise application mirror image files, application information files and starting container parameter configuration files; sending a data upload notification to the container cloud; after receiving a synchronization notification from a container cloud, acquiring an operation instruction from an administrator; the operation instruction comprises deploying WEB application, updating WEB application version and rolling back WEB application version; sending an operation instruction to the container cloud so that the container cloud generates a container of the target WEB application based on the operation instruction; updating the CPK package when receiving an accessible address of a container of a target WEB application from the container cloud; taking the updated CPK package as a target WEB application; and (4) putting on-shelf target WEB application.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where the step of encapsulating, based on a preset CPK packaging specification, a WEB application source file to generate a CPK package includes: carrying out parameter allocation operation on a WEB application source file so as to enable the WEB application source file to be suitable for a preset verification environment; the preset verification environment is consistent with the application environment of the container cloud; and packaging the WEB application source file after the parameters are allocated to generate a CPK package based on a preset CPK packaging specification.
In a second aspect, an embodiment of the present invention provides another method for shelving a WEB application, where the method is applied to a container cloud of a shelving system of the WEB application, and the method includes: receiving a data uploading notice from front-end equipment; extracting an application image file from a preset shared storage, and storing the application image file into a preset image warehouse; the shared storage is used for storing shared files of the container cloud and the front-end equipment; the shared file at least comprises an application image file; synchronizing an application image file in an image warehouse to a computing node, and sending a synchronization notice to front-end equipment; when an operation instruction from an administrator is received through front-end equipment, instantiation operation is performed on a target application image file corresponding to the operation instruction on a computing node to generate a container of a target WEB application; the operation instruction comprises one or more of deployment of WEB application, update of WEB application version and rollback of WEB application version; and transmitting the accessible address of the container of the target WEB application to the front-end equipment, so that the front-end equipment shelves the target WEB application based on the accessible address.
With reference to the second aspect, an embodiment of the present invention provides a first possible implementation manner of the second aspect, where the shared file further includes an application information file and a start container parameter configuration file;
with reference to the first possible implementation manner of the second aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where the step of executing an instantiation operation on the target application image file corresponding to the operation indication on the computing node to generate a container of the target WEB application includes: searching a target application image file corresponding to the operation instruction on the computing node; extracting an application information file and a starting container parameter configuration file corresponding to a target application image file from a shared file; synchronizing the extracted application information file and the starting container parameter configuration file to a computing node; and instantiating a target image file on the computing node according to the application information file and the starting container parameter configuration file to generate a container of the target WEB application.
With reference to the second possible implementation manner of the second aspect, an embodiment of the present invention provides a third possible implementation manner of the second aspect, where when the operation indication includes updating the WEB application version or rolling back the WEB application version, the method further includes: and after the container of the target WEB application is generated, deleting the old version container prestored on the computing node.
With reference to the second aspect, an embodiment of the present invention provides a fourth possible implementation manner of the second aspect, where the step of transferring the accessible address of the container of the target WEB application to the front-end device, so that the front-end device shelves the target WEB application based on the accessible address, includes: running a container of the target WEB application based on a preset health check interface to obtain a running report; judging whether the operation report is abnormal or not; if not, sending an operation success notification to the front-end equipment, and transmitting an accessible address of the container of the WEB application to the front-end equipment; if yes, sending an operation failure notification to the front-end equipment, and transmitting an operation report to the front-end equipment; wherein the operation report includes operation error information.
In a third aspect, an embodiment of the present invention provides an on-shelf device for WEB applications, where the device is disposed in front-end equipment of an on-shelf system for WEB applications, and the device includes: the CPK package generating module is used for packaging the WEB application source file to generate a CPK package based on a preset CPK packaging specification; wherein, the CPK packet specification comprises the application range of the CPK packet; the data uploading module is used for cutting the CPK package and uploading the data files in the CPK package to a preset shared memory; the data files comprise application mirror image files, application information files and starting container parameter configuration files; the uploading notification sending module is used for sending a data uploading notification to the container cloud; the instruction acquisition module is used for acquiring an operation instruction from an administrator after receiving the synchronization notification from the container cloud; the operation instruction comprises deployment application, updated application version and rollback application version; the instruction sending module is used for sending an operation instruction to the container cloud so that the container cloud generates a container of the target WEB application based on the operation instruction; the CPK package updating module is used for updating the CPK package when receiving the accessible address of the container of the target WEB application from the container cloud; the WEB application determining module is used for taking the updated CPK package as a target WEB application; and the WEB application shelving module is used for shelving the target WEB application.
In a fourth aspect, an embodiment of the present invention provides another racking device for WEB applications, where the device is disposed in a container cloud of a racking system for WEB applications, and the device includes: the uploading notification receiving module is used for receiving a data uploading notification from the front-end equipment; the mirror image extraction and storage module is used for extracting the application mirror image file from the preset shared storage and storing the application mirror image file to a preset mirror image warehouse; the shared storage is used for storing shared files of the container cloud and the front-end equipment; the shared file at least comprises an application image file; the mirror image synchronization module is used for synchronizing the application mirror image files in the mirror image warehouse to the computing nodes and sending synchronization notifications to the front-end equipment; the image instantiation module is used for executing instantiation operation on a target application image file corresponding to the operation instruction on the computing node to generate a container of the target WEB application when the operation instruction from an administrator is received through the front-end equipment; the operation instruction comprises one or more of deployment of WEB application, update of WEB application version and rollback of WEB application version; and the address sending module is used for transmitting the accessible address of the container of the target WEB application to the front-end equipment so that the front-end equipment shelves the target WEB application based on the accessible address.
In a fifth aspect, an embodiment of the present invention provides a system for putting WEB applications on shelf, including front-end equipment and a container cloud; the front-end equipment is in communication connection with the container cloud; the front-end equipment is provided with the racking device for the WEB application provided by the third aspect, and the container cloud is provided with the racking device for the WEB application provided by the fourth aspect.
The embodiment of the invention provides a method, a device and a system for uploading WEB application, which are characterized by comprising the following steps of firstly packaging a WEB application source file into a CPK package based on a CPK package specification; deploying a container of the WEB application in the container cloud through interaction of the front-end equipment and the container cloud, updating the CPK package when the front-end equipment receives an accessible address of the container, and putting on shelf the target WEB application; and the application range of the CPK package is defined through the CPK package specification, so that the access right of the user can be limited. The mode provided by the embodiment of the invention effectively improves the safety of the WEB application service.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for putting WEB applications on shelf according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a specific implementation method of step S102 in the method shown in fig. 1 according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method for installing a WEB application on a shelf according to an embodiment of the present invention;
fig. 4 is a flowchart of WEB application deployment according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a WEB application update according to an embodiment of the present invention;
fig. 6 is a flowchart of a rollback of a WEB application according to an embodiment of the present invention;
fig. 7 is a block diagram illustrating a structure of a rack device for WEB applications according to an embodiment of the present invention;
FIG. 8 is a block diagram of another rack mount device for WEB applications according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a system for putting WEB applications on shelf according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Based on the construction of a domestic safe and reliable ecological system, a safe and efficient application software ecological service system needs to be constructed, the software application in the whole system is ensured to be safe and reliable, the application software in the system is subjected to safe verification and can be effectively monitored, and convenient and efficient distribution and deployment can be carried out in the whole ecological system. At present, application service is provided for a user by constructing a WEB website, and the user can access service content by inputting a service address at a user terminal; or obtain the application service, namely the desktop application program, through an application assistant provided by the operator. Such a method does not generally limit the access rights of users, has low security, and is not suitable for providing application services for group users and special users who need to engage in special services. Based on this, the method, the device and the system for putting on the shelf of the WEB application provided by the embodiment of the invention can effectively improve the security of the WEB application service.
To facilitate understanding of the embodiment, first, a detailed description is given to a method for installing a WEB application disclosed in the embodiment of the present invention.
Referring to fig. 1, a flowchart of a method for installing a WEB application on rack is shown, where the method is applied to a front-end device of an installation system for a WEB application, where the front-end device may be a device for providing application services, and is provided with an input interface for receiving an operation instruction from an administrator; the method comprises the following steps:
step S102, packaging a WEB application source file to generate a CPK package based on a preset CPK package specification; wherein, the CPK packet specification comprises the application range of the CPK packet;
step S104, cutting the CPK package, and uploading the data files in the CPK package to a preset shared memory; the data files comprise application mirror image files, application information files and starting container parameter configuration files; shared storage means that multiple devices can read the same partition of the same storage device, that is, shared files, and in such a way, multiple servers do not need to store copies of files respectively, thereby effectively saving space resources.
Step S106, sending a data uploading notification to the container cloud;
step S108, after receiving the synchronous notification from the container cloud, acquiring an operation instruction from an administrator; the operation instruction comprises deploying WEB application, updating WEB application version and rolling back WEB application version;
step S110, sending an operation instruction to the container cloud so that the container cloud generates a container of the target WEB application based on the operation instruction;
step S112, when the accessible address of the container of the target WEB application from the container cloud is received, updating the CPK package;
step S114, the updated CPK package is used as a target WEB application;
and step S116, putting the target WEB application on the shelf.
The embodiment of the invention provides a method for uploading WEB application, which is applied to front-end equipment of an uploading system of the WEB application, and the method comprises the following steps of firstly packaging a WEB application source file into a CPK package based on a CPK package specification; deploying a container of the CPK package corresponding to the target WEB application in the container cloud through interaction with the container cloud, and updating the CPK package when an accessible address of the container is received through the container cloud; taking the updated CPK package as a target WEB application, and putting the target WEB application on shelf; and the application range of the CPK package is defined through the CPK package specification, so that the access right of the user can be limited. The security of the WEB application service is effectively improved.
For convenience of understanding, in step S102, that is, based on the preset CPK packaging specification, the step of packaging the WEB application source file to generate the CPK package includes: carrying out parameter allocation operation on a WEB application source file so as to enable the WEB application source file to be suitable for a preset verification environment; the preset verification environment is consistent with the application environment of the container cloud; and packaging the WEB application source file after the parameters are allocated to generate a CPK package based on a preset CPK packaging specification. Specifically, the embodiment of the invention also provides a crowd funding application verification center; a set of verification environment which is the same as the container cloud application environment is arranged in the crowd funding application verification center; the WEB application source file can be verified and allocated to enable the WEB application source file to normally start service in the verification environment. Based on the crowd funding application verification center, an embodiment of the present invention provides a specific implementation manner of step S102 in the method shown in fig. 1, and as shown in fig. 2, the implementation manner includes the following steps:
and (1) performing parameter adjustment on a starting container parameter configuration file by a crowd funding application verification center developer to enable the WEB application to normally start service in a verification environment.
And (2) exporting the final corresponding application mirror image, database mirror image, middleware mirror image and application information file required by the deployment of WEB application and the like.
And (3) according to the CPK package specification, a CPK package of the WEB application is manufactured through a packaging command or a packaging tool.
The CPK package specification is a self-defined software installation package specification similar to rpm and deb packages under linux. After the verification of the public funding application verification center that the WEB application can be normally deployed, an operator puts the generated files such as the WEB application mirror image into the CPK package according to the CPK package manufacturing specification of the WEB application. The CPK package catalog standard for WEB applications is shown in table 1 below:
TABLE 1
Figure BDA0001771212340000081
Figure BDA0001771212340000091
Json describes, among others, basic information of the CPK specification format application. Including the unique identifier ID of the application, the application name, version, category, architecture, etc. Json file of the WEB application is generated according to the standard format and the content.
In addition, in order to ensure that the CPK package conforms to the CPK package specification without affecting subsequent applications thereof, the step S104 is executed, that is, the CPK package is cut, and before uploading the data files in the CPK package to a preset shared storage, security certification analysis is performed on the CPK package, and whether the files in the CPK package, such as application description information, icons, screenshots, and the like, conform to the CPK package specification is determined; if yes, the CPK package is judged to be qualified, the CPK package is cut, data files in the CPK package are uploaded to a preset shared memory, and the data files are named according to the directory specification constraint of the following table 2:
TABLE 2
Figure BDA0001771212340000092
Figure BDA0001771212340000101
Based on the directory specification shown in table 2, the step S106 is executed, that is, when the data upload notification is sent to the container cloud; the notification includes the unique identifier ID, the version number and the storage path of the CPK packet in the application information file uploaded by the front-end device, so that the container cloud can quickly find the corresponding application image file according to the ID, the version number and the storage path after receiving the notification, thereby effectively improving the operation efficiency of the container cloud.
Further, an embodiment of the present invention further provides another method for shelving a WEB application, where the method is applied to a container cloud of a system for shelving a WEB application, and referring to fig. 3, the method includes the following steps:
step S302, receiving a data uploading notification from a front-end device;
step S304, extracting the application image file from the preset shared storage, and storing the application image file to a preset image warehouse; the shared storage is used for storing shared files of the container cloud and the front-end equipment; the shared file at least comprises an application image file;
step S306, synchronizing the application image file in the image warehouse to the computing node, and sending a synchronization notice to the front-end equipment;
step S308, when receiving an operation instruction from an administrator through the front-end equipment, executing instantiation operation on a target application image file corresponding to the operation instruction on a computing node to generate a container of a target WEB application; the operation instruction comprises one or more of deployment of WEB application, update of WEB application version and rollback of WEB application version;
step S310, transmitting the accessible address of the container of the target WEB application to the front-end device, so that the front-end device shelves the target WEB application based on the accessible address.
The method for installing the WEB application provided by the embodiment of the invention is applied to a container cloud of an installing system of the WEB application, and firstly receives a data uploading notice of a front-end device to a preset shared storage to extract an application image file through interaction with the front-end device, and then the application image file is stored in an image warehouse and then is synchronized to a computing node. When receiving an operation instruction from an administrator through the front-end equipment, instantiating an application image file on the computing node to generate a container of the target WEB application, and transmitting an accessible address of the container to the equipment, so that the equipment can shelf the target WEB application based on the address. Based on the mode provided by the embodiment of the invention, an administrator can quickly and automatically generate the container of the target WEB application in the container cloud only by sending the operation instruction to the container cloud through the front-end equipment, so that the operation of the administrator is greatly simplified; meanwhile, the WEB application is isolated and deployed on the computing nodes of the container cloud in a container mode, so that the safety of the WEB application service is effectively improved.
Specifically, the shared file further includes an application information file and a start container parameter configuration file. Based on this, the instantiation operation performed on the target application image file corresponding to the operation instruction on the computing node to generate the container of the target WEB application in step S308 can be performed according to the following steps:
step (1), searching a target application image file corresponding to an operation instruction on a computing node;
step (2), extracting an application information file corresponding to the target application image file and a starting container parameter configuration file from the shared file;
step (3), synchronizing the extracted application information file and the starting container parameter configuration file to a computing node;
and (4) instantiating a target image file on the computing node according to the application information file and the starting container parameter configuration file to generate a container of the target WEB application. The application information file comprises an application ID and an application version number.
Further, in order to ensure reasonable allocation of resources on the computing nodes, the currently unnecessary container should be deleted in time, so that when the operation instruction includes updating the WEB application version or rolling back the WEB application version, the method applied to the container cloud further includes: and after the container of the target WEB application is generated, deleting the old version container prestored on the computing node. Specifically, when the operation instruction is to update the WEB application version, deleting the low-version container on the computing node; deleting the high version container on the compute node when the operation indicates to rollback the WEB application version.
In addition, an embodiment of the present invention further provides a specific implementation manner of step S310, that is, a step of transferring an accessible address of a container of a target WEB application to a front-end device, so that the front-end device shelves the target WEB application based on the accessible address, where the step includes:
step (1), based on a preset health check interface, operating a container of a target WEB application to obtain an operation report;
step (2), judging whether the operation report is abnormal; if not, executing the step (3); if yes, executing the step (4);
step (3), sending an operation success notification to the front-end equipment, and transmitting an accessible address of a container of the WEB application to the front-end equipment;
step (4), sending an operation failure notification to the front-end equipment, and transmitting an operation report to the front-end equipment; wherein the operation report includes operation error information.
In the specific implementation manner of step S310 provided in the embodiment of the present invention, before the accessible address of the container is transmitted to the front-end device, whether the container of the target WEB application operates abnormally is verified through the health check interface, which is beneficial to the on-shelf subsequent stable operation of the WEB application; and an operation report is transmitted to the front-end equipment when the operation is abnormal, so that developers can conveniently check and correct the error exit in time according to the operation report.
Further, in order to implement the above-mentioned method for installing a WEB application, according to different operation instructions of an administrator, the embodiment of the present invention provides a flow of deploying a WEB application as shown in fig. 4, a flow of updating a WEB application as shown in fig. 5, and a flow of rolling back a WEB application as shown in fig. 6. Wherein, the following subcenter is also the front-end equipment; the branch center is provided with operation buttons for an administrator to send operation instructions, such as a deployment button, an update button and a rollback button, so that WEB application of one-key deployment, update and rollback can be realized, and the operation experience of the administrator is greatly improved. The detailed flow is illustrated as follows:
WEB application deployment flow
The WEB application deployment process is shown in fig. 5, and the specific operation steps are as follows:
and (1) after receiving the mirror image file related to the WEB application to be deployed and synchronizing the mirror image file to the computing node, the container cloud informs the sub-center that the next deployment operation can be carried out. The branch center can click a 'deployment' button on the WEB application management interface by one key, and sends a notification of deploying the WEB application to the container cloud.
Step (2), the container cloud pulls the JOSN file from the shared storage; the JOSN file comprises an application information file and a starting parameter file, a WEB application image file is instantiated at a computing node, namely deployment application is deployed, a successful deployment notification is sent to the branch center after the health check is successful, and an accessible address of the application is transmitted to the branch center; and if the health check is unsuccessful, sending a deployment failure notice to the branch center, and transmitting the error reason to the branch center.
And (3) after the sub-center obtains the deployment application success message transmitted by the container cloud, storing an application access address into the sub-center, writing the application access address into the database and the application description information configuration file, and remanufacturing a CPK (Web application) package (without mirror image related files) into the CPK package directory (the application description information configuration file in the directory is written into a new WEB application access address) analyzed when the application is imported.
And (4) after the CPK package of the WEB application is re-manufactured by the branch center, automatically setting the CPK package to be in an application on-shelf state.
Exception handling: if the branch center receives the notification of the WEB application deployment failure, the interface displays that the application state is 'deployment failure', and the operation button is switched to 'redeployment'. And the sub-center collects specific reasons of WEB application deployment failure transmitted from the container cloud for reference and resolution of an administrator. And after the reason of the failure of deployment is solved, clicking the center to re-deploy, and performing deployment operation again.
(II) WEB application update flow
The WEB application update flow is shown in fig. 6, and the specific operation steps are as follows:
and (1) after the container cloud receives the high-version mirror image file related to the WEB application to be updated and synchronizes the high-version mirror image file to the computing node, the container cloud informs the sub-center that the next updating operation can be carried out. The branch center can click an 'update' button on the WEB application management interface by one key, and sends a notification of updating the WEB application to the container cloud.
Step (2), the container cloud pulls the JOSN file corresponding to the high-version mirror image file from the shared storage; the JOSN file comprises an application information file and a starting parameter file, and a high-version WEB application mirror image is instantiated at a computing node, namely, an application (high version) is deployed; deleting the instance (namely, the container) of the old version WEB application after the deployment is successful, simultaneously sending an update success notification to the branch center after the health check is successful, and transmitting an accessible address of the high version WEB application to the branch center; and if the health check is unsuccessful, sending an update failure notice to the sub-center, and transmitting the error reason to the sub-center.
And (3) after the sub-center obtains the application updating success message transmitted by the container cloud, storing an application access address into the sub-center, writing the application access address into the database and the application description information configuration file, remanufacturing a CPK (Web application) package (without mirror image related files) into the CPK package directory (the application description information configuration file in the directory is written into a new WEB application access address) analyzed when the application is imported, and deleting the old version of the CPK package.
And (4) automatically setting the application on shelf state after the CPK package of the high-version WEB application is re-made by the branch center.
Exception handling: if the branch center receives the notification of update failure of the WEB application, the interface displays that the application state is 'update failure', and the operation button is switched to 'update'. And the sub-center collects specific reasons of WEB application update failure transmitted from the container cloud for reference and resolution of an administrator. And after the reason of the update failure is solved, clicking the center to update again, and performing the update operation again.
(III) WEB application rollback flow
The WEB application rollback flow is shown as 6, and the specific operation steps are as follows:
and (1) after the update operation of the WEB application is finished, switching the operation button of the sub-center application management interface into a mode that the version can be rolled back. And clicking the rollback version by the administrator, and sending a version updating notice to the container cloud.
Step (2), the container cloud pulls the JOSN file corresponding to the low-version mirror image file from the shared storage; the JOSN file comprises an application information file and a starting parameter file, a low-version WEB application mirror image is instantiated at a computing node, namely, an application (low version) is deployed, after the deployment is successful, a high-version WEB application instance is deleted, meanwhile, a rollback success notification is sent to the branch center after the health check is successful, and an accessible address of the low-version WEB application is transmitted to the branch center; and if the health check is unsuccessful, sending a rollback failure notice to the sub-center, and transmitting the error reason to the sub-center.
And (3) after obtaining the application rollback success message transmitted by the container cloud, the sub-center writes an application access address into an internal storage, writes the database and the application description information configuration file, re-manufactures a CPK (no mirror image related file) package of the WEB application from a CPK package catalog analyzed when the application is imported (the application description information configuration file in the catalog is written into a new WEB application access address), and deletes the old version of the CPK package of the WEB application.
And (4) after the CPK package of the WEB application of the current version is manufactured again by the sub-center, automatically setting the CPK package to be in an application on-shelf state. The terminal user can log in the application assistant of the desktop to download and update the WEB application software installation package. After the installation is successful, the desktop can have a shortcut of the WEB application, and a user can quickly access the high-version WEB application service by clicking.
Exception handling: if the branch center receives the notification of the rollback failure of the WEB application, the interface displays that the application state is 'rollback failure', and the operation button is switched to 'rollback'. And the sub-center collects the specific reasons of the rollback failure of the WEB application transmitted from the container cloud for reference and resolution of an administrator. And after the reason of rollback failure is solved, clicking rollback in different centers, and performing rollback operation again.
In addition, in order to solve the problem of deployment or running state synchronization between the decentralized center and the WEB application deployed by the container cloud, the container cloud provides an execution state query interface for acquiring an application instance corresponding to the ID version number of the specified WEB application, and the decentralized center calls the interface to acquire the application execution state of a current version application container deployed/updated/rolled back or run by the container cloud or the state of a current version application image uploaded by the container cloud. In actual application, on a visual interface, the sub-center also provides a 'synchronous state' operation entrance to support a sub-center operation administrator to timely synchronize deployment, update, rollback and running states of all WEB applications currently imported into the sub-center, and to obtain a deployment or running failure reason under an abnormal deployment or running state so as to quickly position and timely investigate.
The method provided by the embodiment of the invention can realize the simple operation of deploying the WEB application software on the shelf, reliable operation and convenient maintenance. Maintenance management approaches such as system deployment, upgrading and the like are provided for independent software suppliers, system integrator applications and the like, and maintenance cost is reduced; a convenient interactive management mode is provided for a user system administrator, and the system maintenance management efficiency can be improved.
Further, in response to the above method for shelving a WEB application shown in fig. 1, referring to fig. 7, an embodiment of the present invention provides a device for shelving a WEB application, where the device is applied to a front-end device of a system for shelving a WEB application, and the device includes:
a CPK package generating module 702, configured to package the WEB application source file to generate a CPK package based on a preset CPK packaging specification; wherein, the CPK packet specification comprises the application range of the CPK packet;
the data uploading module 704 is used for cutting the CPK package and uploading the data files in the CPK package to a preset shared memory; the data files comprise application mirror image files, application information files and starting container parameter configuration files;
an upload notification sending module 706, configured to send a data upload notification to the container cloud;
an instruction acquisition module 708, configured to acquire an operation instruction from an administrator after receiving the synchronization notification from the container cloud; the operation instruction comprises deployment application, updated application version and rollback application version;
an instruction sending module 710, configured to send an operation instruction to the container cloud, so that the container cloud generates a container of the target WEB application based on the operation instruction;
a CPK package update module 712, configured to update the CPK package when receiving an accessible address of a container of a target WEB application from the container cloud;
a WEB application determining module 714, configured to use the updated CPK package as a target WEB application;
and a WEB application racking module 716, configured to rack the target WEB application.
The device for putting on the shelf of the WEB application provided by the embodiment of the invention is arranged on the front-end equipment, and firstly, a CPK package is generated based on a CPK package generation module; the method comprises the steps that a front-end device interacts with a container cloud, a container of a CPK package corresponding to a target WEB application is deployed in the container cloud, and the CPK package is updated when an accessible address of the container is received through the container cloud; taking the updated CPK package as a target WEB application, and putting the target WEB application on shelf; and the application range of the CPK package is defined through the CPK package specification, so that the access right of the user can be limited. The security of the WEB application service is effectively improved.
In response to the above another method for shelving WEB applications shown in fig. 3, referring to fig. 8, an embodiment of the present invention provides another device for shelving WEB applications, where the device is applied to a container cloud of a system for shelving WEB applications, and the device includes:
an upload notification receiving module 802, configured to receive a data upload notification from a front-end device;
the mirror image extraction storage module 804 is configured to extract an application mirror image file from a preset shared storage, and store the application mirror image file in a preset mirror image repository; the shared storage is used for storing shared files of the container cloud and the front-end equipment; the shared file at least comprises an application image file;
the mirror image synchronization module 806 is configured to synchronize the application mirror image file in the mirror image repository to the computing node, and send a synchronization notification to the front-end device;
a mirror instantiation module 808, configured to, when receiving an operation instruction from an administrator through the front-end device, execute an instantiation operation on a target application mirror file corresponding to the operation instruction on the computing node to generate a container of the target WEB application; the operation instruction comprises one or more of deployment of WEB application, update of WEB application version and rollback of WEB application version;
an address sending module 810, configured to transmit an accessible address of a container of the target WEB application to the front-end device, so that the front-end device shelves the target WEB application based on the accessible address.
With the adoption of the another device for putting on shelf the WEB application, provided by the embodiment of the invention, an administrator can automatically generate a container of the target WEB application in the container cloud only by sending an operation instruction to the container cloud through the front-end equipment; meanwhile, the WEB application is isolated and deployed on the computing nodes of the container cloud in a container mode, so that the safety of the WEB application service is effectively improved.
The device provided by the embodiment has the same implementation principle and technical effect as the foregoing embodiment, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiment for the portion of the embodiment of the device that is not mentioned.
Further, corresponding to the above method and apparatus, an embodiment of the present invention further provides a system for putting WEB applications on shelf, referring to fig. 9, where the system includes a front-end device 902 and a container cloud 904; the front-end device 902 is provided with one of the above-described on-shelf devices for WEB applications shown in fig. 7, and the container cloud 904 is provided with another one of the above-described on-shelf devices for WEB applications shown in fig. 8. The front-end equipment and the container cloud in the system have functions similar to those of the above embodiments, and are not described in detail here.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for putting on the shelf of WEB application is characterized in that the method is applied to front-end equipment of a system for putting on the shelf of WEB application, and the method comprises the following steps:
packaging a WEB application source file to generate a CPK package based on a preset CPK package specification; wherein, the CPK packet specification comprises the application range of the CPK packet;
cutting the CPK package, and uploading the data files in the CPK package to a preset shared storage; the data files comprise application mirror image files, application information files and starting container parameter configuration files;
sending a data upload notification to the container cloud;
after receiving the synchronization notification from the container cloud, acquiring an operation instruction from an administrator; the operation instruction comprises deploying WEB application, updating WEB application version and rolling back WEB application version;
sending the operation instruction to the container cloud to enable the container cloud to generate a container of a target WEB application based on the operation instruction;
updating the CPK package when an accessible address of a container of a target WEB application from the container cloud is received;
taking the updated CPK package as a target WEB application;
and uploading the target WEB application.
2. The method according to claim 1, wherein the step of encapsulating the WEB application source file into the CPK package based on the preset CPK package specification comprises:
carrying out parameter allocation operation on a WEB application source file so as to enable the WEB application source file to be suitable for a preset verification environment; wherein the preset verification environment is consistent with the application environment of the container cloud;
and packaging the WEB application source file after parameter allocation to generate a CPK package based on a preset CPK packaging specification.
3. A method for shelving a WEB application, which is applied to a container cloud of a shelving system of the WEB application, and comprises the following steps:
receiving a data uploading notice from front-end equipment;
extracting an application image file from a preset shared storage, and storing the application image file into a preset image warehouse; wherein the shared storage is used for storing shared files of the container cloud and the front-end device; the shared file at least comprises the application image file;
synchronizing the application image files in the image warehouse to a computing node, and sending a synchronization notice to the front-end equipment;
when an operation instruction from an administrator is received through the front-end equipment, an instantiation operation is performed on a target application image file corresponding to the operation instruction on the computing node to generate a container of a target WEB application; the operation instruction comprises one or more of deployment of WEB application, update of WEB application version and rollback of WEB application version; transmitting the accessible address of the container of the target WEB application to the front-end equipment, so that the front-end equipment updates a preset CPK package based on the accessible address, the updated CPK package is used as the target WEB application, and the target WEB application is put on shelf; and the CPK package is obtained by packaging a WEB application source file by the front-end equipment based on a preset CPK package specification, wherein the CPK package specification comprises an application range of the CPK package.
4. The method of claim 3, wherein the shared file further comprises an application information file and a start-up container parameter configuration file.
5. The method of claim 4, wherein the step of performing an instantiation operation on the target application image file corresponding to the operation indication on the computing node to generate a container of the target WEB application comprises:
searching a target application image file corresponding to the operation instruction on the computing node;
extracting the application information file and the starting container parameter configuration file corresponding to the target application image file from the shared file;
synchronizing the extracted application information file and the start container parameter configuration file to the computing node;
and instantiating a target image file on the computing node according to the application information file and the starting container parameter configuration file to generate a container of the target WEB application.
6. The method of claim 5, wherein when the operation indication comprises an update WEB application version or a rollback WEB application version, the method further comprises:
and after the container of the target WEB application is generated, deleting an old version container prestored on the computing node.
7. The method of claim 3, wherein the step of communicating the accessible address of the container of the target WEB application to the front-end device to cause the front-end device to shelf the target WEB application based on the accessible address comprises:
running a container of the target WEB application based on a preset health check interface to obtain a running report;
judging whether the operation report is abnormal or not;
if not, sending an operation success notification to the front-end equipment, and transmitting an accessible address of the container of the WEB application to the front-end equipment;
if yes, sending an operation failure notification to the front-end equipment, and transmitting an operation report to the front-end equipment; wherein the operation report includes operation error information.
8. The utility model provides a WEB application's device of putting on shelf, its characterized in that, the device sets up in the front end equipment of the system of putting on shelf of WEB application, the device includes:
the CPK package generating module is used for packaging the WEB application source file to generate a CPK package based on a preset CPK packaging specification; wherein, the CPK packet specification comprises the application range of the CPK packet;
the data uploading module is used for cutting the CPK package and uploading the data files in the CPK package to a preset shared memory; the data files comprise application mirror image files, application information files and starting container parameter configuration files;
the uploading notification sending module is used for sending a data uploading notification to the container cloud;
the instruction acquisition module is used for acquiring an operation instruction from an administrator after receiving the synchronization notification from the container cloud; wherein the operation indication comprises a deployment application, an update application version and a rollback application version;
an instruction sending module, configured to send the operation instruction to the container cloud, so that the container cloud generates a container of a target WEB application based on the operation instruction;
a CPK package updating module, configured to update the CPK package when receiving an accessible address of a container of a target WEB application from the container cloud;
the WEB application determining module is used for taking the updated CPK package as a target WEB application;
and the WEB application shelving module is used for shelving the target WEB application.
9. A racking device for WEB applications, wherein the device is arranged in a container cloud of a racking system for WEB applications, the device comprising:
the uploading notification receiving module is used for receiving a data uploading notification from the front-end equipment;
the mirror image extraction and storage module is used for extracting the application mirror image file from the preset shared storage and storing the application mirror image file into a preset mirror image warehouse; wherein the shared storage is used for storing shared files of the container cloud and the front-end device; the shared file at least comprises the application image file;
the mirror image synchronization module is used for synchronizing the application mirror image files in the mirror image warehouse to the computing nodes and sending synchronization notification to the front-end equipment;
the image instantiation module is used for executing instantiation operation on a target application image file corresponding to the operation instruction on the computing node to generate a container of a target WEB application when the operation instruction from an administrator is received through the front-end equipment; the operation instruction comprises one or more of deployment of WEB application, update of WEB application version and rollback of WEB application version; an address sending module, configured to transmit an accessible address of the container of the target WEB application to the front-end device, so that the front-end device updates a preset CPK package based on the accessible address, and uses the updated CPK package as the target WEB application, and shelves the target WEB application; and the CPK package is obtained by packaging a WEB application source file by the front-end equipment based on a preset CPK package specification, wherein the CPK package specification comprises an application range of the CPK package.
10. A system for putting WEB applications on shelf is characterized by comprising front-end equipment and a container cloud; wherein the head-end equipment and the container cloud are communicatively connected;
the front-end device is provided with the device for putting on shelf of the WEB application according to claim 8, and the container cloud is provided with the device for putting on shelf of the WEB application according to claim 9.
CN201810952359.7A 2018-08-20 2018-08-20 Method, device and system for putting WEB application on shelf Active CN109167826B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810952359.7A CN109167826B (en) 2018-08-20 2018-08-20 Method, device and system for putting WEB application on shelf

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810952359.7A CN109167826B (en) 2018-08-20 2018-08-20 Method, device and system for putting WEB application on shelf

Publications (2)

Publication Number Publication Date
CN109167826A CN109167826A (en) 2019-01-08
CN109167826B true CN109167826B (en) 2021-05-07

Family

ID=64896276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810952359.7A Active CN109167826B (en) 2018-08-20 2018-08-20 Method, device and system for putting WEB application on shelf

Country Status (1)

Country Link
CN (1) CN109167826B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656100B (en) * 2021-08-17 2023-07-07 城云科技(中国)有限公司 Interface switching method, device, electronic device and computer program product

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7730025B1 (en) * 2004-11-30 2010-06-01 Oracle America, Inc. Migrating documents
CN104052769A (en) * 2013-03-13 2014-09-17 金蝶软件(中国)有限公司 Method, apparatus and system for updating resources contained by mobile terminal application
CN104516738A (en) * 2014-12-15 2015-04-15 北京金和软件股份有限公司 Integrated implementing method for development and release of APP
CN105224326A (en) * 2015-09-30 2016-01-06 北京恒华伟业科技股份有限公司 A kind of incremental deploying method of system code and device
CN105407088A (en) * 2015-10-28 2016-03-16 成都快发助手科技有限公司 Game shelf hitting method and device
CN105631196A (en) * 2015-12-22 2016-06-01 中国科学院软件研究所 Microservice-oriented container level flexible resource supply system and method
CN106155751A (en) * 2016-08-02 2016-11-23 传线网络科技(上海)有限公司 Application packing and issuing method and device
CN106371849A (en) * 2016-09-18 2017-02-01 网易(杭州)网络有限公司 Application data processing method and device
CN107248946A (en) * 2017-05-11 2017-10-13 北京潘达互娱科技有限公司 Application installation package sending method and device
CN108089865A (en) * 2017-12-04 2018-05-29 北京小米移动软件有限公司 Using method of cutting out, device and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7730025B1 (en) * 2004-11-30 2010-06-01 Oracle America, Inc. Migrating documents
CN104052769A (en) * 2013-03-13 2014-09-17 金蝶软件(中国)有限公司 Method, apparatus and system for updating resources contained by mobile terminal application
CN104516738A (en) * 2014-12-15 2015-04-15 北京金和软件股份有限公司 Integrated implementing method for development and release of APP
CN105224326A (en) * 2015-09-30 2016-01-06 北京恒华伟业科技股份有限公司 A kind of incremental deploying method of system code and device
CN105407088A (en) * 2015-10-28 2016-03-16 成都快发助手科技有限公司 Game shelf hitting method and device
CN105631196A (en) * 2015-12-22 2016-06-01 中国科学院软件研究所 Microservice-oriented container level flexible resource supply system and method
CN106155751A (en) * 2016-08-02 2016-11-23 传线网络科技(上海)有限公司 Application packing and issuing method and device
CN106371849A (en) * 2016-09-18 2017-02-01 网易(杭州)网络有限公司 Application data processing method and device
CN107248946A (en) * 2017-05-11 2017-10-13 北京潘达互娱科技有限公司 Application installation package sending method and device
CN108089865A (en) * 2017-12-04 2018-05-29 北京小米移动软件有限公司 Using method of cutting out, device and storage medium

Also Published As

Publication number Publication date
CN109167826A (en) 2019-01-08

Similar Documents

Publication Publication Date Title
CN108551487B (en) Application deployment method, device, server and storage medium of PaaS platform
CN106844137B (en) Server monitoring method and device
CN107800565B (en) Inspection method, inspection device, inspection system, computer equipment and storage medium
KR20210057149A (en) Smart contract-based data processing method, device and storage medium
US10069942B2 (en) Method and apparatus for changing configurations
US20160270021A1 (en) M2m application remote registration method, device, system and storage medium
CN111064626B (en) Configuration updating method, device, server and readable storage medium
CN111225064A (en) Ceph cluster deployment method, system, device and computer-readable storage medium
CN111800468A (en) Cloud-based multi-cluster management method, device, medium and electronic equipment
US20220103555A1 (en) Service deployment method, device, system, and computer-readable storage medium
McNab et al. Managing virtual machines with Vac and Vcycle
CN111371615A (en) Online server, updating method and system of operation and maintenance tool and readable storage medium
CN109167826B (en) Method, device and system for putting WEB application on shelf
CN111182066A (en) Log level dynamic adjustment method based on token authentication
CN112044061A (en) Game picture processing method and device, electronic equipment and storage medium
CN111130905A (en) Distributed cluster-based log level dynamic adjustment method
CN113824801B (en) Intelligent integration terminal unified access management component system
CN111913870A (en) Multi-environment management method, device, system, equipment and medium
CN115883512A (en) DNS domain name processing method, device, system, equipment and medium
CN109814911A (en) Method, apparatus, computer equipment and storage medium for Manage Scripts program
CN111026413B (en) Requirement-oriented complex system 'pull' mode deployment system and method thereof
CN108881344B (en) Service processing method and device, storage equipment and processing server
CN116560722B (en) Operation and maintenance flow processing method and device, electronic equipment and storage medium
CN117215714A (en) Method, device, equipment and computer readable storage medium for synchronizing container mirror images
US10769586B2 (en) Implementation of rolling key to identify systems inventories

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant