Application service publishing method and device, electronic device, and storage medium

By obtaining and utilizing the application service release parameters and automatically pulling and replacing the code package, the problem of low efficiency in the application service update release in the existing technology is solved, and efficient automatic update release is achieved.

CN113849206BActive Publication Date: 2025-02-18QINGDAO HAIER TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110975304.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-24
Publication Date
2025-02-18
Estimated Expiration
2041-08-24

AI Technical Summary

Technical Problem

The existing application service update release methods are too cumbersome, resulting in low release efficiency.

Method used

By obtaining the publishing parameters of the target application service, including the latest code ID, pulling and packaging the code program, replacing the old program package in the target server and starting the application service, to achieve automated updates and releases.

Benefits of technology

It improves the efficiency of application service update release, reduces manual operation steps, and realizes an automated update release process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113849206B_ABST
    Figure CN113849206B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for publishing an application service, an electronic device, and a storage medium, wherein the method for publishing an application service comprises: obtaining publishing parameters of a target application service; wherein the publishing parameters at least include the latest code ID of the target application service; pulling and packaging the code program corresponding to the latest code ID of the target application service to obtain the current program package of the target application service; for each target server in turn, according to the IP of the target server in a configuration file, replacing the old program package of the target application service in the target server with the current program package of the target application service, and starting the target application service; wherein the target server is the server where the target application is located.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of application publishing, and in particular to a method and device for publishing an application service, an electronic device, and a storage medium. Background Art

[0002] As products and demands continue to change, application services also need to be constantly updated and iterated accordingly, and the frequency of updates and iterations of current application services is getting faster and faster.

[0003] The existing application service update and release method is mainly manually updated by operation and maintenance personnel. The general update process is: the operation and maintenance personnel upload a new package, then back up and replace the old package, and restart the application service, thereby completing the update and release of the corresponding service.

[0004] However, since many commands need to be executed during the update release process, manually updating application services is relatively cumbersome, and thus the update efficiency is relatively slow. Summary of the invention

[0005] Based on the above-mentioned deficiencies of the prior art, the present application provides a method and device for publishing an application service, an electronic device, and a storage medium to solve the problem that the existing publishing method is too much sending and has low publishing efficiency.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] The first aspect of the present application provides a method for publishing an application service, comprising:

[0008] Obtaining publishing parameters of the target application service; wherein the publishing parameters at least include the latest code ID of the target application service;

[0009] Pulling and packaging the code program corresponding to the latest code ID of the target application service to obtain the current program package of the target application service;

[0010] For each target server in turn, according to the IP of the target server in the configuration file, the current package of the target application service replaces the old package of the target application service in the target server, and starts the target application service; wherein the target server is the server where the target application is located.

[0011] Optionally, in the above-mentioned application service publishing method, for each target server in turn, according to the IP address of the target server in the configuration file, replacing the old program package of the target application service in the target server with the current program package of the target application service, and starting the target application service, includes:

[0012] For each of the target servers in turn, uploading the current program package of the target application service to a fixed directory of the target server according to the IP address of the target server in the configuration file;

[0013] The current program of the target application service is copied from the fixed directory of the target server, and the old program package of the target application service in the target server is replaced by the current program of the target application service, and the target application service is started.

[0014] Optionally, in the above-mentioned application service publishing method, after uploading the current program package of the target application service to the fixed directory of the target server according to the IP of the target server, the method further includes:

[0015] Determine whether the target application service belongs to a Web service;

[0016] If it is determined that the target application service belongs to a Web service, the IP address of the target server is removed from the load balancer;

[0017] Close the zabbix monitoring alarm of the target application service.

[0018] Optionally, in the above-provided application service publishing method, after replacing the old program package of the target application service in the target server with the current program of the target application service and starting the target application service, the method further includes:

[0019] Enable the zabbix monitoring alarm for the target application service;

[0020] The IP address of the target server is added back to the load of the load balancer, and the load balancer is reloaded.

[0021] Optionally, in the above-mentioned application service publishing method, the following is further included:

[0022] Real-time monitoring of the execution information and execution results of the publishing operation commands executed on each of the target servers during the publishing process;

[0023] In response to the user's implementation query request, the monitored execution information of the release operation command and the execution result are displayed;

[0024] When it is monitored that all the target servers have completed the update and release of the target application service, a release completion prompt message is fed back.

