Application deployment methods, devices, equipment, storage media and products
By acquiring and utilizing pre-configured dependency definition files and configuration strategies, the application dependency services are configured automatically, solving the problem of low deployment efficiency in existing technologies and achieving an efficient application deployment process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2026-03-13
AI Technical Summary
In existing technologies, the application deployment process relies on professional developers to configure and maintain basic services, resulting in low deployment efficiency and repetitive work required for each deployment.
By obtaining the pre-configured current dependency definition file, which contains standardized information about application dependency services, configuring dependency services according to the configuration strategy, obtaining the calling parameters, and finally deploying the application through integration code, manual configuration of dependency services is avoided.
It improves application deployment efficiency, reduces repetitive work, reduces reliance on technical personnel, and enhances the automation and efficiency of the deployment process.
Smart Images

Figure CN115495096B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software development technology, and in particular to an application deployment method, apparatus, device, storage medium, and product. Background Technology
[0002] From the completion of application source code development to application deployment, application deployment is required. The application deployment process often relies on some basic services, such as configuration center services.
[0003] Deploying these basic services requires relatively specialized developers to configure and maintain them, making it difficult for developers to independently complete the application deployment process. Furthermore, each application deployment may require developers to perform repetitive work configuring basic services, resulting in low deployment efficiency. The requirement for developers to be familiar with the configuration and maintenance processes of these basic services further impacts deployment efficiency. Summary of the Invention
[0004] This application provides an application deployment method, apparatus, device, storage medium, and product to solve the problem that in the prior art, developers need to be familiar with the configuration and maintenance processes of basic services, and each application deployment may require developers to perform repetitive work of configuring basic services, resulting in low efficiency in application deployment.
[0005] In a first aspect, this application provides an application deployment method, comprising: obtaining a pre-configured current dependency definition file after receiving an application deployment instruction; the current dependency definition file includes: standardized information related to the services that the current version of the application depends on;
[0006] Configure the dependent services according to the current dependency definition file and the corresponding configuration strategy, and obtain the calling parameters of the configured dependent services; the calling parameters are the parameters required to call the services;
[0007] After obtaining the integration code built through the application, the application is deployed according to the calling parameters and the integration code.
[0008] Secondly, this application provides an application deployment apparatus, comprising:
[0009] The acquisition module is used to acquire a pre-configured current dependency definition file after receiving an application deployment instruction; the current dependency definition file includes: standardized information related to the services that the current version of the application depends on.
[0010] The configuration module is used to configure the dependent services according to the current dependency definition file and the corresponding configuration strategy, and to obtain the calling parameters of the configured dependent services; the calling parameters are the parameters required to call the services.
[0011] The deployment module is used to obtain the integration code obtained through application building, and then deploy the application according to the calling parameters and the integration code.
[0012] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0013] The memory stores computer-executed instructions;
[0014] The processor executes computer execution instructions stored in the memory to implement the application deployment method described in any of the preceding aspects.
[0015] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the application deployment method described in any of the preceding aspects.
[0016] Fifthly, this application provides a computer program product, including computer execution instructions, which, when executed by a processor, implement the application deployment method described in any of the preceding aspects.
[0017] The application deployment method, apparatus, device, storage medium, and product provided in this application, upon receiving an application deployment instruction, obtain a pre-configured current dependency definition file. The current dependency definition file includes standardized information related to services depended on by the current version of the application. The dependent services are configured according to the current dependency definition file and the corresponding configuration strategy, and the calling parameters of the configured dependent services are obtained. These calling parameters are the parameters required to call the services. After obtaining the integration code obtained through application building, the application is deployed according to the calling parameters and the integration code. Only the current dependency definition file containing standardized information about the dependent services needs to be obtained to perform the steps of configuring dependent services, eliminating the need for manual configuration by technical personnel. This improves application deployment efficiency and avoids repetitive manual work, further enhancing application deployment efficiency. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] Figure 1 This is a schematic diagram illustrating an application scenario provided in the embodiments of this application;
[0020] Figure 2 This is a flowchart of the application deployment method provided in Embodiment 1 of this application;
[0021] Figure 3 A flowchart illustrating the method for configuring dependent services provided in this application embodiment;
[0022] Figure 4 This is a schematic diagram of the application deployment device provided in Embodiment 4 of this application;
[0023] Figure 5 This is a schematic diagram of the structure of the electronic device provided in Embodiment 5 of this application.
[0024] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0025] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0026] The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. In the following descriptions of embodiments, "a plurality of" means two or more, unless otherwise explicitly defined.
[0027] First, the prior art involved in this invention will be described and analyzed in detail.
[0028] Before deploying an application, it's necessary to build a deployment package or image, prepare the server and basic environment, and deploy the application's dependent services, such as databases and caches. Deploying these basic services requires relatively specialized developers to configure and maintain them. Therefore, developers often find it difficult to deploy applications independently, or they may need to learn how to configure and maintain the application's dependent services beforehand. Furthermore, deploying a new version of the application may require developers to perform repetitive configuration of these basic services again, resulting in low deployment efficiency.
[0029] The inventors discovered in their research that by standardizing the information related to the services that an application depends on, these services can be treated as metadata. This allows for configuration of the dependent services according to corresponding configuration strategies. Therefore, this application provides an application deployment method that involves obtaining a pre-configured current dependency definition file. This file includes standardized information about the services that the current version of the application depends on. The method then configures the dependent services according to the current dependency definition file and the corresponding configuration strategy, and obtains the calling parameters for the configured dependent services. These calling parameters are the parameters required to call the services. Finally, after obtaining the integration code obtained through application building, the application is deployed based on the calling parameters and the integration code.
[0030] Figure 1 This is a schematic diagram of an application scenario provided in the embodiments of this application, such as... Figure 1 As shown, the system includes a code repository 1 and an application deployment device 2. The application deployment device 2 can obtain dependency definition files from the code repository 1. The dependency definition files contain standardized information about the dependent services, enabling the application deployment device 2 to configure dependent services A, B, and C according to the current dependency definition files and the corresponding configuration strategies, and to obtain the calling parameters of the configured dependent services. After the application deployment device 2 has configured the dependent services, it can instantiate the application services and deploy the application according to the service calling parameters.
[0031] The collection, storage, use, processing, transmission, provision, and disclosure of financial data or user data involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0032] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0033] Example 1
[0034] Figure 2This is a flowchart of an application deployment method provided in Embodiment 1 of this application. This embodiment addresses the problem in existing technologies where developers need to be familiar with the configuration and maintenance processes of basic services, and each application deployment may require developers to perform repetitive work configuring basic services, leading to low application deployment efficiency. The method in this embodiment is applied to an application deployment device, which can be located in an electronic device. The electronic device can be a digital computer or cloud server of various forms, such as a laptop computer, desktop computer, workbench, personal digital assistant, server, blade server, mainframe computer, and other suitable computers.
[0035] like Figure 2 As shown, the specific steps of this method are as follows:
[0036] Step S101: After receiving the application deployment instruction, obtain the pre-configured current dependency definition file.
[0037] The current dependency definition file includes standardized information about the services that the current version of the application depends on. These services can be cloud services, cloud functions, or technical components that provide common functionalities, such as configuration management, parameter management, and log management. For example, services that the application depends on may include databases, caches, and message queues.
[0038] This application does not limit the way the application deployment command is triggered. For example, the application deployment command can be automatically triggered after the user submits the current dependency definition file and the source code corresponding to the current version of the application. Alternatively, an application deployment trigger button can be provided so that the application deployment command can be triggered by the user clicking the application deployment trigger button. The application deployment command can also be triggered in any other way.
[0039] It should be understood that the current dependency definition file includes information about the services that the current version of the application depends on, which is standardized. Therefore, the services that the application depends on can be configured as metadata.
[0040] In this embodiment of the application, the pre-configured current dependency definition file can be written directly by the developer based on the standard definition of the services that the application depends on, or it can be generated based on user input.
[0041] Step S102: Configure the dependent services according to the current dependency definition file and the corresponding configuration strategy, and obtain the calling parameters of the configured dependent services.
[0042] The call parameters are the parameters required to call the service. For example, the call parameters may include one or more of the following: the IP address, port, username, password, etc., corresponding to the service. If the dependent service is a message queue, the call parameters may also include the queue name.
[0043] In this embodiment of the application, after configuring the dependent services, the calling parameters of the dependent services can be obtained so as to deploy the application according to the calling parameters of the dependent services.
[0044] Step S103: After obtaining the integration code obtained through application building, deploy the application according to the calling parameters and the integration code.
[0045] In this embodiment, the integration code can be a deployment package or image code obtained by compiling the application source code through application building. After obtaining the calling parameters and integration code, the application can be deployed. For example, the application can be deployed using a deployment CD pipeline based on the calling parameters and integration code.
[0046] The application deployment method provided in this application, upon receiving an application deployment instruction, obtains a pre-configured current dependency definition file. This file includes standardized information about the services the current version of the application depends on. The method then configures the dependent services according to the current dependency definition file and the corresponding configuration strategy, and obtains the calling parameters for the configured dependent services. These calling parameters are the parameters required to call the services. After obtaining the integration code obtained through application building, the application is deployed based on the calling parameters and the integration code. This method only requires obtaining the current dependency definition file containing standardized information about the dependent services to perform the steps of configuring dependent services, eliminating the need for manual configuration by technical personnel. This improves application deployment efficiency and avoids repetitive manual work, further enhancing deployment efficiency.
[0047] Example 2
[0048] Based on the above embodiment one, before obtaining the pre-configured dependency definition file in step S101, it is necessary to standardize the user input to generate the dependency definition file. The standardized information in the dependency definition file includes: standardized service identifiers and standardized requirement parameter values. The method for standardizing user input to generate the dependency definition file specifically includes:
[0049] Step S201: Obtain the service identifier and corresponding requirement parameter value of the dependent service input by the user.
[0050] In this embodiment, the service identifier and corresponding requirement parameter values input by the user can be Chinese, English, code, etc., and this embodiment does not impose specific limitations on them. After obtaining the service identifier and corresponding requirement parameter values of the dependent services input by the user, the service identifier and corresponding requirement parameter values are standardized to determine the dependent services and configure the dependent services according to the standardized requirement parameter values.
[0051] In this embodiment, the method by which the user inputs the service identifier and the corresponding requirement parameter value is not limited. For example, a dependent service input box and a requirement parameter input box can be provided to obtain the service identifier of the dependent service and the corresponding requirement parameter value input by the user; alternatively, a graphical interface can be provided to obtain the service identifier of the dependent service and the corresponding requirement parameter value input by the user.
[0052] Optionally, a method for obtaining the identifier of a dependent service input by the user includes: obtaining the service identifier of the application dependent service determined by the user in the application orchestration interface through drag-and-drop operations.
[0053] Specifically, the application orchestration interface can provide multiple services with corresponding configuration policies. Users can drag and drop the services that the application depends on from the multiple services provided to the specified area of the application orchestration interface to determine the services that the application depends on. This allows the application deployment device to determine the service identifier of the services that the application depends on through the services in the specified area.
[0054] The method provided in this application embodiment obtains the service identifier of the application-dependent service determined by the user in the application orchestration interface through drag-and-drop operation. This allows the application deployment device to obtain the service identifier of the application-dependent service through a simple drag-and-drop operation, which can reduce the difficulty of configuring and maintaining the application-dependent service and reduce the requirements for technical personnel.
[0055] Step S202: Standardize the service identifier and the corresponding requirement parameter values.
[0056] In this embodiment of the application, after standardizing the service identifier and the corresponding requirement parameter value, a service identifier and requirement parameter value in a unified format can be obtained.
[0057] This application does not limit the method of standardizing service identifiers and corresponding requirement parameter values. For example, natural language processing technology can be used to standardize service identifiers and corresponding requirement parameter values. Alternatively, a lookup table of standardized and non-standardized service identifiers and requirement parameter values can be used to determine the standardized service identifier and standardized requirement parameter value corresponding to the user-input service identifier and requirement parameter value. Any other method can also be used to standardize service identifiers and corresponding requirement parameter values.
[0058] Step S203: Write the standardized service identifier and the corresponding requirement parameter value into the current dependency definition file, and store the current dependency definition file and application version information in the code repository.
[0059] In this embodiment, the application version information corresponding to the current dependency definition file can be automatically generated or entered by the user. The application version information can also be managed by a version control tool. This embodiment does not limit the method of determining the application version information, and can be set according to the actual situation.
[0060] It should be understood that application version information can also be replaced with dependency definition files and the number of application version iterations.
[0061] Based on the above steps, step S101 obtains the pre-configured current dependency definition file by retrieving the current dependency definition file corresponding to the current version of the application from the code repository.
[0062] In this embodiment of the application, the code repository stores dependency definition files corresponding to multiple application versions.
[0063] Specifically, the current dependency definition file that is associated with the current application version information can be obtained from the code repository based on the current application version information.
[0064] The method provided in this application embodiment obtains the service identifiers and corresponding requirement parameter values of the dependent services input by the user; standardizes the service identifiers and corresponding requirement parameter values; writes the standardized service identifiers and corresponding requirement parameter values into the current dependency definition file; and stores the current dependency definition file in the code repository in association with the application version information. The dependency definition file can be automatically generated through the standardization of user input. Users do not need to learn the standard definitions of the service identifiers and corresponding requirement parameter values of each dependent service, and users do not need to manually write dependency definition files, which can improve the efficiency of application deployment.
[0065] Example 3
[0066] Based on any of the above embodiments, this embodiment involves a refinement of an implementation of step S102, which configures dependent services according to the current dependency definition file and the corresponding configuration strategy, and obtains the calling parameters of the configured dependent services. Specifically, it includes the following steps:
[0067] Step S301: Obtain the standardized service identifier in the current dependency definition file.
[0068] In this embodiment of the application, the current dependency definition file includes standardized service identifiers of the services that the current version of the application depends on, and the services that need to be configured can be determined based on the standardized service identifiers.
[0069] Optionally, one way to obtain standardized service identifiers in the current dependency definition file is to: obtain a list of service identifiers from the current dependency definition file; sequentially obtain standardized service identifiers other than those in the configuration center from the list of service identifiers, and then sequentially execute the steps for configuring dependent services.
[0070] In this embodiment, the configuration center is used to store the calling parameters of other dependent services. There is no need to configure the configuration center using steps S302 to S306.
[0071] Figure 3 A flowchart of the method for configuring dependent services provided in the embodiments of this application is shown below. Figure 3 As shown, the process includes: Step 1: Obtain the service identifier list. Step 2: Sequentially obtain the service identifiers in the service identifier list. Step 3: Determine if the service identifier corresponds to the configuration center. If yes, proceed to Step 2 to obtain the next service identifier; otherwise, proceed to Step 4 to configure the service corresponding to the service identifier. Step 4: Determine if the service corresponding to the service identifier needs to be enabled or updated. If yes, proceed to Step 5 to enable or update the service; otherwise, proceed to Step 2 to obtain the next service identifier. Step 5: Enable or update the service corresponding to the service identifier. Steps 2 to 5 are executed repeatedly until all service identifiers in the service identifier list are traversed, thus achieving asynchronous enabling or updating of services in the service identifier list.
[0072] The method provided in this application embodiment obtains a list of service identifiers from the current dependency definition file; and sequentially obtains standardized service identifiers other than those in the configuration center from the list of service identifiers, so as to sequentially execute the steps of configuring dependent services. This can realize the sequential configuration of services corresponding to service identifiers in the current dependency definition file, and can avoid omissions in the configuration of dependent services.
[0073] Step S302: Obtain the dependency definition file of the previous version in the code repository.
[0074] Specifically, the application version information of the previous version can be determined based on the current application version information, and the dependency definition file of the previous version can be obtained from the code repository based on the application version information of the previous version.
[0075] Step S303: If the standardized service identifier does not exist in the dependency definition file of the previous version, then determine the service enabling strategy corresponding to the standardized service identifier.
[0076] The service activation strategy includes the methods and steps for activating the corresponding service. Activating the service can be achieved by following the corresponding service activation strategy.
[0077] In this embodiment of the application, if the standardized service identifier does not exist in the dependency definition file of the previous version, it is determined that the service corresponding to the standardized service identifier is a new dependency service added to the current version of the application. The service has not yet been enabled and needs to be enabled according to the service enabling policy corresponding to the service identifier.
[0078] In this embodiment of the application, the service identifier and the corresponding service activation policy can be pre-associated and stored in a certain storage space, and the corresponding service activation policy can be determined from the storage space based on the service identifier.
[0079] Step S304: Activate the service according to the corresponding service activation policy and obtain the call parameters of the activated service.
[0080] In this embodiment of the application, after the service is activated according to the corresponding service activation policy, the call parameters of the activated service can be obtained.
[0081] The method provided in this application embodiment obtains a standardized service identifier from the current dependency definition file; obtains the dependency definition file of the previous version in the code repository; if the standardized service identifier does not exist in the dependency definition file of the previous version, determines the service activation policy corresponding to the standardized service identifier; activates the service according to the corresponding service activation policy and obtains the calling parameters of the activated service; if the standardized service identifier exists in the dependency definition file of the previous version, determines whether to update the calling parameters of the service based on the corresponding standardized parameter values. This method can determine whether the service corresponding to the service identifier needs to be activated, avoiding duplicate activation of services, thereby improving the efficiency of service configuration and further improving the efficiency of application deployment.
[0082] Optionally, if the dependent service includes a configuration center, which is used to store call parameters, then after obtaining the call parameters of the activated service in step S304, the method further includes: storing the call parameters using the configuration center.
[0083] Specifically, after obtaining the call parameters for the activated service, the call parameters are sent to the configuration center, where they are stored. The call parameters may also include the corresponding service identifier.
[0084] The method provided in this application embodiment uses a configuration center to store call parameters, which facilitates the management of dependent services, improves the efficiency of configuring dependent services, and further improves the efficiency of application deployment.
[0085] Step S305: If the standardized service identifier exists in the dependency definition file of the previous version, determine whether to update the service call parameters based on the corresponding standardized parameter value.
[0086] Specifically, if the standardized service identifier exists in the dependency definition file of the previous version, it is determined that the service corresponding to the standardized service identifier has been enabled. If the call parameters for updating the service are determined based on the corresponding standardized parameter values, the call parameters corresponding to the standardized service identifier are updated using the service update strategy.
[0087] Optionally, a method for determining whether to update the service call parameters based on the corresponding standardized parameter values is as follows: if the number of requirement parameters in the current dependency definition file that are inconsistent with the standardized parameter values corresponding to the standardized service identifier in the previous version of the dependency definition file is greater than a preset number threshold, or if the standardized parameter values of the pre-set important requirement parameters are inconsistent, then it is determined to update the service call parameters.
[0088] Among them, important requirement parameters are those whose pre-set parameter values have a significant impact on the service.
[0089] In this embodiment of the application, if the standardized parameter value of the important requirement parameter set in advance changes, or if the number of changed standardized parameter values is determined to be large according to the preset quantity threshold, the call parameters for updating the service are determined.
[0090] The method provided in this application determines to update the service call parameters if the number of required parameters whose standardized parameter values corresponding to the standardized service identifier are inconsistent between the current dependency definition file and the previous version of the dependency definition file exceeds a preset threshold, or if the standardized parameter values of pre-set important required parameters are inconsistent. This method can determine whether the service corresponding to the service identifier needs to be updated, avoiding invalid updates to services with minor changes to required parameters, thereby improving the efficiency of service configuration and further improving the efficiency of application deployment.
[0091] Step S306: Update the calling parameters corresponding to the standardized service identifier using a service update strategy.
[0092] The corresponding configuration strategy includes a service update strategy. This strategy outlines the methods and steps for updating the corresponding service; executing the strategy will update the service. For example, the service update strategy can update an already enabled service based on standardized requirement parameter values, or it can re-enable the service based on the same standardized requirement parameter values.
[0093] Optionally, if the dependent service includes a configuration center, the method for updating the call parameters is to use a service update strategy to update the call parameters corresponding to the standardized service identifier in the configuration center.
[0094] Specifically, after updating the service according to the service update policy, the updated call parameters of the service can be obtained, and the call parameters corresponding to the standardized service identifier in the configuration center can be updated to the obtained updated call parameters of the service.
[0095] Optionally, after obtaining the integration code through application building in step S103, the deployment of the application based on the calling parameters and the integration code specifically includes:
[0096] Step S1031: After obtaining the integration code obtained through application building, determine whether the configuration of services dependent on the current version of the application is complete.
[0097] Step S1032: If it is determined that the configuration of the services that the current version of the application depends on is completed, then deploy the application according to the current dependency definition file, calling parameters and integration code.
[0098] In this embodiment, step S103, obtaining the integration code acquired through application building, can be executed in parallel with step S102, which configures dependent services according to the current dependency definition file and corresponding configuration strategy, and obtains the calling parameters of the configured dependent services. After obtaining the integration code acquired through application building, it is determined whether the configuration of the services dependent on the current version of the application is complete. If complete, step S1032 is executed to deploy the application according to the current dependency definition file, calling parameters, and integration code. If not complete, it is determined at intervals whether the configuration of the services dependent on the current version of the application is complete, until the dependent services are configured and the application can be deployed.
[0099] An optional method for determining whether the configuration of services dependent on the current version of the application is complete is as follows: if the standardized service identifiers in the current dependency definition file are obtained by sequentially retrieving standardized service identifiers from the service identifier list other than those in the configuration center, and the steps for configuring dependent services are executed sequentially, then if there is no next standardized service identifier in the service identifier list, it is determined that the configuration of services dependent on the current version of the application is complete.
[0100] The method provided in this application embodiment, by determining whether the configuration of services dependent on the current version of the application is completed after obtaining the integration code obtained through application building, can ensure that the application is deployed only after the configuration of the services dependent on the application is completed, thus avoiding application deployment failure; and the step of obtaining the integration code obtained through application building can be executed in parallel with the configuration of dependent services, which can improve application deployment efficiency.
[0101] Example 4
[0102] Figure 4This is a schematic diagram of the application deployment apparatus provided in Embodiment 4 of this application. The application deployment apparatus provided in Embodiment 4 of this application can execute the processing flow provided in the application deployment method embodiments. Figure 4 As shown, the application deployment device 40 includes: an acquisition module 401, a configuration module 402, and a deployment module 403.
[0103] Specifically, module 401 is used to obtain a pre-configured current dependency definition file after receiving the application deployment instruction; the current dependency definition file includes standardized information related to the services that the current version of the application depends on.
[0104] Configuration module 402 is used to configure dependent services according to the current dependency definition file and the corresponding configuration strategy, and to obtain the calling parameters of the configured dependent services; the calling parameters are the parameters required to call the services.
[0105] Deployment module 403 is used to obtain the integration code obtained through application building, and then deploy the application based on the call parameters and the integration code.
[0106] The apparatus provided in this application embodiment can be specifically used to execute the method embodiment provided in Embodiment 1 above, and the specific functions will not be repeated here.
[0107] Optionally, the application deployment device 40 further includes: a generation module; the standardized related information includes: standardized service identifiers and standardized requirement parameter values; the generation module is used to: obtain the service identifiers and corresponding requirement parameter values of the dependent services input by the user; perform standardization processing on the service identifiers and corresponding requirement parameter values; write the standardized service identifiers and corresponding requirement parameter values into the current dependency definition file, and associate the current dependency definition file with the application version information and store it in the code repository; the acquisition module 401 is specifically used to: obtain the current dependency definition file corresponding to the current version of the application from the code repository.
[0108] Optionally, the generation module is specifically used to: obtain the service identifier of the service that the application depends on, which is determined by the user through drag-and-drop operations in the application orchestration interface.
[0109] Optionally, the corresponding configuration strategy includes a service activation strategy. The configuration module 402 is specifically used to: obtain the standardized service identifier in the current dependency definition file; obtain the dependency definition file of the previous version in the code repository; if the standardized service identifier does not exist in the dependency definition file of the previous version, determine the service activation strategy corresponding to the standardized service identifier; activate the service according to the corresponding service activation strategy, and obtain the calling parameters of the activated service; if the standardized service identifier exists in the dependency definition file of the previous version, determine whether to update the calling parameters of the service based on the corresponding standardized parameter value.
[0110] Optionally, the configuration module 402 is specifically used to: if the number of requirement parameters that are inconsistent with the standardized parameter values corresponding to the standardized service identifier in the current dependency definition file and the previous version of the dependency definition file is greater than a preset number threshold, or if the standardized parameter values of the pre-set important requirement parameters are inconsistent, then determine the call parameters of the updated service and update the call parameters corresponding to the standardized service identifier using the corresponding service update strategy.
[0111] Optionally, the dependent services include the configuration center; the current dependency definition file stores standardized service identifiers in the form of a list, and the configuration module 402 is specifically used to: obtain the service identifier list from the current dependency definition file; and sequentially obtain the standardized service identifiers other than the configuration center from the service identifier list, so as to execute the steps of configuring the dependent services in sequence.
[0112] Optionally, the configuration module 402 is specifically used to: store the call parameters in the configuration center; and update the call parameters corresponding to the standardized service identifier in the configuration center using a service update strategy.
[0113] Optionally, the deployment module 403 is specifically used to: determine whether the configuration of the services that the current version of the application depends on is completed after obtaining the integration code obtained through the application build; if it is determined that the configuration of the services that the current version of the application depends on is completed, then deploy the application according to the current dependency definition file, calling parameters and integration code.
[0114] The apparatus provided in this application embodiment can be specifically used to execute the above method embodiments, and its specific functions will not be described in detail here.
[0115] Example 5
[0116] Figure 5 This is a schematic diagram of the structure of the electronic device provided in Embodiment 5 of this application, as shown below. Figure 5 As shown, this application also provides an electronic device 50, including: a memory 501 and a processor 502.
[0117] The memory 501 stores computer-executed instructions and is communicatively connected to the processor 502. Specifically, the program may include program code, which includes computer-executed instructions. The memory 501 may include high-speed RAM and may also include non-volatile memory, such as at least one disk storage device.
[0118] Processor 502 is used to execute computer execution instructions stored in memory 501.
[0119] The computer execution instructions are stored in memory 501 and configured to be executed by processor 502 to implement the method provided in any embodiment of this application. Related descriptions can be understood by referring to the relevant descriptions and effects corresponding to the steps in the accompanying drawings, and will not be elaborated upon here.
[0120] In this embodiment, the memory 501 and the processor 502 are connected via a bus. 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 address bus, data bus, control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0121] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method provided in any embodiment of this application.
[0122] This application also provides a computer program product, including computer execution instructions, which, when executed by a processor, implement the method provided in any embodiment of this application.
[0123] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0124] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0125] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or in a combination of hardware and software functional modules.
[0126] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to the processor or controller of a general-purpose computer, special-purpose computer, or other programmable full-path fusion device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0127] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0128] Furthermore, although the operations are described in a specific order, this should be understood as requiring that such operations be performed in the specific order shown or in sequential order, or requiring that all illustrated operations be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this application. Certain features described in the context of individual embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.
[0129] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0130] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. An application deployment method characterized by comprising: The application comprises the following steps: obtaining a pre-configured current dependency definition file after receiving an application deployment instruction; the current dependency definition file comprises standardized related information of services dependent by the current version application; configuring the dependent services according to the current dependency definition file and a corresponding configuration strategy, and obtaining the calling parameters of the configured dependent services; the calling parameters are parameters required for calling the services; after obtaining integrated code obtained through application building, deploying the application according to the calling parameters and the integrated code; the standardized related information comprises standardized service identifiers and standardized demand parameter values; before obtaining the pre-configured current dependency definition file, the following steps are included: obtaining service identifiers and corresponding demand parameter values of the dependent services input by a user; standardizing the service identifiers and the corresponding demand parameter values; writing the standardized service identifiers and the corresponding demand parameter values into the current dependency definition file, and storing the current dependency definition file and application version information in a code repository; the pre-configured current dependency definition file comprises the following steps: obtaining the current dependency definition file corresponding to the current version application from the code repository.
2. The method of claim 1, wherein, the service identifiers of the dependent services input by the user comprise the following steps: obtaining service identifiers of the services dependent by the application determined by the user through a drag operation in an application arrangement interface.
3. The method of claim 1, wherein, the corresponding configuration strategy comprises a service opening strategy; the steps of configuring the dependent services according to the current dependency definition file and the corresponding configuration strategy, and obtaining the calling parameters of the configured dependent services comprise the following steps: obtaining the standardized service identifiers in the current dependency definition file; obtaining the dependency definition file of the previous version in the code repository; if the standardized service identifier does not exist in the dependency definition file of the previous version, determining the service opening strategy corresponding to the standardized service identifier; opening the service according to the corresponding service opening strategy, and obtaining the calling parameters of the opened service; if the standardized service identifier exists in the dependency definition file of the previous version, determining whether to update the calling parameters of the service according to the corresponding standardized parameter values.
4. The method of claim 3, wherein, the corresponding configuration strategy comprises a service update strategy; the steps of determining whether to update the calling parameters of the service according to the corresponding standardized parameter values comprise the following steps: if the number of demand parameters inconsistent with the standardized parameter values of the standardized service identifier corresponding to the current dependency definition file and the dependency definition file of the previous version is greater than a preset number threshold, or the standardized parameter values of the pre-set important demand parameters are inconsistent, it is determined that the calling parameters of the service are updated, and the calling parameters corresponding to the standardized service identifier are updated by using the corresponding service update strategy.
5. The method of claim 3, wherein, the dependent services comprise a configuration center; the current dependency definition file stores the standardized service identifiers in the form of a list; the steps of obtaining the standardized service identifiers in the current dependency definition file comprise the following steps: obtaining a service identifier list from the current dependency definition file; obtaining the standardized service identifiers other than the configuration center in the service identifier list in sequence, so as to sequentially execute the steps of configuring the dependent services.
6. The method of claim 5, wherein, after obtaining the calling parameters of the opened service, the following steps are included: The calling parameter is stored in a configuration center; The calling parameter corresponding to the standardized service identifier is updated by using a service update strategy, including: The calling parameter corresponding to the standardized service identifier in the configuration center is updated by using a service update strategy.
7. The method of claim 1, wherein, The deployment of the application is implemented according to the calling parameter and the integrated code, including: After the integrated code obtained by application construction is acquired, it is determined whether the configuration of the service relied on by the current version of the application is completed; If it is determined that the configuration of the service relied on by the current version of the application is completed, the deployment of the application is implemented according to the current dependency definition file, the calling parameter and the integrated code.
8. An application deployment apparatus characterized by comprising: Including: An acquisition module is configured to acquire a pre-configured current dependency definition file after receiving an application deployment instruction; The current dependency definition file includes standardized related information of the service relied on by the current version of the application for development; A configuration module is configured to configure the relied service according to the current dependency definition file and a corresponding configuration strategy, and acquire a calling parameter of the configured relied service; the calling parameter is a parameter required for calling the service; A deployment module is configured to, after acquiring an integrated code obtained by application construction, implement the deployment of the application according to the calling parameter and the integrated code; A generation module is configured to acquire a service identifier of the relied service and a corresponding requirement parameter value input by a user, perform standardized processing on the service identifier and the corresponding requirement parameter value, write the standardized service identifier and the corresponding requirement parameter value into a current dependency definition file, and store the current dependency definition file and application version information in a code repository in association. The acquisition module is specifically configured to acquire the current dependency definition file corresponding to the current version of the application from the code repository.
9. An electronic device, comprising: Including: A processor, and a memory connected with the processor in communication; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory to implement the method in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method in any one of claims 1-7.
11. A computer program product comprising computer-executable instructions, characterized in that, The computer execution instructions are executed by the processor to implement the method in any one of claims 1-7.
Citation Information
Patent Citations
Application program deployment method, device, computer equipment and storage medium
CN110609732A
Cloud service deployment test method and device, electronic equipment and storage medium
CN111782523A