Application deployment method and device, server and storage medium
By using resource annotation identifiers to track and update resource status information, the method ensures accurate identification and deployment of changed resources in microservice clusters, enhancing deployment reliability.
Patent Information
- Application Number
- CN202411161304.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-20
AI Technical Summary
Existing microservice cluster deployment technologies face reliability issues due to the inability to accurately identify and update changed resources during application deployment, leading to incomplete or failed updates.
The implementation of resource annotation identifiers to track resource status information, allowing for accurate identification and update of changed resources by generating updated resource annotation identifiers when instructed by the user, ensuring that deployment components correctly perform updates even if resource identifiers remain unchanged.
This approach enhances the reliability of application deployment by ensuring that resource changes are accurately identified and addressed, preventing missed updates and improving the overall deployment process.
Smart Images

Figure CN119166175A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of microservice architecture technology, and in particular to an application deployment method, device, server and storage medium. Background Art
[0002] Application deployment in a microservice cluster refers to the process of configuring an application and its related resources into a microservice cluster so that it can run and provide services in the cluster. To enable applications deployed in a microservice cluster to adapt to increasingly complex application scenarios, container applications can be updated and deployed.
[0003] Currently, during the application update deployment process, the built-in deployment component in the microservice cluster compares the deployment configuration resources used in the current update deployment and the previous deployment or update deployment, identifies the changed resources, and updates the application for the changed resources.
[0004] However, in the process of implementing update deployment, how to ensure that each deployment can correctly identify and process the changed resource content is a key issue. If the deployment component ignores the resources that have actually changed in the deployment resources during the identification process, it will then ignore the update deployment of the application, resulting in a technical problem of low reliability of the deployment results corresponding to the update deployment. Summary of the invention
[0005] The present application provides an application deployment method, apparatus, device and storage medium, which are used to solve the problem of low reliability of deployment results when updating and deploying deployed applications in the prior art.
[0006] In a first aspect, the present application provides an application deployment method, comprising:
[0007] Receiving an application update deployment request; the application update deployment request includes application deployment data;
[0008] In the case where the application update deployment request also includes a resource annotation identifier update instruction, generating an updated resource annotation identifier; the resource annotation identifier is used to describe resource status information of resources included in the application deployment data;
[0009] Generate an updated deployment resource of the application to be updated corresponding to the application deployment data according to the updated resource annotation identifier and the application deployment data;
[0010] The application to be updated is updated and deployed according to the update deployment resource.
[0011] In a possible design, when the application update deployment request also includes a resource annotation identifier update instruction, generating an updated resource annotation identifier includes:
[0012] Parsing the application update deployment request to obtain a parsing result; the parsing result of the application update deployment request includes application deployment data corresponding to the application to be updated, or the parsing result includes the application deployment data of the application to be updated and a resource annotation identifier update instruction of the application deployment data;
[0013] If it is identified that the parsing result contains the resource annotation identifier update instruction, a preset identifier generation component is called to generate an updated resource annotation identifier for the application deployment data.
[0014] In a possible design, generating, according to the updated resource annotation identifier and the application deployment data, an updated deployment resource of the application to be updated corresponding to the application deployment data includes:
[0015] Obtaining a preset configuration file template, filling the application deployment data and the updated resource annotation identifier into the configuration file template, and generating an updated deployment file corresponding to the application to be updated;
[0016] Resource configuration is performed according to the update deployment file to generate update deployment resources corresponding to the application to be updated.
[0017] In one possible design, the method further includes:
[0018] Upon receiving an application creation deployment request including application deployment data, generating a resource annotation identifier corresponding to the application deployment data;
[0019] Generate creation deployment resources of the application to be created according to the resource annotation identifier, and create the application to be created according to the creation deployment resources.
[0020] In a possible design, after generating a resource annotation identifier corresponding to the application deployment data, the method further includes:
[0021] Storing the resource annotation identifier and the application deployment data in a preset identifier database;
[0022] When generating the updated resource annotation identifier of the application deployment data, the updated resource annotation identifier is used to overwrite the resource annotation identifier in the identifier database.
[0023] In one possible design, the method further includes:
[0024] When it is determined that the parsing result does not include the resource annotation identifier update instruction, reading the resource annotation identifier corresponding to the application deployment data from a preset identifier database;
[0025] Generate update deployment resources corresponding to the application to be updated of the application deployment data according to the resource annotation identifier;
[0026] When the update deployment resource is inconsistent with the historical deployment resource, the update deployment resource of the corresponding application to be updated.
[0027] In a second aspect, the present application provides an application deployment device, including:
[0028] The device comprises:
[0029] A request receiving module, used to receive an application update deployment request; the application update deployment request includes application deployment data;
[0030] An updated resource annotation identifier generation module, used to generate an updated resource annotation identifier when the application update deployment request also includes a resource annotation identifier update instruction; the resource annotation identifier is used to describe the resource status information of the resource included in the application deployment data;
[0031] A first update deployment resource generation module, configured to generate an update deployment resource for the application to be updated corresponding to the application deployment data according to the updated resource annotation identifier;
[0032] The first update deployment module is used to update and deploy the application to be updated according to the update deployment resource.
[0033] In a third aspect, an embodiment of the present application provides a server, comprising: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the application deployment method described in the first aspect and various possible designs of the first aspect.
[0034] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the application deployment method described in the first aspect and various possible designs of the first aspect is implemented.
[0035] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the application deployment method described in the first aspect and various possible designs of the first aspect.
[0036] The application deployment method, device, server and storage medium provided by the present application receive an application update deployment request; the application update deployment request includes application deployment data; when the application update deployment request also includes a resource annotation identifier update instruction, an updated resource annotation identifier is generated; the resource annotation identifier is used to describe resource status information of resources included in the application deployment data; based on the updated resource annotation identifier and the application deployment data, an update deployment resource of the application to be updated corresponding to the application deployment data is generated; based on the update deployment resource, the application to be updated is updated and deployed; during the update deployment process, if the user modifies the application deployment data transmitted to the application deployment device, the application deployment data is transmitted in the data while the data is transmitted. The resource annotation identifier update instructions corresponding to each resource respectively; then the resource deployment device generates a new resource annotation identifier corresponding to each resource in the application deployment data according to the resource annotation identifier update instructions transmitted by the user, and replaces the original resource annotation identifier. In this way, even if the resource identifier has not changed, but the resource annotation identifier has changed, it can be ensured that each time the application deployment data transmitted has a content change, it can be accurately identified and the update deployment operation can be correctly performed, avoiding the situation where the resource identifier corresponding to the resource in the application deployment data has not changed during data transmission, causing the deployment component to mistakenly believe that the deployment resource corresponding to the resource identifier has not changed and thus does not update the deployment. Therefore, it can solve the problem of low reliability of deployment results when updating and deploying deployed applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0038] Figure 1 Application scenario diagram for application deployment of existing technologies;
[0039] Figure 2 An application scenario diagram of an application deployment method applicable to an embodiment of the present application;
[0040] Figure 3 A flowchart of an application deployment method provided in an embodiment of the present application;
[0041] Figure 4 An interactive diagram of an application update deployment provided in an embodiment of the present application Figure 1 ;
[0042] Figure 5 An interactive schematic diagram of application creation and deployment provided in an embodiment of the present application;
[0043] Figure 6 An interactive diagram of an application update deployment provided in an embodiment of the present application Figure 2 ;
[0044] Figure 7 A schematic diagram of the structure of an application deployment device provided in an embodiment of the present application;
[0045] Figure 8 A schematic diagram of the structure of a server provided in an embodiment of the present application.
[0046] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0047] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0048] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.
[0049] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0050] Terminology explanation:
[0051] Kubernetes, abbreviated as k8s, is an open source container orchestration platform for automating the deployment, expansion, and management of containerized applications. It provides high availability, scalability, and automated operation and maintenance capabilities by managing the life cycle of containers.
[0052] Helm: It is a package management tool for Kubernetes, used to manage the installation, upgrade, and configuration of Kubernetes applications.
[0053] Chart: It is a resource collection that Helm uses to describe Kubernetes-related resources. It contains information such as how the application is deployed, how the service is exposed to the outside world, the storage resources used by the service, and the quota of system resources used.
[0054] Application deployment: Application deployment in Kubernetes (K8s) refers to the process of configuring an application and its related resources into a Kubernetes cluster so that it can run in the cluster and provide services.
[0055] Figure 1 The following is an application scenario diagram for the application deployment of existing technologies. Figure 1 As shown, the application scenario specifically includes: a terminal and an application deployment device; wherein the application deployment device includes a deployment management module, a deployment component and a microservice cluster;
[0056] In the prior art, during the update and deployment process of an application, a user transmits application deployment data corresponding to the update and deployment to a deployment management module through a terminal; the deployment management module generates a corresponding update and deployment file, such as a Chart, based on the received update and deployment file, and transmits it to a deployment component; after the deployment component configures resources for the update and deployment file, if the update and deployment resources obtained are inconsistent with the historical deployment resources stored therein, the update and deployment resources are transmitted to the corresponding resource location of the application to be updated in the microservice cluster, thereby realizing the update and deployment of the application to be updated.
[0057] During the above-mentioned update deployment process, if there are some specific resources in the application deployment data transmitted by the user for updating and the application deployment data when the application is created, that is, when these resources are modified in the form of overwriting resources, the content will change but the resource identifier will not change, which will cause the deployment component to mistakenly believe that the resource corresponding to the resource identifier has not changed due to the unchanged resource identifier, and thus ignore the update of the application to be updated.
[0058] For example, after discovering that there is a problem with the container image of the application to be updated, the user directly modifies it. The modified new container image overwrites the old container image with the problem, but the image identifier corresponding to the new container image is still the original image identifier; after the above resources are transmitted to the deployment component, the deployment component uses the same image identifier in the configuration resources in the application deployment data for update received by the deployment component and in the historical deployment resources stored by it. Then, it believes that the container image resource corresponding to the image identifier has not changed, so it will not update the application to be updated corresponding to the resource. This will cause the update deployment of the application to fail and reduce the reliability of the update deployment.
[0059] In response to the above technical problems, the present application proposes the following technical ideas: when performing application deployment, the application deployment device can generate corresponding resource annotation identifiers for each deployment resource parameter contained in the application deployment data transmitted by the user, and use the resource annotation identifier as one of the metadata to generate configuration resources, and perform subsequent resource configuration and deployment processing; since the user clearly knows whether he has modified the application deployment data transmitted to the application deployment device, during the update deployment process, if the user modifies the application deployment data transmitted to the application deployment device, the user transmits the resource annotation identifier update instructions corresponding to each resource in the data while transmitting the data; then the resource deployment device generates new resource annotation identifiers corresponding to each resource in the application deployment data according to the resource annotation identifier update instructions transmitted by the user, and replaces the original resource annotation identifier. In this way, even if the resource identifier has not changed, but the resource annotation identifier has changed, it can be ensured that each time the content of the transmitted application deployment data changes, it can be accurately identified and the update deployment operation can be correctly performed, avoiding the situation where the deployment component mistakenly believes that the deployment resource corresponding to the resource identifier has not changed and does not perform update deployment due to the resource identifier corresponding to the resource in the application deployment data not changing during data transmission, thereby improving the reliability of update deployment.
[0060] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0061] Figure 2 FIG. 1 is an application scenario diagram of the application deployment method applicable to the embodiment of the present application. Figure 2 As shown, the application scenario includes: a terminal and an application deployment component; wherein the application deployment component includes a deployment management module, a database, a deployment component and a microservice cluster; the deployment management module includes a database for storing resource annotation identifiers.
[0062] When the application is updated and deployed, the user transmits the application deployment data corresponding to the updated deployment to the deployment management module; at the same time, if the user modifies the resources in the application deployment data before the transmission, the resource annotation identifier update instruction corresponding to the resource is transmitted to the deployment management module while transmitting the application deployment data containing each resource; then the deployment management module generates the updated resource annotation identifier of each resource in the application deployment data according to the received resource annotation identifier update instruction; to ensure the reliability of the deployment result corresponding to the subsequent update deployment, the application deployment device can replace the resource annotation identifier stored in the database with the generated updated resource annotation identifier; further, the resource annotation identifier is used as one of the default metadata of the resource, and an updated deployment file of the application to be updated is generated together with each resource in the application deployment data, and the updated deployment file is transmitted to the deployment component; the deployment component performs resource configuration on the received updated deployment file to generate an updated deployment resource, and then transmits the updated deployment resource to the corresponding resource location of the application to be updated in the microservice cluster, so as to realize the updated deployment of the application to be updated.
[0063] The above update deployment method, even if the resource identifier has not changed, but the resource annotation identifier has changed, can ensure that each time the application deployment data transmitted has content changes, it can be accurately identified and the update deployment operation can be correctly performed. This avoids the situation where the resource identifier corresponding to the resource in the application deployment data has not changed during data transmission, causing the deployment component to mistakenly believe that the deployment resource corresponding to the resource identifier has not changed and thus not update the deployment, thereby improving the reliability of the update deployment.
[0064] based on Figure 2 In the application scenario shown, an embodiment of the present application also provides an application deployment method. Figure 3 Flow chart of the application deployment method provided in the embodiment of the present application. Figure 3 As shown, the application deployment method includes:
[0065] S301, receiving an application update deployment request; the application update deployment request includes application deployment data.
[0066] In this embodiment, the application update deployment request is a deployment request sent by a user to the application deployment device, and the request is used to update resources of the application to be updated pre-deployed in the application deployment device. Exemplarily, in some optional implementations, the application deployment device can be understood as a microservice architecture including a microservice cluster environment, and the pre-deployed application to be updated can be understood as a containerized application pre-deployed in the microservice cluster.
[0067] In this embodiment, the application deployment data can be understood as a resource set that describes the computing resources (such as CPU, memory), storage resources (such as persistent volume), network resources (such as service, load balancing), etc. required by the application. In order to improve the application performance of the application at runtime, or to solve program problems that occur during the operation of the application, the application deployment data containing updated resource information can be retransmitted, and the application to be updated can be updated and deployed according to the application deployment data.
[0068] Specifically, in the terminal display page, the user can input corresponding update deployment resources according to the update deployment requirements, integrate the update deployment resources, obtain application deployment data of the application to be updated, and then transmit the application deployment data to the application deployment device through the preset interface to realize application update deployment.
[0069] S302: When the application update deployment request also includes a resource annotation identifier update instruction, generate an updated resource annotation identifier.
[0070] In this embodiment, the resource annotation identifier is used to describe the resource status information of the resource contained in the application deployment data. Specifically, it can be explained as follows: the resource annotation identifier is a unique identifier created by the application for the received application deployment data when the application is created and deployed; the identifier can be used to describe the transmission time, transmission terminal, and specific resource parameters of each resource in the application deployment data, etc.
[0071] In order to avoid the application deployment device being unable to accurately identify resource changes between the application deployment data and historically stored data based on the resource identifiers of each resource in the application deployment data, the user can simultaneously generate an update deployment request based on the application deployment data and the resource annotation identifier corresponding to each resource in the application deployment data, and transmit the update deployment request to the application deployment device.
[0072] When the application deployment device determines from the parsing result corresponding to the received update deployment request that the request contains, in addition to the application deployment data, a resource annotation identifier update instruction corresponding to the resource, it generates the updated resource annotation identifier of the application deployment component according to the pre-generated instruction generation component.
[0073] It can be explained that the updated resource annotation identifier is used to update the resource annotation identifier corresponding to the application deployment data. In other words, the application deployment device overwrites the corresponding resource annotation identifier stored in the application deployment device according to the updated resource annotation identifier to improve the reliability of subsequent application update deployment.
[0074] S303: Generate updated deployment resources of the application to be updated corresponding to the application deployment data according to the updated resource annotation identifier and the application deployment data.
[0075] In related technologies, a microservice cluster provides metadata support for all resources within it, that is, all resources contain the same metadata attributes. The annotation attribute in the metadata is a key-value pair used to add additional non-identifying information to the resource. Annotations provide richer descriptive information that can be used to track, record, and explain the status, configuration, and purpose of resources. Annotations are usually used to store auxiliary information related to resources, such as build versions, logs, audit records, etc. The characteristic of annotations is that they can contain a large amount of text information and have no direct impact on the running status of resources. They are only used to provide additional descriptive information.
[0076] In this embodiment, when the application is deployed, the metadata of each resource in the application deployment file is added to a specific resource annotation identifier, and a default value is specified for the resource annotation identifier. Subsequently, the resource annotation identifier is used as one of the metadata together with other metadata of each resource in the application deployment data to implement the update deployment of the application to be updated.
[0077] Specifically, other metadata of each resource in the application deployment data and the updated resource annotation identifier of each resource are used as resource parameters to generate an updated deployment file, and an updated deployment resource is generated according to the updated deployment file.
[0078] S304: Update and deploy the application to be updated according to the update deployment resources.
[0079] In this embodiment, when the update deployment resources of the application to be updated are obtained, when it is determined that there is a resource modification between the update deployment resources and the historically stored deployment resources based on the annotation content corresponding to the annotation identification resource in the resource, the update deployment resources can be transmitted to the corresponding resource location of the application to be updated in the microservice cluster to realize the update deployment of the application to be updated.
[0080] In the above technical solution, an application update deployment request is received; the application update deployment request includes application deployment data; when the application update deployment request also includes a resource annotation identifier update instruction, an updated resource annotation identifier is generated; based on the updated resource annotation identifier and the application deployment data, an update deployment resource of the application to be updated corresponding to the application deployment data is generated; based on the updated deployment resource, the application to be updated is updated and deployed; during the update deployment process, if the user modifies the application deployment data transmitted to the application deployment device, the resource annotation identifier update instruction corresponding to each resource in the data is transmitted while the data is transmitted; and then the resource deployment device generates a new resource annotation identifier corresponding to each resource in the application deployment data according to the resource annotation identifier update instruction transmitted by the user, and replaces the original resource annotation identifier, so that even if the resource identifier has not changed, but the resource annotation identifier has changed, it can be ensured that each time the application deployment data transmitted has a content change, it can be accurately identified and the update deployment operation can be correctly performed, avoiding the situation that the deployment component mistakenly believes that the deployment resource corresponding to the resource identifier has not changed and does not perform update deployment due to the resource identifier corresponding to the resource in the application deployment data not changing during data transmission, thereby improving the reliability of update deployment.
[0081] In some optional embodiments, when the application update deployment request also includes a resource annotation identifier update instruction, an updated resource annotation identifier is generated, including: parsing the application update deployment request to obtain a parsing result; the parsing result of the application update deployment request includes the application deployment data corresponding to the application to be updated, or the parsing result includes the application deployment data of the application to be updated and the resource annotation identifier update instruction of the application deployment data; if it is recognized that the parsing result includes the resource annotation identifier update instruction, calling a preset identifier generation component to generate an updated resource annotation identifier for the application deployment data.
[0082] Figure 4 An interactive diagram of an application update deployment provided in an embodiment of the present application Figure 1 .like Figure 4 As shown, the application deployment device includes a deployment management module, a deployment component and a microservice cluster. Specifically, when the deployment management module receives an update deployment request transmitted by a terminal, it parses the update deployment request according to a preset parsing rule to obtain a corresponding parsing result.
[0083] The parsing result may be different depending on the content integrated when the user generates the request. Optionally, the parsing result may only include the application deployment data corresponding to the application to be updated, or the parsing result may include the application deployment data of the application to be updated and the resource annotation identification update instructions corresponding to each resource in the application deployment data.
[0084] Furthermore, the parsed result is subjected to content identification to determine whether it contains resource annotation identifier update instructions. If so, it indicates that the current deployment management module is in a situation where the application update deployment request also contains resource annotation identifier update instructions. In the current situation, an updated resource annotation identifier can be generated according to the instructions.
[0085] Specifically, a preset identifier generation component in the deployment management module may be called, and identifier generation is performed according to the identifier generation component and the application deployment file to obtain a resource annotation identifier after the application deployment data is updated.
[0086] On this basis, some optional embodiments also include: when generating updated resource annotation identifiers for application deployment data, using the updated resource annotation identifiers to overwrite resource annotation identifiers in the identifier database.
[0087] It should be noted that when creating and deploying an application based on the application deployment data transmitted by the terminal when creating and deploying the application, the deployment management module will generate a resource annotation identifier corresponding to each resource in the application deployment data; and store the resource annotation identifier in a database preset by the deployment management module.
[0088] On this basis, when generating an updated resource annotation identifier, the deployment management module can replace the resource annotation identifier stored in the database with the generated updated resource annotation identifier, thereby ensuring a one-to-one correspondence between the resource annotation identifier stored in the database and the data version of the application deployment data, thereby improving the reliability of the corresponding deployment results of subsequent update deployments.
[0089] Based on the generated updated resource annotation identifier, the deployment management module can generate an updated deployment file based on the updated resource annotation identifier and other metadata of each resource in the application deployment data, and transmit it to the deployment component to implement update deployment of the application to be updated.
[0090] In some optional implementations, generating updated deployment resources of the application to be updated corresponding to the application deployment data according to the updated resource annotation identifier and the application deployment data includes:
[0091] Obtain a preset configuration resource template, fill the application deployment data and the updated resource annotation identifier into the configuration resource template, and generate application configuration resources corresponding to the application to be updated; perform resource configuration according to the application configuration resources, and generate update deployment resources corresponding to the application to be updated.
[0092] Chart is the packaging format of Helm, similar to the software package in Linux. A Chart contains all necessary resource definitions (such as Deployment, Service, ConfigMap, etc.) and configuration files of a Kubernetes application. In related technologies, Helm uses Chart to define the structure and configuration of an application. Therefore, in order to implement update deployment of the application to be updated through a deployment component, such as Helm, an update deployment file, such as Chart, can be generated in advance through the deployment management module, and then the update deployment file can be transferred to the deployment component.
[0093] In this embodiment, a file framework of an update deployment file, i.e., a configuration file template, is pre-stored in the deployment management module. Furthermore, the metadata of each resource in the application deployment data received by the deployment management module and the updated resource annotation identifier as another metadata are filled into the above-mentioned configuration file module to generate a complete update deployment file, i.e., an update deployment file corresponding to the application to be updated; the deployment management module also transmits the generated update deployment file to the deployment component; further, the deployment component performs resource configuration on the received update deployment file to obtain update deployment resources corresponding to the application to be updated.
[0094] On this basis, the deployment component transmits the updated deployment resources to the corresponding resource location of the application to be updated in the microservice cluster, thereby realizing the updated deployment of the application to be updated.
[0095] In order to implement the application update deployment method implemented by the above-mentioned implementation method in this embodiment, it is necessary to complete the creation and deployment operation of the application in advance, that is, before the above-mentioned application update deployment method is implemented, this embodiment also includes: when receiving an application creation and deployment request containing application deployment data, generating a resource annotation identifier corresponding to the application deployment data; generating creation and deployment resources for the application to be created according to the resource annotation identifier, and creating the application to be created according to the creation and deployment resources.
[0096] Figure 5 The following is an interactive diagram of an application creation and deployment provided in an embodiment of the present application. Figure 5 As shown, the application deployment device includes a deployment management module, a deployment component and a microservice cluster. Specifically, the user transmits an application creation deployment request carrying application deployment data to the deployment management module through a terminal; when the deployment management module receives the application creation deployment request, it can generate a resource annotation identifier corresponding to each resource in the application deployment data, and then use the resource annotation identifier as one of the metadata of each resource, and generate a creation deployment file together with other metadata of each resource in the application deployment data, and then transmit the creation deployment file to the deployment component.
[0097] Furthermore, the deployment component performs resource configuration on the received creation deployment file to obtain creation deployment resources corresponding to the application to be created; the deployment component also transmits the creation deployment resources to the resource location corresponding to the resources allocated in the microservice cluster to realize the creation deployment application in the microservice cluster.
[0098] In some optional embodiments, when the deployment management module generates a resource annotation identifier for each resource in the application deployment data, it further includes: storing the resource annotation identifier and the application deployment data in a preset identifier database.
[0099] In this way, when the application is updated and deployed subsequently, it is determined whether the corresponding resources in the application deployment data transmitted by the terminal have changed, thereby improving the reliability of the deployment process.
[0100] In some optional implementations, before generating resource annotation identifiers corresponding to each resource in the application deployment data, each resource may be pre-screened based on screening rules, and resource annotation identifiers may be generated for the screened resources to reduce waste of resources.
[0101] In the above implementation, whether the resource identifier corresponding to the resource changes after the resource modification of the application deployment data in the above implementation can be used as a screening rule in advance to further screen out the resources whose resource identifiers do not change after the resource modification.
[0102] In this way, when the application is updated and deployed, the resource identifier is used as the main identification field for the resources whose resource identifier will change after the resource is modified, and the resource label resource bit generated subsequently is used as the main identification field to identify the resource changes during the update and deployment. This allows accurate identification of resource changes while reducing resource transmission and storage, thereby ensuring the reliability of the deployment process while reducing deployment costs.
[0103] In some optional implementations, the method further includes: when it is determined that the parsing result does not contain a resource annotation identifier update instruction, reading the resource annotation identifier corresponding to the application deployment data in a preset identifier database; and generating an update deployment resource for the application to be updated corresponding to the application deployment data according to the resource annotation identifier.
[0104] Figure 6 An interactive diagram of an application update deployment provided in an embodiment of the present application Figure 2 .like Figure 6As shown, the application deployment device includes a deployment management module, a deployment component, and a microservice cluster. Specifically, after the deployment management module parses the received update deployment request, when it recognizes that the parsing result only contains the application deployment data of the application to be updated, it means that the user has not modified the resources in the application file deployment data before uploading the terminal; or the user has not modified the resources with resource annotation identifiers in the metadata.
[0105] In order to ensure the reliability of update deployment, update deployment resources are still generated, and it is determined whether there are resource changes. If so, the update deployment is performed on the application to be updated based on the generated update deployment resources.
[0106] Specifically, the deployment management module stores the resource annotation identifier corresponding to the application deployment data when creating the deployment or the previous update deployment, and generates an update deployment file for the application to be updated based on the resource annotation identifier and other metadata of each resource in the application deployment data; the deployment management module also transmits the generated update deployment file to the deployment component; further, the deployment component performs resource configuration on the received update deployment file to obtain the update deployment resources corresponding to the application to be updated.
[0107] On this basis, the deployment component will match the updated deployment resources with the currently stored historical deployment resources. If the matching results are inconsistent, it means that there are resource changes. The deployment component can transmit the updated deployment resources to the corresponding resource location of the application to be updated in the microservice cluster to realize the updated deployment of the application to be updated.
[0108] Figure 7 This is a schematic diagram of the structure of the application deployment device provided in the embodiment of the present application. Figure 7 As shown, the application deployment device 70 includes: a request receiving module 701, an updated resource annotation identifier generating module 702, a first update deployment resource generating module 703 and a first update deployment module 704; wherein,
[0109] The request receiving module 701 is used to receive an application update deployment request; the application update deployment request includes application deployment data;
[0110] The updated resource annotation identifier generating module 702 is used to generate an updated resource annotation identifier when the application update deployment request also includes a resource annotation identifier update instruction; the resource annotation identifier is used to describe the resource status information of the resource included in the application deployment data;
[0111] A first update deployment resource generation module 703, configured to generate update deployment resources corresponding to the application to be updated according to the updated resource annotation identifier;
[0112] The first update deployment module 704 is used to perform update deployment on the application to be updated according to the update deployment resources.
[0113] In an optional embodiment, the updated resource annotation identifier generation module includes:
[0114] The request parsing submodule is used to parse the application update deployment request to obtain a parsing result; the parsing result of the application update deployment request includes the application deployment data corresponding to the application to be updated, or the parsing result includes the application deployment data of the application to be updated and the resource annotation identification update instruction of the application deployment data;
[0115] The identifier generation submodule is used to call a preset identifier generation component to generate an updated resource annotation identifier for the application deployment data if it is recognized that the parsing result contains a resource annotation identifier update instruction.
[0116] In an optional embodiment, the first update deployment resource generation module includes:
[0117] The update deployment file generation submodule is used to obtain a preset configuration file template, fill the application deployment data and the updated resource annotation identifier in the configuration file template, and generate an update deployment file corresponding to the application to be updated;
[0118] The update deployment resource generation submodule is used to perform resource configuration according to the update deployment file and generate update deployment resources corresponding to the application to be updated.
[0119] In an optional embodiment, the device further comprises:
[0120] A resource annotation identifier generation module, used to generate a resource annotation identifier corresponding to the application deployment data when receiving an application creation deployment request containing the application deployment data;
[0121] The creation deployment module is used to generate creation deployment resources of the application to be created according to the resource annotation identifier, and create the application to be created according to the creation deployment resources.
[0122] In an optional embodiment, the device further comprises:
[0123] An identification storage module, used to store the resource annotation identification and the application deployment data in a preset identification database after generating the resource annotation identification corresponding to the application deployment data;
[0124] The identifier replacement module is used to use the updated resource annotation identifier to overwrite the resource annotation identifier in the identifier database when generating the updated resource annotation identifier of the application deployment data.
[0125] In an optional embodiment, the device further comprises:
[0126] The identification reading module is used to read the resource annotation identification corresponding to the application deployment data from a preset identification database when it is determined that the parsing result does not contain the resource annotation identification update instruction;
[0127] A second update deployment resource generation module, used to generate update deployment resources corresponding to the application to be updated according to the resource annotation identifier;
[0128] The second update deployment module is used to update the deployment resources of the application to be updated when the update deployment resources are inconsistent with the historical deployment resources.
[0129] The application deployment device provided in the embodiment of the present application can be used to execute the technical solution of the application deployment method in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0130] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the request receiving module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the above request receiving module. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0131] Figure 8 This is a schematic diagram of the structure of the server provided in the embodiment of the present application. Figure 8 As shown, the server may include: a transceiver 801 , a processor 802 , and a memory 803 .
[0132] The processor 802 executes the computer-executable instructions stored in the memory, so that the processor 802 executes the solution in the above embodiment. The processor 802 can be a general-purpose processor, including a central processing unit CPU, a network processor (network processor, NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0133] The memory 803 is connected to the processor 802 via a system bus and implements communication therebetween. The memory 803 is used to store computer program instructions.
[0134] The transceiver 801 may be used to obtain tasks to be executed and configuration information of the tasks to be executed.
[0135] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory.
[0136] The server provided in the embodiment of the present application may be the terminal device of the above embodiment.
[0137] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solution of the application deployment method in the above embodiment.
[0138] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution of the application deployment method of the above embodiment.
[0139] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, it can implement the technical solution of the application deployment method in the above embodiment.
[0140] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0141] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.
[0142] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0143] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0144] It should be understood that the above processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.
[0145] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0146] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0147] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0148] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.
[0149] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0150] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. An application deployment method, It is characterized in that The method comprises: Receiving an application update deployment request; the application update deployment request includes application deployment data; In the case where the application update deployment request also includes a resource annotation identifier update instruction, generating an updated resource annotation identifier; the resource annotation identifier is used to describe resource status information of resources included in the application deployment data; Generate an updated deployment resource of the application to be updated corresponding to the application deployment data according to the updated resource annotation identifier and the application deployment data; The application to be updated is updated and deployed according to the update deployment resource.
2. The method according to claim 1, It is characterized in that In the case where the application update deployment request also includes a resource annotation identifier update instruction, generating an updated resource annotation identifier includes: Parsing the application update deployment request to obtain a parsing result; the parsing result of the application update deployment request includes application deployment data corresponding to the application to be updated, or the parsing result includes the application deployment data of the application to be updated and a resource annotation identifier update instruction of the application deployment data; If it is identified that the parsing result contains the resource annotation identifier update instruction, a preset identifier generation component is called to generate an updated resource annotation identifier for the application deployment data.
3. The method according to claim 1, It is characterized in that Generating, according to the updated resource annotation identifier and the application deployment data, an update deployment resource of the application to be updated corresponding to the application deployment data, including: Obtaining a preset configuration file template, filling the application deployment data and the updated resource annotation identifier into the configuration file template, and generating an updated deployment file corresponding to the application to be updated; Resource configuration is performed according to the update deployment file to generate update deployment resources corresponding to the application to be updated.
4. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: Upon receiving an application creation deployment request including application deployment data, generating a resource annotation identifier corresponding to the application deployment data; Generate creation deployment resources of the application to be created according to the resource annotation identifier, and create the application to be created according to the creation deployment resources.
5. The method according to claim 4, It is characterized in that After generating the resource annotation identifier corresponding to the application deployment data, the method further includes: Storing the resource annotation identifier and the application deployment data in a preset identifier database; When generating the updated resource annotation identifier of the application deployment data, the updated resource annotation identifier is used to overwrite the resource annotation identifier in the identifier database.
6. The method according to claim 2, It is characterized in that The method further comprises: When it is determined that the parsing result does not include the resource annotation identifier update instruction, reading the resource annotation identifier corresponding to the application deployment data from a preset identifier database; Generate update deployment resources corresponding to the application to be updated of the application deployment data according to the resource annotation identifier; When the update deployment resource is inconsistent with the historical deployment resource, the update deployment resource of the corresponding application to be updated.
7. An application deployment device, It is characterized in that The device comprises: A request receiving module, used to receive an application update deployment request; the application update deployment request includes application deployment data; An updated resource annotation identifier generation module, used to generate an updated resource annotation identifier when the application update deployment request also includes a resource annotation identifier update instruction; the resource annotation identifier is used to describe the resource status information of the resource included in the application deployment data; A first update deployment resource generation module, configured to generate an update deployment resource for the application to be updated corresponding to the application deployment data according to the updated resource annotation identifier; The first update deployment module is used to update and deploy the application to be updated according to the update deployment resource.
8. A server, It is characterized in that include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
10. A computer program product, It is characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.