[0025] Optionally, in the above-mentioned application service publishing method, obtaining publishing parameters of the target application service includes:

[0026] Determine the application service selected by the user in the application service drop-down option on the publishing interface as the target service;

[0027] Determining various configuration information corresponding to the target application service from the configuration file;

[0028] Display each item of configuration information in the corresponding parameter drop-down options respectively;

[0029] In response to a selection operation by a user in a parameter drop-down option, the configuration information selected by the user is determined as a publishing parameter of the target application service.

[0030] Optionally, in the above-provided method for publishing application services, after replacing the old program package of the target application service in the target server with the current program package of the target application service and starting the target application service, the method further comprises:

[0031] In response to a rollback operation by the user, the old program package of the target application service replaces the current program package of the target application service in the target server, and the target application service is started.

[0032] A second aspect of the present application provides a publishing device for an application service, including:

[0033] A parameter acquisition unit, used to acquire the publishing parameters of the target application service; wherein the publishing parameters at least include the latest code ID of the target application service;

[0034] A program pulling unit, used to pull and package the code program corresponding to the latest code ID of the target application service to obtain a current program package of the target application service;

[0035] The update publishing unit is used to replace the old program package of the target application service in the target server with the current program package of the target application service according to the IP of the target server in the configuration file for each target server in turn, and start the target application service; wherein the target server is the server where the target application is located.

[0036] Optionally, in the application service publishing device provided above, the update publishing unit includes:

[0037] An uploading unit, configured to upload the current program package of the target application service to a fixed directory of the target server in turn for each target server according to the IP address of the target server in the configuration file;

[0038] The update publishing subunit is used to copy the current program of the target application service from the fixed directory of the target server, replace the old program package of the target application service in the target server with the current program of the target application service, and start the target application service.

[0039] Optionally, the publishing device for the application service provided above further includes:

[0040] A determination unit, used to determine whether the target application service belongs to a Web service;

[0041] A removing unit, configured to remove the IP address of the target server from the load balancer when the judging unit judges that the target application service belongs to a Web service;

[0042] A closing unit is used to close the zabbix monitoring alarm of the target application service.

[0043] Optionally, the publishing device for the application service provided above further includes:

[0044] An enabling unit, used to enable the zabbix monitoring alarm of the target application service;

[0045] The reloading unit is used to add the IP address of the target server back into the load of the load balancer and reload the load balancer.

[0046] Optionally, the publishing device for the application service provided above further includes:

[0047] A monitoring unit, used to monitor in real time the execution information and execution results of the publishing operation commands executed on each of the target servers during the publishing process;

[0048] A first response unit, used to respond to the user's implementation query request and display the monitored execution information of the release operation command and the execution result;

[0049] The feedback unit is used to feedback release completion prompt information when it is monitored that all the target servers have completed the update release of the target application service.

[0050] Optionally, in the publishing device for the application service provided above, the parameter acquisition unit includes:

[0051] A first determining unit, configured to determine the application service selected by the user from the application service drop-down options on the publishing interface as a target service;

[0052] A second determining unit, configured to determine various configuration information corresponding to the target application service from the configuration file;

[0053] A display unit, used to display each item of configuration information in a corresponding parameter drop-down option;

[0054] The second response unit is used to respond to the selection operation of the user in the parameter drop-down option, and determine the configuration information selected by the user as the publishing parameter of the target application service.

[0055] Optionally, the publishing device for the application service provided above further includes:

[0056] The third responding unit is configured to respond to a rollback operation by the user, replace a current program package of the target application service in the target server with an old program package of the target application service, and start the target application service.

[0057] A third aspect of the present application provides an electronic device, including:

[0058] Memory and processor;

[0059] Wherein, the memory is used to store programs;

[0060] The processor is used to execute the program, and when the program is executed, it is specifically used to implement the publishing method of the application service as described in any one of the above.

[0061] A fourth aspect of the present application provides a computer storage medium for storing a computer program, which, when executed, is used to implement a method for publishing an application service as described in any one of the above.

[0062] The embodiment of the present application provides a method for publishing an application service, obtaining publishing parameters of a target application service, wherein the publishing parameters at least include the latest code ID of the target application service, so that the code program corresponding to the latest code ID of the target application service can be pulled and packaged to obtain the current program package of the target application service. Then, for each target server where the target application is located, according to the IP address of the target server in the configuration file, the current program package of the target application service replaces the old program package of the target application service in the target server, and the target application service is started to complete the automatic update and publishing of the target application service. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0064] Figure 1A flowchart of a method for publishing an application service provided in an embodiment of the present application;

