Application Deployment Method, Device, Equipment and Storage Medium
By using service deployment templates in application deployment to deploy server resources in stages, the problem of application deployment in the existing technology relying on manual operations and cumbersome steps is solved, the deployment efficiency and effect are improved, online failures are avoided, and the standardization and reusability of application deployment are achieved.
Patent Information
- Application Number
- CN201910631256.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-12
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2039-07-12
AI Technical Summary
The existing application deployment methods rely on manual operations, with cumbersome steps, low efficiency, lack of standardized processes, and it is difficult to achieve fine-grained phased experimental deployment, resulting in poor online deployment of application packages and easily causing large-scale online failures.
By calling the service deployment template, determine the server resources in the target deployment stage, and deploy the application packages to be deployed in these resources, implement the phased deployment of server resources, provide a channel for phased experiments, standardize the application deployment process, and realize the unification and reusability of the deployment template.
It improves the efficiency and effectiveness of application deployment, avoids large-scale online failures caused by online deployment, meets the needs of users to deploy in stages based on business dimensions, and realizes the standardization and reusability of application deployment.
Smart Images

Figure CN110362318B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to an application deployment method, apparatus, device, and storage medium. Background Art
[0002] With the rapid development of computer technology, medium and large companies deploy medium and large-scale servers to ensure that there is sufficient underlying capacity to respond to user requests and provide services to users.
[0003] At present, deployment is often carried out in multiple regions, computer rooms, and servers, and the configuration information such as computer rooms and instances are selected based on manual experience. The staff manually configures the resources on each server supporting the application one by one, so that the application package to be launched can be deployed to the server resources through a series of operations such as downloading, decompressing, and running.
[0004] However, the existing application deployment methods are highly dependent on manual labor, have cumbersome operation steps, low deployment efficiency, lack of standardized deployment processes, and are unable to perform fine-grained phased trial deployment of server resources in different regions, computer rooms, and other dimensions. It is difficult to ensure the online deployment effect of the application package, and it may even cause large-scale online failures. Summary of the invention
[0005] The embodiments of the present invention provide an application deployment method, apparatus, device and storage medium, which can improve the deployment efficiency of applications.
[0006] In a first aspect, an embodiment of the present invention provides an application deployment method, including:
[0007] In response to the user's operation on the application deployment interface, determine the service deployment template and the application package to be deployed;
[0008] Using the server resources in the target deployment phase in the service deployment template as target server resources;
[0009] Deploy the application package to be deployed in the target server resources.
[0010] In a second aspect, an embodiment of the present invention provides an application deployment device, including:
[0011] The template call target is used to determine the service deployment template and the application package to be deployed in response to the user's operation on the application deployment interface;
[0012] A resource determination module, used to use the server resources in the target deployment phase in the service deployment template as target server resources;
[0013] The application package deployment module is used to deploy the application package to be deployed in the target server resources.
[0014] In a third aspect, an embodiment of the present invention provides a device, including:
[0015] one or more processors;
[0016] A memory for storing one or more programs;
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the application deployment method described in any embodiment of the present invention.
[0018] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the application deployment method described in any embodiment of the present invention.
[0019] The embodiment of the present invention determines the current target deployment stage to be deployed based on the service deployment template by calling the service deployment template, determines the server resources of the target deployment stage in the service deployment template as the target server resources, and deploys the application package to be deployed in the target server resources. The embodiment of the present invention implements the phased deployment of server resources in medium and large-scale servers through a service deployment template including phased deployment configuration information of server resources, provides a phased test channel for the unified release of applications, meets the needs of users for phased deployment based on business dimensions, standardizes the application deployment process, realizes the unification and reusability of deployment templates, improves the application deployment effect, and avoids large-scale online failures caused by online deployment. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A flowchart of an application deployment method provided in Embodiment 1 of the present invention;
[0021] Figure 2 A flowchart of the service deployment template generated by the second embodiment of the present invention;
[0022] Figure 3 This is an example diagram of a template generation interface provided in the second embodiment of the present invention;
[0023] Figure 4 Another example diagram of a template generation interface provided in the second embodiment of the present invention;
[0024] Figure 5 A flowchart of an application deployment method provided in Embodiment 3 of the present invention;
[0025] Figure 6 This is an example diagram showing the application deployment progress provided by the third embodiment of the present invention;
[0026] Figure 7 A flowchart of an application deployment method provided in Embodiment 4 of the present invention;
[0027] Figure 8 A flowchart of an application deployment method provided in Embodiment 5 of the present invention;
[0028] Fig. 9 A schematic diagram of the structure of an application deployment device provided in Embodiment 6 of the present invention;
[0029] Fig.10 A schematic diagram of the structure of a device provided in Embodiment 7 of the present invention. DETAILED DESCRIPTION
[0030] The embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the embodiments of the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the embodiments of the present invention are shown in the accompanying drawings, rather than all structures.
[0031] It should also be noted that, for ease of description, only the part relevant to the present application but not all the content is shown in the accompanying drawings. It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as the processing or method described as a flow chart. Although the flow chart describes each operation (or step) as a sequential processing, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. When its operation is completed, the processing can be terminated, but it can also have additional steps not included in the accompanying drawings. The processing can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0032] Embodiment 1
[0033] Figure 1 This is a flowchart of an application deployment method provided in Embodiment 1 of the present invention. This embodiment is applicable to the case where an application package is deployed on a server. The method can be executed by an application deployment device, which can be implemented in software and / or hardware, preferably configured in an electronic device. The method specifically includes the following:
[0034] S110 . In response to a user operation on an application deployment interface, determine a service deployment template and an application package to be deployed.
[0035] In a specific embodiment of the present invention, an application deployment tool is provided, which can be configured in a computer or other electronic device in the form of a plug-in. The user refers to an enterprise or staff member who uses the application deployment tool. In a private cloud where the enterprise infrastructure is deployed, the user can uniformly deploy server resources in the private cloud by operating the display interface of the application deployment tool, so as to facilitate the user's later operation and maintenance of the application service.
[0036] In this embodiment, the application package to be deployed refers to the application package to be released online, such as an application upgrade package, patch, etc. After the application package to be deployed is developed and packaged, it can be uniformly stored in a database for managing various application packages for download and use when the application package is deployed later.
[0037] In this embodiment, the service deployment template is used to standardize the deployment process of application-related programs, and has global applicability and reusability for one or more applications. The service deployment template can be configured with at least the application information of the application to which the application package to be deployed belongs, the deployment stage of different server resources under the application, the deployment parameters under each deployment stage, and the global configuration parameters. Among them, before determining the service deployment template and the application package to be deployed in response to the user's operation on the application deployment interface, it also includes: generating at least one service deployment template in response to the user's operation on the template generation interface. The generation process of the service deployment template will be specifically explained in the subsequent embodiments.
[0038] Specifically, the service deployment template is configured with at least the resource configuration information of the server to be deployed and the parameter configuration information. The resource configuration information of the server to be deployed includes the selected application that needs to be operated and maintained and the deployment phase sequence of each server resource under the application. Among them, the application can be a complete application, such as a reading software or game software, etc., or it can be a specific function under the application, such as a book list recommendation function in the reading software. Correspondingly, the server resources are specific instances in the server that support the application. Based on the business dimension, these instances are divided and summarized into different service granularities, and the service granularity is configured in the deployment phase, so that the instances under each service granularity are deployed in a phased order.
[0039] For example, suppose that the servers of a certain application software are deployed in cities A, B, and C, respectively. The application in city A uses the largest traffic, followed by city C, and the application in city B uses the smallest traffic. Based on the dimensions of region and computer room, the server resources supporting the application can be divided into three service granularities, namely, city A, city B, and city C. Correspondingly, the application to be operated and maintained in the service deployment template is the application software, and the deployment phase sequence of each server resource under the application is configured, for example, the first phase is city B, the second phase is city C, and the third phase is city A, that is, by giving priority to small traffic, the deployment effect of the application can be gradually tested.
[0040] The parameter configuration information includes deployment parameters and global configuration parameters in each deployment stage. Among them, the deployment parameters in the deployment stage are used for the deployment of server resources in the deployment stage, and may include at least resource deployment concurrency and verification type. Resource deployment concurrency is used to set the number of server resources that can perform deployment operations simultaneously in the deployment stage; the verification type is used to verify the deployment results of each server resource in the deployment stage, and may include manual verification and callback verification. Manual verification refers to the verification of the deployment results of the server resources in the deployment stage by the staff when the deployment is completed in the deployment stage. Callback verification refers to the configuration of the verification tool by the staff, and when each server resource is deployed, the corresponding calling interface of the verification tool is automatically called to verify the deployment results of each server resource. Correspondingly, the corresponding calling interface URL (Uniform Resource Locator) is configured under the callback verification type.
[0041] In addition, global configuration parameters are used for deployment of all server resources in the service deployment template, and may include at least single-machine download speed limit, global failure tolerance number, and single-machine timeout time. Single-machine download speed limit is used to limit the download speed of the application package to be deployed from the database when the application is deployed. The global failure tolerance number is used to limit the number of server resources that can tolerate deployment failures globally, that is, through real-time verification of the deployment results of each server resource in each deployment stage, when it is detected that the number of server resources that fail to deploy exceeds the global failure tolerance number, the deployment of the application is terminated regardless of the current deployment stage. At the same time, in order to prevent inconsistency in application deployment in server resources across the country, it is necessary to roll back the deployed server resources for redeployment. The single-machine timeout time is used to limit the maximum deployment time of a single server resource. If the deployment time of a single server resource exceeds the single-machine timeout time, the deployment of the server resource is determined to have failed.
[0042] In this embodiment, the application deployment interface is used to trigger online application deployment. The user can configure the application package to be deployed and the service deployment template in the application deployment interface, thereby triggering the online deployment of the application. According to the service deployment template configured by the user in the application deployment interface, the application package to be deployed is uniformly deployed online in the server.
[0043] Specifically, the user can select a service deployment template from at least one pre-generated service deployment template and configure it in the application deployment interface according to the business needs of the application to be operated and maintained, so as to standardize the deployment process of the application. At the same time, the user can configure the information of the application package to be deployed in the application deployment interface. Accordingly, the application deployment tool responds to the user's click, selection, drag or fill operation on the application deployment interface, determines the service deployment template and the application package to be deployed for this application deployment task, and thus executes the application deployment task.
[0044] S120: Use the server resources in the target deployment phase in the service deployment template as target server resources.
[0045] In a specific embodiment of the present invention, since the deployment stage includes at least one, the target deployment stage refers to the stage to be deployed currently. Accordingly, the server resources under the target deployment stage are used as target server resources for the application to be deployed therein. Specifically, during the execution of the application deployment task, according to the sequence of each deployment stage in the service deployment template and the current deployment progress, the target deployment stage to be deployed currently is determined, and the server resources of the target deployment stage in the service deployment template are used as target server resources.
[0046] For example, in the above example, the deployment order of each stage in the service deployment template is the first stage for city B, the second stage for city C, and the third stage for city A. Assuming that the current progress is that the first stage is deployed, the second stage is determined as the target deployment stage, and the server resources under city C associated with the second stage are used as target server resources.
[0047] S130: Deploy the application package to be deployed in the target server resources.
[0048] In a specific embodiment of the present invention, the application package to be deployed is deployed in the target server according to the global configuration parameters in the service deployment template and the deployment parameters in the target deployment stage. Specifically, the application package to be deployed is downloaded according to the single-machine download speed limit in the service deployment template; and the application package to be deployed is deployed online to at least one server resource within the resource deployment concurrency range in the target deployment stage according to the resource deployment concurrency in the service deployment template.
[0049] In addition, during the process of deploying the application package to be deployed in the target server resources, the deployment progress of each deployment stage in the service deployment template can be displayed so that users can obtain the online deployment progress of the application package to be deployed in a timely manner. The deployment result of the target deployment stage can also be verified according to the verification type of the target deployment stage in the service deployment template. If the global deployment fails according to the verification result, the application package to be deployed is redeployed on the server resources in the deployed stage.
[0050] The technical solution of this embodiment, by calling the service deployment template, determines the current target deployment stage to be deployed according to the service deployment template, determines the server resources of the target deployment stage in the service deployment template as the target server resources, and deploys the application package to be deployed in the target server resources. The embodiment of the present invention realizes the phased deployment of server resources in medium and large-scale servers through the service deployment template including the phased deployment configuration information of the server resources, provides a phased test channel for the unified release of applications, meets the needs of users for phased deployment according to business dimensions, standardizes the application deployment process, realizes the unification and reusability of the deployment template, improves the application deployment effect, and avoids large-scale online failures caused by online deployment.
[0051] Embodiment 2
[0052] Based on the above-mentioned first embodiment, this embodiment provides a preferred implementation of the application deployment method, which can generate at least one service deployment template in response to the user's operation on the template generation interface before the application is deployed. Figure 2 A flowchart of the service deployment template generated by the second embodiment of the present invention is shown in FIG. Figure 2 As shown, the method specifically includes the following:
[0053] S210 . In response to a user operation on the template generation interface, determine a target application object to which an application package needs to be deployed from a service tree.
[0054] In a specific embodiment of the present invention, a service tree refers to a service organization relationship established by an enterprise using a tree structure in order to facilitate the management of service clusters, that is, a model that binds instances and machines to each other. In a popular and narrow sense, the service tree maintains which business line has which machines and other resources. Correspondingly, the service tree includes different applications, such as reading applications and game applications, and different applications may have a tree-like hierarchical relationship, such as the book list recommendation function sub-application in the reading application.
[0055] In this embodiment, the template generation interface is used by the user to configure the template to generate a service deployment template for calling and reuse. Under the enterprise to which the user belongs, the template generation interface can display a service tree, and the user can select the application to be deployed such as application upgrade from the service tree. Accordingly, the application deployment tool responds to the user's operation of clicking on the template generation interface, takes the application selected by the user as the target application object, and uses it for subsequent application deployment based on the association relationship between the target application object and the server resources.
[0056] For example, Figure 3 This is a sample diagram of the template generation interface. Figure 3 As shown on the left, below the application selection box, a user's service tree is displayed, which includes App1 to App6, where App1 has a hierarchical relationship with App2 and App3, and App4 has a hierarchical relationship with App5 and App6. The user can select an App as the target object.
[0057] S220: Determine a deployment phase of at least one server resource associated with the target application object.
[0058] In a specific embodiment of the present invention, after selecting the target application object, the server resources under the target application object can be displayed in the template generation interface. The user can set the deployment stage of each server resource for subsequent application deployment of each server resource according to the stage sequence.
[0059] For example, Figure 4 Another example of a template generation interface. Figure 4 As shown on the left, App2 has been selected in the application selection box, and the corresponding relationship between App2 and server resources is displayed below the application selection box. Figure 4 In the example, App2 includes service granularities service1 and service2, and each service granularity includes instance entities such as instance 0 and instance 1. Figure 4 As shown on the right, in the stage setting box, you can add a new deployment stage by clicking the plus sign on the right. At the service granularity level, users can add or delete service granularities to each deployment stage by clicking the right and left arrows between the stage setting box and the server resource display area, so as to set the corresponding server resources under the service granularity in the corresponding deployment stage.
[0060] Among them, one or more service granularity entities are allowed in a deployment stage. Usually, according to this design, a batch of instances in a computer room or region can be defined as a service granularity service based on the regional and computer room business dimensions. Operations can be carried out in stages according to the service granularity, and they can be deployed online in batches for subsequent batch verification of the availability of online service deployment operations.
[0061] S230. Configure deployment parameters in the deployment phase; wherein the deployment parameters at least include resource deployment concurrency and verification type.
[0062] In a specific embodiment of the present invention, while the deployment phase is being set, the deployment parameters in the deployment phase can be configured. Specifically, the user can set the resource deployment concurrency according to business needs to limit the number of server resources that can be simultaneously deployed for applications in the deployment phase. The user can also set the verification type according to business needs to limit the verification type for server resources in the deployment phase. Among them, the verification type can include at least manual verification and callback verification. Manual verification refers to the verification of the deployment results of the server resources in the deployment phase by the staff when the deployment is completed in the deployment phase. Callback verification refers to the configuration of a custom verification tool by the staff, and when each server resource is deployed, the deployment result of each server resource is verified by automatically calling the calling interface corresponding to the verification tool. Accordingly, the corresponding calling interface URL needs to be configured under the callback verification type. If Figure 3 and Figure 4 In the middle stage deployment box, check the type and concurrency, as well as the URL associated with the callback check type and other deployment parameters.
[0063] S240. Configure global configuration parameters of the service deployment template; wherein the global configuration parameters at least include a single-machine download speed limit, a global failure tolerance number, and a single-machine timeout period.
[0064] In a specific embodiment of the present invention, before generating a service deployment template, global configuration parameters can also be configured. Specifically, users can set parameters such as single-machine download speed limit, global failure tolerance, and single-machine timeout according to business needs and service deployment capabilities. It is also possible to set information such as the recipient of the report, so that the staff can receive information such as the service deployment template or deployment results in a timely manner. Figure 3 and Figure 4 In the middle stage, deploy the global configuration parameters such as the single-machine download speed limit, global failure tolerance, and single-machine timeout above the frame.
[0065] S250: Generate a service deployment template.
[0066] In a specific embodiment of the present invention, after completing the configuration of the service deployment template, the user can perform operations such as confirmation in the template generation interface to generate the service deployment template. Figure 3 and Figure 4 The Save Template button below allows users to trigger the generation of a service deployment template with one click. The generated service deployment template matches the server resources of the application being operated and maintained, so the generated service deployment template can be reused in other operation and maintenance deployment operations of the application in the later stage. The service deployment template can be directly called, which greatly reduces the configuration operations of the template by the staff, improves the reusability of the service deployment template, and improves the efficiency of application deployment.
[0067] The technical solution of this embodiment, in the process of generating a service deployment template, determines the target application object that needs to deploy the application package from the service tree, determines the deployment stage of at least one server resource associated with the target application object, configures the deployment parameters under the deployment stage and the global configuration parameters of the service deployment template, thereby generating a service deployment template including the phased deployment configuration information of the server resources. The embodiment of the present invention realizes the phased deployment of server resources in medium and large-scale servers through a service deployment template including the phased deployment configuration information of the server resources, provides a phased test channel for the unified release of applications, meets the needs of users for phased deployment according to business dimensions, standardizes the application deployment process, realizes the unification and reusability of deployment templates, improves the application deployment effect, and avoids large-scale online failures caused by online deployment.
[0068] Embodiment 3
[0069] Based on the above-mentioned first embodiment, this embodiment provides a preferred implementation of the application deployment method, which can deploy the application and display the application deployment progress according to the parameters in the service deployment template. Figure 5 A flowchart of an application deployment method provided in Embodiment 3 of the present invention is shown in FIG. Figure 5 As shown, the method specifically includes the following:
[0070] S510: In response to a user operation on an application deployment interface, determine a service deployment template and an application package to be deployed.
[0071] In a specific embodiment of the present invention, a user can select a service deployment template from at least one pre-generated service deployment template and configure it in the application deployment interface according to the business requirements of the application to be operated and maintained, so as to standardize the deployment process of the application. At the same time, the user can configure the application package information to be deployed in the application deployment interface, thereby executing the application deployment task this time.
[0072] S520: Determine the target deployment stage to be deployed according to the sequence of each deployment stage in the service deployment template and the current deployment progress.
[0073] In a specific embodiment of the present invention, during the execution of the application deployment task, the current stage to be deployed can be determined as the target deployment stage according to the current deployment progress and the order of each deployment stage in the service deployment template.
[0074] S530: Use the server resources in the target deployment phase in the service deployment template as target server resources.
[0075] In a specific embodiment of the present invention, the service deployment template includes at least one service granularity under the target deployment stage, each service granularity includes at least one server resource, and all server resources in the target deployment stage are used as target server resources.
[0076] S540. Download the application package to be deployed according to the single-machine download speed limit in the service deployment template.
[0077] In a specific embodiment of the present invention, during the process of deploying applications to target server resources, firstly, the application packages to be deployed in the database are downloaded according to the single-machine download speed limit to obtain the application packages to be deployed.
[0078] S550: According to the resource deployment concurrency in the service deployment template, the application package to be deployed is deployed online simultaneously to at least one server resource within the resource deployment concurrency range in the target deployment stage.
[0079] In a specific embodiment of the present invention, the number of server resources that can be deployed currently in the target deployment stage is determined based on the resource deployment concurrency in the service deployment template, and the number of server resources is determined based on the target server resources, so that the application packages to be deployed are deployed to the number of server resources at the same time.
[0080] S560. During the process of deploying the application package to be deployed in the target server resources, the deployment progress of each deployment stage in the service deployment template is displayed.
[0081] In a specific embodiment of the present invention, in the process of deploying the application package to be deployed in the target server resources, the deployment progress of each deployment stage in the service deployment template can be displayed in the form of an interface or prompt box, including at least the application information of the operated and maintained application, the template name, the name of the application package to be deployed, the deployment stage, the execution status of the current deployment stage, and the verification status.
[0082] For example, Figure 6 Displays a sample graph of the application deployment progress. Figure 3As shown, the task information and online task details are displayed. From left to right in the task information, the application information of the maintained application App2 is displayed as node information, the template name of the service deployment template is displayed, the selection result of shielding the online alarm is displayed, the application package to be deployed is displayed as the module name, and the version number of App2 is displayed. In the online task details, all deployment stages, the current deployment stage, and the configuration information, execution status, and inspection status including inspection type of the current deployment stage are displayed. This allows users to handle abnormalities and other situations in a timely manner through the displayed application deployment progress.
[0083] The technical solution of this embodiment, by calling the service deployment template, determines the current target deployment stage to be deployed according to the service deployment template, determines the server resources of the target deployment stage in the service deployment template as the target server resources, and deploys the application package to be deployed in the target server resources according to the configuration parameters in the service deployment template. The embodiment of the present invention realizes the phased deployment of server resources in medium and large-scale servers through a service deployment template including phased deployment configuration information of server resources, provides a phased test channel for the unified release of applications, meets the needs of users for phased deployment according to business dimensions, standardizes the application deployment process, realizes the unification and reusability of deployment templates, improves the application deployment effect, and avoids large-scale online failures caused by online deployment.
[0084] Embodiment 4
[0085] This embodiment provides a preferred implementation of the application deployment method based on the above-mentioned embodiment 1, which can verify the application deployment result and deploy the application according to the verification result. Figure 7 A flowchart of an application deployment method provided in Embodiment 4 of the present invention is shown in FIG. Figure 7 As shown, the method specifically includes the following:
[0086] S710: In response to a user operation on an application deployment interface, determine a service deployment template and an application package to be deployed.
[0087] S720. Use the server resources in the target deployment phase in the service deployment template as target server resources.
[0088] S730: Deploy the application package to be deployed in the target server resources.
[0089] S740. Verify the deployment result of the target deployment stage according to the verification type of the target deployment stage in the service deployment template.
[0090] In a specific embodiment of the present invention, the verification type of the target deployment stage is used to verify the deployment results of the target server resources in the target deployment stage, which may include manual verification and callback verification. Manual verification refers to the verification of the deployment results of the target server resources in the target deployment stage by the staff when the deployment of the target deployment stage is completed. Callback verification refers to the verification of the deployment results of the target server resources by automatically calling the call interface corresponding to the verification tool configured in the service deployment template.
[0091] Specifically, the verification scheme associated with the verification type of the target deployment stage in the service deployment template is used to verify the deployment results of each server resource in the target deployment stage; if it is detected that the server resource has not published the application package to be deployed, and / or the deployment time of the server resource exceeds the single-machine timeout time, it is determined that the deployment of the server resource has failed; if it is detected that the number of server resources that have failed to be deployed in the deployed stage exceeds the global failure tolerance number, it is determined that the global deployment of the application package to be deployed has failed.
[0092] Among them, when there are very few server resources that fail to deploy, if the global deployment failure tolerance is not reached, it is considered that other successfully deployed server resources are able to support the current service response. When the number of server resources that fail to deploy exceeds the global failure tolerance, it can be considered that other successfully deployed server resources cannot support the current service response, affecting the normal use of users, and accordingly determined as a global deployment failure.
[0093] For example, assuming that the global failure tolerance is 1, and assuming that the first stage is fully deployed successfully, and the first server resource deployment fails in the second stage. If it is detected that a server resource deployment fails in the second stage or a subsequent deployment stage, that is, the number of server resources that have failed to be deployed in the deployed stage exceeds the global failure tolerance, it is determined that the global deployment of the application package to be deployed has failed, otherwise the deployment can continue.
[0094] S750: If it is determined according to the verification result that the global deployment has failed, redeploy the application package to be deployed on the server resources in the deployed stage.
[0095] In a specific embodiment of the present invention, if it is determined that the global deployment has failed according to the verification result, then inconsistency has occurred in the application deployment in the national server resources. For example, users in city C can enjoy the services provided by the new application package, but users in city A cannot, which affects the user experience in city A and the normal interaction between users in city A and users in city C. In order to prevent inconsistency in the application deployment in the national server resources, it is necessary to roll back the deployed server resources, so as to re-deploy the application on the rolled-back server resources and the server resources that have not yet undergone any deployment operations.
[0096] Specifically, call the service rollback template to roll back the server resources in the deployment stage of the deployed application package to be deployed to restore the resource status before the deployment of the application package to be deployed; call the service deployment template to redeploy the application package to be deployed for the server resources in each deployment stage in the service deployment template.
[0097] In this embodiment, the templates provided by the application deployment tool, in addition to the service deployment templates generated and used above, may also include templates of other scenario types, such as service rollback templates, according to business scenario requirements. Accordingly, the generation and use of templates of each scenario type are the same as those of the application deployment template. If it is determined based on the verification results that the global deployment has failed, the service rollback template is called to roll back the server resources in the deployment stage of the deployed application package to be deployed, and restore the server resources that have been deployed with the application package to be deployed to the state before deployment, so as to avoid large-scale online failures caused by online deployment. The service deployment template is then called again, and the application package to be deployed is redeployed for the server resources in each deployment stage in the service deployment template, to ensure the successful global deployment of the application.
[0098] The technical solution of this embodiment is to call the service deployment template, determine the current target deployment stage to be deployed based on the service deployment template, determine the server resources of the target deployment stage in the service deployment template as the target server resources, deploy the application package to be deployed in the target server resources based on the configuration parameters in the service deployment template, and verify the deployment results of the target deployment stage based on the verification type of the target deployment stage in the service deployment template, so as to decide the subsequent deployment plan based on the verification results. The embodiment of the present invention realizes the phased deployment of server resources in medium and large-scale servers through a service deployment template including the phased deployment configuration information of server resources, provides a phased test channel for the unified release of applications, meets the needs of users for phased deployment based on business dimensions, standardizes the application deployment process, realizes the unification and reusability of deployment templates, improves the application deployment effect, and avoids large-scale online failures caused by online deployment.
[0099] Embodiment 5
[0100] This embodiment provides a preferred implementation of the application deployment method based on the above-mentioned embodiment 1, which can verify the application deployment result and deploy the application according to the verification result. Figure 8 A flowchart of an application deployment method provided in Embodiment 5 of the present invention is shown in FIG. Figure 8 As shown, the method specifically includes the following:
[0101] S810: In response to a user operation on an application deployment interface, determine a service deployment template and an application package to be deployed.
[0102] S820. Use the server resources in the target deployment phase in the service deployment template as target server resources.
[0103] S830. Deploy the application package to be deployed in the target server resources.
[0104] S840. Use the verification scheme associated with the verification type of the target deployment stage in the service deployment template to verify the deployment results of each server resource in the target deployment stage.
[0105] S850: If it is detected that the server resource has not published the application package to be deployed, and / or the deployment time of the server resource exceeds the single machine timeout time, it is determined that the deployment of the server resource has failed.
[0106] S860: If it is detected that the number of server resources that have failed to be deployed in the deployed stage exceeds the global failure tolerance number, it is determined that the global deployment of the application package to be deployed has failed.
[0107] S870: Call the service rollback template to roll back the server resources in the deployment phase of the deployed application package to be deployed, so as to restore the resource status before the deployment of the application package to be deployed.
[0108] S880. Call the service deployment template to redeploy the application packages to be deployed on the server resources in each deployment stage in the service deployment template.
[0109] The technical solution of this embodiment is to call the service deployment template, determine the current target deployment stage to be deployed based on the service deployment template, determine the server resources of the target deployment stage in the service deployment template as the target server resources, deploy the application package to be deployed in the target server resources based on the configuration parameters in the service deployment template, and verify the deployment results of the target deployment stage based on the verification type of the target deployment stage in the service deployment template, so as to decide the subsequent deployment plan based on the verification results. The embodiment of the present invention realizes the phased deployment of server resources in medium and large-scale servers through a service deployment template including the phased deployment configuration information of server resources, provides a phased test channel for the unified release of applications, meets the needs of users for phased deployment based on business dimensions, standardizes the application deployment process, realizes the unification and reusability of deployment templates, improves the application deployment effect, and avoids large-scale online failures caused by online deployment.
[0110] Embodiment 6
[0111] Fig. 9 This is a schematic diagram of the structure of an application deployment device provided in Embodiment 6 of the present invention. This embodiment is applicable to the case where an application package is deployed on a server. The device can implement the application deployment method described in any embodiment of the present invention. The device specifically includes the following:
[0112] The template calling target 910 is used to determine the service deployment template and the application package to be deployed in response to the user's operation on the application deployment interface;
[0113] The resource determination module 920 is used to use the server resources in the target deployment stage in the service deployment template as target server resources;
[0114] The application package deployment module 930 is used to deploy the to-be-deployed application package in the target server resources.
[0115] Furthermore, the device further includes a template generating module 940, which is specifically used for:
[0116] Before determining the service deployment template and the application package to be deployed in response to the user's operation on the application deployment interface, at least one service deployment template is generated in response to the user's operation on the template generation interface.
[0117] Optionally, the template generating module 940 is specifically used for:
[0118] In response to the user's operation on the template generation interface, determining a target application object to which the application package needs to be deployed from the service tree;
[0119] Determining a deployment phase of at least one server resource associated with the target application object;
[0120] Configure the deployment parameters in the deployment stage to generate a service deployment template; wherein the deployment parameters at least include resource deployment concurrency and verification type.
[0121] Optionally, the template generating module 940 is specifically used for:
[0122] Configure the global configuration parameters of the service deployment template; wherein the global configuration parameters at least include a single-machine download speed limit, a global failure tolerance number, and a single-machine timeout period.
[0123] Optionally, the resource determination module 920 is specifically configured to:
[0124] Before using the server resources of the target deployment stage in the service deployment template as the target server resources, the target deployment stage to be deployed is determined according to the sequence of the deployment stages in the service deployment template and the current deployment progress.
[0125] Optionally, the application package deployment module 930 is specifically used for:
[0126] Download the application package to be deployed according to the single-machine download speed limit in the service deployment template;
[0127] According to the resource deployment concurrency in the service deployment template, the to-be-deployed application package is simultaneously deployed online to at least one server resource within the resource deployment concurrency range in the target deployment stage.
[0128] Furthermore, the device further includes a deployment verification module 950, which is specifically configured to:
[0129] After deploying the to-be-deployed application package in the target server resources, verifying the deployment result of the target deployment stage according to the verification type of the target deployment stage in the service deployment template;
[0130] If it is determined according to the verification result that the global deployment fails, the application package to be deployed is redeployed on the server resources in the deployed stage.
[0131] Optionally, the deployment verification module 950 is specifically used to:
[0132] Using the verification scheme associated with the verification type of the target deployment stage in the service deployment template, verifying the deployment results of each server resource in the target deployment stage;
[0133] If it is detected that the server resource has not published the application package to be deployed, and / or the deployment time of the server resource exceeds the single machine timeout time, it is determined that the deployment of the server resource has failed;
[0134] If it is detected that the number of server resources that have failed to be deployed in the deployed stage exceeds the global failure tolerance number, it is determined that the global deployment of the application package to be deployed has failed.
[0135] Optionally, the deployment verification module 950 is specifically used to:
[0136] Calling a service rollback template to roll back server resources in the deployment phase where the application package to be deployed has been deployed, so as to restore the resource state before the deployment of the application package to be deployed;
[0137] The service deployment template is called to redeploy the application package to be deployed on the server resources in each deployment stage in the service deployment template.
[0138] Furthermore, the device further includes a progress display module 960, which is specifically used to:
[0139] In the process of deploying the to-be-deployed application package in the target server resources, the deployment progress of each deployment stage in the service deployment template is displayed.
[0140] The technical solution of this embodiment realizes the functions of application selection, deployment phase configuration, parameter configuration, template generation, template calling, application deployment, deployment result verification, and deployment progress display through the mutual cooperation between various functional modules. The embodiment of the present invention realizes the phased deployment of server resources in medium and large-scale servers through the service deployment template including the phased deployment configuration information of server resources, provides a phased test channel for the unified release of applications, meets the needs of users for phased deployment according to business dimensions, standardizes the application deployment process, realizes the unification and reusability of deployment templates, improves the application deployment effect, and avoids large-scale online failures caused by online deployment.
[0141] Embodiment 7
[0142] Fig.10 A schematic diagram of the structure of a device provided in Embodiment 7 of the present invention is shown in FIG. Fig.10 A block diagram is shown of an exemplary apparatus suitable for implementing an exemplary embodiment of the present invention. Fig.10 The device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0143] Fig.10 The device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention. The device 12 is preferably an electronic device that carries an application deployment tool.
[0144] like Fig.10 As shown, the device 12 is in the form of a general purpose computing device. The components of the device 12 may include, but are not limited to, one or more processors 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processor 16).
[0145] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0146] Device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by device 12, including volatile and non-volatile media, removable and non-removable media.
[0147] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Fig.10 not shown, usually called a "hard drive"). Although Fig.10 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0148] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described in the embodiments of the present invention.
[0149] The device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the device 12, and / or may communicate with any device that enables the device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the device 12, including, but not limited to, microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0150] The processor 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the application deployment method provided in the embodiment of the present invention.
[0151] Embodiment 8
[0152] Embodiment 8 of the present invention further provides a computer-readable storage medium on which a computer program (or computer-executable instructions) is stored. When the program is executed by a processor, it is used to execute an application deployment method, the method comprising:
[0153] In response to the user's operation on the application deployment interface, determine the service deployment template and the application package to be deployed;
[0154] Using the server resources in the target deployment phase in the service deployment template as target server resources;
[0155] Deploy the application package to be deployed in the target server resources.
[0156] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0157] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0158] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0159] Computer program code for performing the operation of embodiments of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or device. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0160] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the embodiments of the present invention are described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. An application deployment method, characterized in that, it includes: In response to an operation by a user on an application deployment interface, determining a service deployment template and an application package to be deployed; Regarding the server resources in the target deployment stage in the service deployment template as target server resources; Deploying the application package to be deployed in the target server resources; Before the step of, in response to an operation by a user on an application deployment interface, determining a service deployment template and an application package to be deployed, it further includes: In response to an operation by a user on a template generation interface, determining a target application object for which an application package needs to be deployed from a service tree; Determining the deployment stages of at least one server resource associated with the target application object; Configuring deployment parameters in the deployment stage to generate a service deployment template; wherein the deployment parameters at least include resource deployment concurrency and verification type.
2. The method according to claim 1, characterized in that, before generating the service deployment template, it further includes: Configuring global configuration parameters of the service deployment template; wherein the global configuration parameters at least include single - machine download speed limit, global failure tolerance number, and single - machine timeout time.
3. The method according to claim 1, characterized in that, before regarding the server resources in the target deployment stage in the service deployment template as target server resources, it further includes: Determining the target deployment stage to be currently deployed according to the order of each deployment stage in the service deployment template and the current deployment progress.
4. The method according to claim 1, characterized in that, the step of deploying the application package to be deployed in the target server resources includes: Downloading the application package to be deployed according to the single - machine download speed limit in the service deployment template; According to the resource deployment concurrency in the service deployment template, simultaneously deploying the application package to be deployed to at least one server resource within the range of the resource deployment concurrency in the target deployment stage.
5. The method according to claim 1, characterized in that, after deploying the application package to be deployed in the target server resources, it further includes: Verifying the deployment result of the target deployment stage according to the verification type of the target deployment stage in the service deployment template; If it is determined that the global deployment fails according to the verification result, redeploying the application package to be deployed to the server resources in the already - deployed stages.
6. The method according to claim 5, characterized in that, the step of verifying the deployment result of the target deployment stage according to the verification type of the target deployment stage in the service deployment template includes: Adopting a verification scheme associated with the verification type of the target deployment stage in the service deployment template to verify the deployment results of each server resource in the target deployment stage; If it is detected that a server resource has not deployed the application package to be deployed, and / or the deployment time of this server resource exceeds the single - machine timeout time, determining that the deployment of this server resource fails; If it is detected that the number of server resources with deployment failures in the already - deployed stages exceeds the global failure tolerance number, determining that the global deployment of the application package to be deployed fails.
7. The method according to claim 5, It is characterized in that redeploying the to-be-deployed application package to the server resources in the deployed phase includes: invoking a service rollback template to roll back the server resources in the deployment phase where the to-be-deployed application package has been deployed, so as to restore the resource state before the deployment of the to-be-deployed application package; invoking the service deployment template to redeploy the to-be-deployed application package to the server resources in each deployment phase in the service deployment template.
8. The method according to claim 1, it is characterized in that during the process of deploying the to-be-deployed application package to the target server resources, it further includes: displaying the deployment progress of each deployment phase in the service deployment template.
9. An application deployment device, it is characterized in that including: a template invocation target, configured to determine a service deployment template and a to-be-deployed application package in response to an operation by a user on an application deployment interface; a resource determination module, configured to use the server resources in the target deployment phase in the service deployment template as target server resources; an application package deployment module, configured to deploy the to-be-deployed application package to the target server resources; a template generation module, configured to, before determining the service deployment template and the to-be-deployed application package in response to an operation by a user on the application deployment interface, determine a target application object for which an application package needs to be deployed from a service tree in response to an operation by a user on a template generation interface; determine the deployment phases of at least one server resource associated with the target application object; configure the deployment parameters in the deployment phase to generate a service deployment template; wherein the deployment parameters at least include resource deployment concurrency and verification type.
10. The device according to claim 9, it is characterized in that the template generation module is specifically configured to: configure the global configuration parameters of the service deployment template; wherein the global configuration parameters at least include single-machine download speed limit, global failure tolerance number, and single-machine timeout time.
11. The device according to claim 9, it is characterized in that the resource determination module is specifically configured to: before using the server resources in the target deployment phase in the service deployment template as target server resources, determine the current target deployment phase to be deployed according to the order of each deployment phase in the service deployment template and the current deployment progress.
12. The device according to claim 9, it is characterized in that the application package deployment module is specifically configured to: download the to-be-deployed application package according to the single-machine download speed limit in the service deployment template; deploy the to-be-deployed application package to at least one server resource within the range of the resource deployment concurrency in the target deployment phase simultaneously according to the resource deployment concurrency in the service deployment template.
13. The device according to claim 9, it is characterized in that the device further includes a deployment verification module, specifically configured to: after deploying the to-be-deployed application package to the target server resources, verify the deployment result of the target deployment phase according to the verification type of the target deployment phase in the service deployment template. If it is determined that the global deployment fails according to the verification result, redeploy the to-be-deployed application package to the server resources in the deployed phase.
14. The apparatus according to claim 13, wherein, the deployment verification module is specifically configured to: adopt the verification scheme associated with the verification type of the target deployment phase in the service deployment template to verify the deployment results of each server resource in the target deployment phase; if it is detected that the server resource has not published the to-be-deployed application package, and / or the deployment time of the server resource exceeds the single-machine timeout time, determine that the deployment of the server resource fails; if it is detected that the number of server resources with deployment failures in the deployed phase exceeds the global failure tolerance number, determine that the global deployment of the to-be-deployed application package fails.
15. The apparatus according to claim 13, wherein, the deployment verification module is specifically configured to: invoke the service rollback template to roll back the server resources in the deployment phase where the to-be-deployed application package has been deployed, so as to restore the resource state before the deployment of the to-be-deployed application package; invoke the service deployment template to redeploy the to-be-deployed application package to the server resources in each deployment phase of the service deployment template.
16. The apparatus according to claim 9, wherein, the apparatus further includes a progress display module, which is specifically configured to: during the process of deploying the to-be-deployed application package to the target server resources, display the deployment progress of each deployment phase in the service deployment template.
17. A device, wherein, it includes: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the application deployment method according to any one of claims 1-8.
18. A computer-readable storage medium, on which a computer program is stored, wherein, when the program is executed by a processor, it implements the application deployment method according to any one of claims 1-8.
Citation Information
Patent Citations
Automatic deploy method for cloud computing application software
CN103401940A
Cross-platform deployment method and system
CN109547509A