[0065] Figure 2 A flowchart of a method for obtaining publishing parameters of a target application service provided in an embodiment of the present application;

[0066] Figure 3 A flowchart of a method for updating and publishing a target application service of a target server provided in an embodiment of the present application;

[0067] Figure 4 A schematic diagram of the structure of a publishing device for an application service provided in another embodiment of the present application;

[0068] Figure 5 A schematic diagram of the structure of an update publishing unit provided in another embodiment of the present application;

[0069] Figure 6 A schematic diagram of the structure of a parameter acquisition unit provided in another embodiment of the present application;

[0070] Figure 7 A schematic diagram of the structure of an electronic device provided in another embodiment of the present application. DETAILED DESCRIPTION

[0071] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0072] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0073] This application provides a method for publishing an application service, such as Figure 1 As shown, the specific steps include:

[0074] S101. Obtain publishing parameters of a target application service.

[0075] The release parameters at least include the latest code ID of the target application service. Of course, the release parameters may also include the service name, service type, release action, etc. of the target application service. The release action may be pre-release, full release, or rollback of the previous version.

[0076] Optionally, the publishing parameters may include parameters selected by the user and fixed parameters, which include parameters that the user can select according to his or her needs, such as the server to be updated this time. However, considering that there may be some parameters that cannot be changed at will, the publishing parameters may also refer to the fixed parameters, that is, after selecting the target application service to be published, the default publishing parameters are fixed.

[0077] Optionally, in another embodiment of the present application, an implementation of step S101 is as follows: Figure 2 As shown, including:

[0078] S201: Determine the application service selected by the user from the application service drop-down options on the publishing interface as the target service.

[0079] S202: Determine various configuration information corresponding to the target application service from the configuration file.

[0080] It should be noted that, in this application, the name of each application service, the corresponding code repository and service type, etc. are pre-set.

[0081] S203. Display each item of configuration information in the corresponding parameter drop-down options.

[0082] That is to say, in the embodiment of the present application, after the user selects the target application service that needs to be updated and released, the corresponding configuration information such as the server's IP, git and other values ​​will be automatically brought out for the user to select.

[0083] It should be noted that, in addition to the parameter drop-down items corresponding to each configuration information, the publishing interface may also include other drop-down options that require user selection but do not exist in the configuration file, such as a drop-down option for publishing actions.

[0084] S204: In response to the user's selection operation in the parameter drop-down option, the configuration information selected by the user is determined as the publishing parameters of the target application service.

[0085] The use of drop-down options can effectively prevent users from entering incorrect information, which may result in failure to publish application services normally.

[0086] Similarly, in the embodiment of the present application, in addition to determining the configuration information selected by the user as the publishing parameters of the target application service, if there are fixed parameters corresponding to the target application service, these fixed parameters also need to be directly determined as the publishing parameters of the target application service.

[0087] S102: Pull and package the code program corresponding to the latest code ID of the target application service to obtain the current program package of the target application service.

[0088] Specifically, the corresponding code program can be pulled from the remote code repository according to the latest code ID of the target application service, and then packaged according to a pre-set packaging command to obtain the current program package of the target application service.

[0089] S103 . For each target server in turn, according to the IP address of the target server in the configuration file, replace the old program package of the target application service in the target server with the current program package of the target application service, and start the target application service. The target server is the server where the target application is located.

[0090] It should be noted that in order to ensure that the target application service can continue to be used when the service is updated, it is necessary to update and publish the target application service to each target server in turn.

[0091] Optionally, the target application services may be updated and published to each target server in turn according to the IP addresses of the target servers where the target application services are located in the configuration file. Of course, the target application services may also be updated only to the target servers selected by the user, that is, in the embodiment of the present application, partial update publishing or full update canvas may be selected, and the user may first select the IP addresses of the servers to be published according to the needs.

[0092] Specifically, during the update process, the current package of the target application service replaces the old package of the target application service in the target server, and the target application service is started, thereby completing the update of the target application service in one target server, and then starting to update the next target server until all target servers are updated.

[0093] Optionally, in another embodiment of the present application, a specific implementation of step S103 is as follows: Figure 3 As shown, including:

[0094] S301 . For each target server in turn, according to the IP address of the target server in the configuration file, upload the current program package of the target application service to a fixed directory of the target server.

[0095] It should be noted that in an embodiment of the present application, when updating the target server, the current program package of the target application service is remotely uploaded to a fixed directory of the target server instead of directly updating it, so that the required preparations can be performed before replacing the program package, and the current program package of the target application service can also be backed up.

[0096] In another embodiment of the present application, after executing step S301 and before executing step S302, the following may be further performed:

[0097] Determine whether the target application service is a Web service.

[0098] If the target application service is determined to be a Web service, the target server's IP address is first removed from the load balancer (Nginx), and then the zabbix monitoring alarm for the target application service is closed. If the target application service is determined not to be a Web service, the zabbix monitoring alarm for the target application service can be directly turned off.

[0099] It should be noted that since Web services generally provide http services, the listening port is 8080, and when the Web service is restarted, port 8080 will be closed and then reopened, and when it is closed, the request to call the target application service on the target server will be invalid access, so that the user's request cannot be responded to. Therefore, in the embodiment of the present application, when it is determined that the target application service belongs to the Web service, the IP of the target server is removed from the load balancer, so that when the load is balanced, the user's request is smoothly migrated to other target servers, avoiding the target server currently updating and publishing to accept the request, and ensuring the response to the user's request.

[0100] Since the zabbix monitoring alarm of the target application service is prone to false alarms when the target application service is updated, in an embodiment of the present application, the zabbix monitoring alarm of the target application service will be closed before executing step S302.

[0101] Accordingly, in an embodiment of the present application, after executing step S302, that is, after the target server completes the update release, it is also necessary to execute: turning on the zabbix monitoring alarm of the target application service, and re-adding the IP of the target server to the load of the load balancer, and reloading the load balancer.

[0102] Since the zabbix monitoring alarm of the target application service was turned off before the update, it is necessary to turn on the zabbix monitoring alarm of the target application service after the update is released to ensure the normal operation of the zabbix monitoring alarm. Similarly, for Web services, since the IP of the target server was removed from the load balancer (Nginx) before the update, it is necessary to re-add the IP of the target server to the load of the load balancer after the update and reload the load balancer so that the target server can normally receive user requests.

[0103] S302: copy the current program of the target application service from the fixed directory of the target server, replace the old program package of the target application service in the target server with the current program of the target application service, and start the target application service.

[0104] Optionally, in another embodiment of the present application, after executing step S103, that is, after completing the update release of the target application service, it may also include: responding to the user's rollback operation, replacing the current package of the target application service in the target server with the old package of the target application service, and starting the target application service.

[0105] That is to say, in the embodiment of the present application, a one-click rollback can also be performed. When a problem is found in the target application service after release and an urgent version rollback is required, the one-click rollback operation can be used to directly roll back to the previous version. It should be noted that the rollback operation is mainly for normal update release completion, but when some functions are found to have business logic problems, operations are performed according to business needs. If a problem occurs during the release process, the operation and maintenance personnel should be required to check the process log to determine the fault and repair it.

[0106] Optionally, in another embodiment of the present application, the publishing process may further include:

[0107] Real-time monitoring of the execution information and results of publishing operation commands executed on each target server during the publishing process.

[0108] In response to the user's implementation query request, the monitored execution information of the release operation command and the execution result are displayed.

[0109] When it is monitored that all target servers have completed the update and release of the target application service, a release completion prompt message is fed back.

[0110] By monitoring and displaying the release process, users can understand the release status and find problems easily.

[0111] Optionally, in another embodiment of the present application, an update publishing tool is provided to implement the publishing method of the application service provided in the above embodiment. In addition, the tool can execute the publishing task for the nodes added to the tool, that is, add the application service to the new application server. Therefore, the update publishing tool can add nodes, and of course, can also delete them accordingly.

[0112] Specifically, when adding or deleting nodes, modify the application service configuration information of the nodes to be added or deleted. It should be noted that for applications that provide web services, after adding a node IP, the corresponding IP must also be added to the load balancer. After deleting a node, the corresponding IP must also be deleted from the load balancer, otherwise the update release tool will stop running when it reaches the load balancer because it cannot find the corresponding IP. Of course, the update release tool can also include functions such as online and offline application services.

[0113] The embodiment of the present application provides a method for publishing an application service, obtaining publishing parameters of a target application service, wherein the publishing parameters at least include the latest code ID of the target application service, so that the code program corresponding to the latest code ID of the target application service can be pulled and packaged to obtain the current program package of the target application service. Then, for each target server where the target application is located, according to the IP address of the target server in the configuration file, the current program package of the target application service replaces the old program package of the target application service in the target server, and the target application service is started to complete the automatic update and publishing of the target application service.

[0114] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0115] Although operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or in a sequential order.Multitasking and parallel processing may be advantageous under certain circumstances.

[0116] Another embodiment of the present application provides a publishing device for application services, such as Figure 4 As shown, it includes the following units:

[0117] The parameter acquisition unit 401 is used to acquire the publishing parameters of the target application service.

[0118] The release parameters include at least the latest code ID of the target application service.

[0119] The program pulling unit 402 is used to pull and package the code program corresponding to the latest code ID of the target application service to obtain the current program package of the target application service.

[0120] The update publishing unit 403 is used to replace the old program package of the target application service in the target server with the current program package of the target application service according to the IP address of the target server in the configuration file for each target server in turn, and start the target application service.

[0121] The target server is the server where the target application is located.

[0122] Optionally, in another embodiment of the present application, a publishing device for an application service is provided, wherein the publishing unit is updated, such as Figure 5 As shown, including:

[0123] The uploading unit 501 is used to upload the current program package of the target application service to the fixed directory of each target server in turn according to the IP address of the target server in the configuration file.

[0124] The update publishing subunit 502 is used to copy the current program of the target application service from the fixed directory of the target server, replace the old program package of the target application service in the target server with the current program of the target application service, and start the target application service.

[0125] Optionally, another embodiment of the present application provides a publishing device for an application service, further comprising:

[0126] The judging unit is used to judge whether the target application service belongs to a Web service.

[0127] The removing unit is used to remove the IP address of the target server from the load balancer when the judging unit judges that the target application service belongs to the Web service.

[0128] The shutdown unit is used to shut down the zabbix monitoring alarm of the target application service.

[0129] Optionally, another embodiment of the present application provides a publishing device for an application service, further comprising:

[0130] Enable unit to enable Zabbix monitoring alarm for target application service.

[0131] The reload unit is used to add the IP address of the target server back to the load balancer's load and reload the load balancer.

[0132] Optionally, another embodiment of the present application provides a publishing device for an application service, further comprising:

[0133] A monitoring unit, used to monitor in real time the execution information and execution results of the publishing operation commands executed on each target server during the publishing process;

[0134] The first response unit is used to respond to the user's implementation query request and display the execution information and execution results of the monitored release operation command;

[0135] The feedback unit is used to feedback a release completion prompt message when it is monitored that all target servers have completed the update release of the target application service.

[0136] Optionally, in another embodiment of the present application, a publishing device for an application service is provided, wherein the parameter acquisition unit, such as Figure 6 As shown, including:

[0137] The first determining unit 601 is used to determine the application service selected by the user from the application service drop-down options on the publishing interface as the target service.

[0138] The second determining unit 602 is used to determine various configuration information corresponding to the target application service from the configuration file.

[0139] The display unit 603 is used to display each item of configuration information in the corresponding parameter drop-down options.

[0140] The second responding unit 604 is used to respond to the selection operation of the user in the parameter drop-down option, and determine the configuration information selected by the user as the publishing parameter of the target application service.

[0141] Optionally, another embodiment of the present application provides a publishing device for an application service, further comprising:

[0142] The third responding unit is used to respond to the rollback operation of the user, replace the current program package of the target application service in the target server with the old program package of the target application service, and start the target application service.

[0143] It should be noted that the specific working process of each unit provided in the above embodiments of the present application can refer to the corresponding steps in the above method embodiments, which will not be repeated here.

[0144] Another embodiment of the present application provides an electronic device, such as Figure 7 As shown, including:

[0145] Memory 701 and processor 702 .

[0146] The memory 701 is used to store programs.

[0147] The processor 702 is used to execute the program stored in the storage 701, and when the program is executed, it is specifically used to implement the publishing method of the application service provided by any of the above embodiments.

[0148] Another embodiment of the present application provides a computer storage medium for storing a computer program. When the computer program is executed, it is used to implement a method for publishing an application service as provided in any of the above embodiments.

[0149] Computer storage media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0150] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0151] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for publishing an application service, characterized in that: include: Obtaining publishing parameters of the target application service; wherein the publishing parameters at least include the latest code ID of the target application service; Pulling and packaging the code program corresponding to the latest code ID of the target application service to obtain the current program package of the target application service; For each target server in turn, according to the IP address of the target server in the configuration file, the current package of the target application service replaces the old package of the target application service in the target server, and starts the target application service; wherein the target server is the server where the target application is located; The step of replacing the old program package of the target application service in the target server with the current program package of the target application service according to the IP address of the target server in the configuration file for each target server in turn, and starting the target application service, comprises: uploading the current program package of the target application service to a fixed directory of the target server according to the IP address of the target server in the configuration file for each target server in turn; copying the current program package of the target application service from the fixed directory of the target server, replacing the old program package of the target application service in the target server with the current program package of the target application service, and starting the target application service; After uploading the current program package of the target application service to the fixed directory of the target server according to the IP of the target server in the configuration file, the method further includes: determining whether the target application service belongs to a Web service; if it is determined that the target application service belongs to a Web service, removing the IP of the target server from the load balancer; and closing the zabbix monitoring alarm of the target application service; After replacing the old program package of the target application service in the target server with the current program package of the target application service and starting the target application service, it also includes: turning on the zabbix monitoring alarm of the target application service; re-adding the IP of the target server to the load of the load balancer, and reloading the load balancer.

2. The method according to claim 1, characterized in that Also includes: Real-time monitoring of the execution information and execution results of the publishing operation commands executed on each of the target servers during the publishing process; In response to the user's implementation query request, the monitored execution information of the release operation command and the execution result are displayed; When it is monitored that all the target servers have completed the update and release of the target application service, a release completion prompt message is fed back.

3. The method according to claim 1, characterized in that The obtaining of publishing parameters of the target application service includes: Determine the application service selected by the user in the application service drop-down option on the publishing interface as the target service; Determining various configuration information corresponding to the target application service from the configuration file; Display each item of configuration information in the corresponding parameter drop-down options respectively; In response to a selection operation by a user in a parameter drop-down option, the configuration information selected by the user is determined as a publishing parameter of the target application service.

4. The method according to claim 1, characterized in that After replacing the old program package of the target application service in the target server with the current program package of the target application service and starting the target application service, the method further includes: In response to a rollback operation by the user, the old program package of the target application service replaces the current program package of the target application service in the target server, and the target application service is started.

5. A device for publishing application services, characterized in that: include: A parameter acquisition unit, used to acquire the publishing parameters of the target application service; wherein the publishing parameters at least include the latest code ID of the target application service; A program pulling unit, used to pull and package the code program corresponding to the latest code ID of the target application service to obtain a current program package of the target application service; An update publishing unit is used to replace the old program package of the target application service in each target server with the current program package of the target application service according to the IP address of the target server in the configuration file, and start the target application service; wherein the target server is the server where the target application is located; The update publishing unit includes: an upload unit and an update publishing sub-unit; The uploading unit is used to upload the current program package of the target application service to the fixed directory of the target server according to the IP address of the target server in the configuration file for each target server in turn; The update publishing subunit is used to copy the current program package of the target application service from the fixed directory of the target server, replace the old program package of the target application service in the target server with the current program package of the target application service, and start the target application service; A determination unit, used to determine whether the target application service belongs to a Web service; A removing unit, configured to remove the IP address of the target server from the load balancer if the judging unit judges that the target application service belongs to a Web service; A closing unit, used to close the zabbix monitoring alarm of the target application service; An enabling unit, used to enable the zabbix monitoring alarm of the target application service; The reloading unit is used to add the IP address of the target server back into the load of the load balancer and reload the load balancer.

6. An electronic device, characterized in that: include: Memory and processor; Wherein, the memory is used to store programs; The processor is used to execute the program, and when the program is executed, it is specifically used to implement the method for publishing the application service as described in any one of claims 1 to 4.

7. A computer storage medium, characterized in that: Used to store a computer program, which, when executed, is used to implement the method for publishing an application service as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Application service updating method and apparatus

    CN107147711A

  • Method for automatically updating web application system

    CN108388440A