Software deployment method and apparatus, electronic device, and storage medium

CN115033251BActive Publication Date: 2026-09-15INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210644632.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-08
Publication Date
2026-09-15
Estimated Expiration
2042-06-08

AI Technical Summary

Technical Problem

由此也导致了相关技术中存在着软件部署的实施成本高、实施效率低的问题

Benefits of technology

[0019] According to embodiments of this disclosure, when deploying software to a target environment, the target software to be deployed can be determined through target software deployment rules. If the deployment status of the target software meets preset conditions, a first target deployment instance is created. Then, the first target deployment instance can be configured using relevant information about the target software and the target environment. Finally, the configured second target deployment instance is used to deploy the target software in the target environment. Through these technical means, developers do not need to configure each deployment process individually for each software; a single configuration of the software deployment rules is sufficient to deploy the software artifact in any time period and any environment, thus automating software deployment. Therefore, this at least partially overcomes the technical problems of high implementation cost and low implementation efficiency in related technologies, effectively improving software deployment efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115033251B_ABST
    Figure CN115033251B_ABST
Patent Text Reader

Abstract

The present disclosure provides a software deployment method and device, electronic equipment and storage medium, which can be applied to the fields of computer technology, intelligent operation and maintenance, finance or other fields. The method comprises: in response to triggering a deployment task for a target environment, obtaining a target software deployment rule related to the target environment and a to-be-deployed software list; determining target software corresponding to the target software deployment rule from the to-be-deployed software list; creating a first target deployment instance based on the target software deployment rule in the case that a deployment state of the target software meets a preset condition; configuring the first target deployment instance based on a version number of the target software and an identifier of the target environment to obtain a second target deployment instance; and deploying the target software in the target environment based on the second target deployment instance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of computer technology, intelligent operation and maintenance, and finance, and more specifically, to a software deployment method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the rapid development of computer and internet technologies, software products are being updated and iterated at an increasingly faster pace, and enterprises generally need to deploy software products on a large scale and at high frequency.

[0003] Because the deployment processes for different software artifacts vary, each deployment of a software artifact employs a different process. Therefore, related technologies typically employ manual deployment methods to achieve software artifact deployment. This results in high implementation costs and low efficiency in software deployment within these technologies. Summary of the Invention

[0004] In view of the above, this disclosure provides a software deployment method, apparatus, electronic device, readable storage medium, and computer program product.

[0005] One aspect of this disclosure provides a software deployment method, comprising: in response to triggering a deployment task for a target environment, obtaining target software deployment rules and a list of software to be deployed related to the target environment; determining target software corresponding to the target software deployment rules from the list of software to be deployed; creating a first target deployment instance based on the target software deployment rules when the deployment status of the target software meets preset conditions; configuring the first target deployment instance based on the version number of the target software and the identifier of the target environment to obtain a second target deployment instance; and deploying the target software in the target environment based on the second target deployment instance.

[0006] According to embodiments of this disclosure, the acquisition of target software deployment rules and a list of software to be deployed related to the target environment includes: acquiring deployed software information at the current moment and delivered software information within a preset time period, wherein the preset time period represents the trigger interval of the deployment task; determining the list of software to be deployed based on the deployed software information and the delivered software information; consuming messages in a first message queue to acquire at least one software deployment rule whose status is enabled from the first message queue; and determining the target software deployment rule related to the target environment from at least one of the software deployment rules.

[0007] According to an embodiment of this disclosure, the method further includes: querying the deployment status of the target software using a software product management system to obtain query results; and, if the query results indicate that the deployment status of the target software meets the preset conditions, packaging the target software deployment rules into a message and pushing it to a second message queue.

[0008] According to an embodiment of this disclosure, the creation of a first target deployment instance based on the target software deployment rules when the deployment status of the target software meets the preset conditions includes: consuming messages in the second message queue to obtain the target software deployment rules from the second message queue; and creating the first target deployment instance based on the pipeline template configured in the target software deployment rules.

[0009] According to embodiments of this disclosure, the method further includes: packaging the first target deployment instance into a message and pushing it to a third message queue; wherein, configuring the first target deployment instance based on the version number of the target software and the identifier of the target environment to obtain a second target deployment instance includes: consuming messages in the third message queue to obtain the first target deployment instance from the third message queue; and adding the version number of the target software and the identifier of the target environment to a preset position of the first target deployment instance to obtain the second target deployment instance.

[0010] According to embodiments of this disclosure, the above-described deployment of the target software in the target environment based on the second target deployment instance includes: importing the target software into the target environment to obtain an import processing result; preprocessing the target software based on the target environment to obtain a preprocessing result; and, if both the import processing result and the preprocessing result indicate successful processing, executing the second target deployment instance in the target environment to deploy the preprocessed target software in the target environment.

[0011] According to embodiments of this disclosure, the method further includes: packaging the target software into a message and pushing it to a fourth message queue; wherein, importing the target software into the target environment to obtain an import processing result includes: consuming messages in the fourth message queue to obtain the target software; generating a data packet based on the target software; importing the data packet into the target environment through a preset medium, wherein the preset medium is related to the type of the target software; determining the import processing result based on the import result of the data packet; and packaging the import processing result into a message and pushing it to a fifth message queue.

[0012] According to embodiments of this disclosure, the method further includes: packaging the target software into a message and pushing it to a sixth message queue; wherein, the preprocessing of the target software based on the target environment to obtain a preprocessing result includes: consuming messages in the sixth message queue to obtain the target software; obtaining target variable values ​​from a configuration center based on the identifier of the target environment; assigning values ​​to executable scripts in the target software using the target variable values; determining the preprocessing result based on the result of the assignment; and packaging the preprocessing result into a message and pushing it to a fifth message queue.

[0013] According to embodiments of this disclosure, the method further includes: consuming messages in the fifth message queue to obtain the import processing result and the preprocessing result corresponding to the target software; and, if both the import processing result and the preprocessing result indicate successful processing, packaging the second target deployment instance into a message and pushing it to the seventh message queue; wherein, executing the second target deployment instance in the target environment to deploy the preprocessed target software in the target environment when both the import processing result and the preprocessing result indicate successful processing includes: consuming messages in the seventh message queue to obtain the second target deployment instance; determining the target software from the target environment based on the second target deployment instance; executing the second target deployment instance to deploy the preprocessed target software in the target environment; and packaging the deployment result of the target software into a message and pushing it to the eighth message queue.

[0014] According to embodiments of this disclosure, the method further includes: consuming messages in the eighth message queue to obtain the deployment result; recording information in the log indicating successful or failed deployment of the second target deployment instance in the log; and packaging the second target deployment instance into a message and pushing it to the seventh message queue to redeploy the preprocessed target software in the case where the deployment result indicates deployment aborted.

[0015] Another aspect of this disclosure provides a software deployment apparatus, comprising: an acquisition module, configured to acquire, in response to triggering a deployment task for a target environment, a target software deployment rule and a list of software to be deployed related to the target environment; a determination module, configured to determine, from the list of software to be deployed, a target software corresponding to the target software deployment rule; a creation module, configured to create a first target deployment instance based on the target software deployment rule when the deployment status of the target software meets preset conditions; a first processing module, configured to configure the first target deployment instance based on the version number of the target software and the identifier of the target environment to obtain a second target deployment instance; and a deployment module, configured to deploy the target software in the target environment based on the second target deployment instance.

[0016] Another aspect of this disclosure provides an electronic device, including: one or more processors; and a memory for storing one or more instructions, wherein when the one or more instructions are executed by the one or more processors, the one or more processors cause the one or more processors to perform the method as described above.

[0017] Another aspect of this disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed, are used to implement the method described above.

[0018] Another aspect of this disclosure provides a computer program product including computer-executable instructions that, when executed, implement the method described above.

[0019] According to embodiments of this disclosure, when deploying software to a target environment, the target software to be deployed can be determined through target software deployment rules. If the deployment status of the target software meets preset conditions, a first target deployment instance is created. Then, the first target deployment instance can be configured using relevant information about the target software and the target environment. Finally, the configured second target deployment instance is used to deploy the target software in the target environment. Through these technical means, developers do not need to configure each deployment process individually for each software; a single configuration of the software deployment rules is sufficient to deploy the software artifact in any time period and any environment, thus automating software deployment. Therefore, this at least partially overcomes the technical problems of high implementation cost and low implementation efficiency in related technologies, effectively improving software deployment efficiency. Attached Figure Description

[0020] The above and other objects, features and advantages of this disclosure will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0021] Figure 1An exemplary system architecture for which software deployment methods and apparatus can be applied according to embodiments of this disclosure is illustrated.

[0022] Figure 2 A flowchart illustrating a software deployment method according to an embodiment of the present disclosure is shown schematically.

[0023] Figure 3A A schematic diagram of a distributed task framework for implementing a software deployment method according to an embodiment of the present disclosure is shown.

[0024] Figure 3B The illustration shows a flowchart of a software deployment method implemented using a distributed task framework according to an embodiment of the present disclosure.

[0025] Figure 4 A block diagram of a software deployment apparatus according to an embodiment of the present disclosure is shown schematically.

[0026] Figure 5 A block diagram of an electronic device suitable for implementing a software deployment method according to an embodiment of the present disclosure is shown schematically. Detailed Implementation

[0027] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0028] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0029] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0030] When using expressions such as "at least one of A, B, and C," the expression should generally be interpreted in accordance with the meaning commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, systems having A alone, having B alone, having C alone, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.). Similarly, when using expressions such as "at least one of A, B, or C," the expression should generally be interpreted in accordance with the meaning commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, or C" should include, but is not limited to, systems having A alone, having B alone, having C alone, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).

[0031] With the rapid development of computer and internet technologies, the pace of software artifact updates and iterations is accelerating, and these updates often involve deployment. Enterprises commonly employ continuous delivery pipelines to achieve large-scale, high-frequency software artifact deployments.

[0032] However, because software artifact deployment involves processes such as artifact selection, target environment selection, deployment strategy, and scheduling orchestration, the deployment processes for different software artifacts vary. In related technologies, enterprises often employ different deployment processes for each software artifact per deployment. For example, if software artifact A updated its database in the first version iteration but not in the second, then the second version deployment process for software artifact A does not require a database update compared to the first. Therefore, in related technologies, enterprises typically use manual deployment to achieve software artifact deployment. This leads to high implementation costs and low efficiency in related technologies.

[0033] In view of the above, embodiments of this disclosure provide a software deployment method, apparatus, electronic device, readable storage medium, and computer program product. The method includes: in response to triggering a deployment task for a target environment, obtaining target software deployment rules and a list of software to be deployed related to the target environment; determining target software corresponding to the target software deployment rules from the list of software to be deployed; creating a first target deployment instance based on the target software deployment rules if the deployment status of the target software meets preset conditions; configuring the first target deployment instance based on the version information of the target software and the identifier of the target environment to obtain a second target deployment instance; and deploying the target software in the target environment based on the second target deployment instance.

[0034] It should be noted that the software deployment method and apparatus determined in the embodiments of this disclosure can be used in the fields of computer technology, intelligent operation and maintenance, or finance, and can also be used in any field other than computer technology, intelligent operation and maintenance, and finance. The application fields of the software deployment method and apparatus determined in the embodiments of this disclosure are not limited.

[0035] Figure 1 This illustration schematically depicts an exemplary system architecture to which software deployment methods and apparatus can be applied according to embodiments of this disclosure. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.

[0036] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a distributed system 110, a network 120, and a terminal device 130.

[0037] The distributed system 110 may include distributed nodes registered by servers 111, 112, and 113. Servers 111, 112, and 113 can be used to provide computing and storage resources to implement the functions of microservice modules.

[0038] Network 120 is a medium used to provide a communication link between servers 111, 112, 113 and terminal device 130. Network 120 may include various connection types, such as wired and / or wireless communication links.

[0039] Terminal device 130 can be various electronic devices with a display screen, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0040] It should be noted that the software deployment method provided in this embodiment can generally be executed by any one of the distributed nodes in the distributed system 110. Accordingly, the software deployment apparatus provided in this embodiment can generally be located in any one of the distributed nodes in the distributed system 110.

[0041] It should be understood that Figure 1 The number of distributed systems, terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of distributed systems, terminal devices, networks, and servers can be included.

[0042] Figure 2 A flowchart illustrating a software deployment method according to an embodiment of the present disclosure is shown schematically.

[0043] like Figure 2As shown, the method includes operations S201 to S205.

[0044] In operation S201, in response to triggering a deployment task for the target environment, the target software deployment rules and the list of software to be deployed related to the target environment are obtained.

[0045] In operation S202, the target software corresponding to the target software deployment rule is determined from the list of software to be deployed.

[0046] In operation S203, if the deployment status of the target software meets the preset conditions, a first target deployment instance is created based on the target software deployment rules.

[0047] In operation S204, the first target deployment instance is configured based on the version information of the target software and the identifier of the target environment, and the second target deployment instance is obtained.

[0048] In operation S205, the target software is deployed in the target environment based on the second target deployment instance.

[0049] According to embodiments of this disclosure, the target environment can refer to any one of a production environment, simulation environment, testing environment, etc. Each environment can be configured with corresponding deployment tasks.

[0050] According to embodiments of this disclosure, the deployment task can be a scheduled task configured by the developer, which can periodically complete the program functions preset by the developer. For example, the deployment task can be executed during idle time each day, such as at 12 o'clock at night, to deploy the software artifacts delivered that day in the corresponding environment.

[0051] According to embodiments of this disclosure, software deployment rules can be the rules for the specific execution of an application-level deployment pipeline template, and may include the environment, executable nodes in the pipeline, etc. An application-level deployment pipeline can refer to a software deployment process represented in a pipeline format. Software deployment rules can be configured by developers according to specific application scenarios, and are not limited thereto.

[0052] According to embodiments of this disclosure, a target software deployment rule may refer to a software deployment rule whose environment is the target environment.

[0053] According to embodiments of this disclosure, the list of software to be deployed may include information on multiple software artifacts. The software deployment request can be determined based on the installation baseline defined in the environment rules of the target environment and the installation baseline defined for each software to be deployed. For example, if the installation baseline for software A to be deployed is a full installation, and the installation baseline defined in the target environment is a normal version, then if the software artifacts to be released include multiple versions of software A to be deployed, the software artifact with the largest version number can be selected and added to the software deployment request. As another example, if the installation baseline for software B to be deployed is an incremental installation, and the installation baseline defined in the target environment is a delayed / early version, then the version numbers need to be arranged in ascending order, and the software with the largest version number should be selected sequentially as the target software deployment rule.

[0054] According to embodiments of this disclosure, the preset condition may refer to the target software as a software artifact that has been delivered but not directly released.

[0055] According to embodiments of this disclosure, a first target deployment instance can be created based on an application-level deployment pipeline template in a target software deployment rule. For example, a copy obtained by replicating the application-level deployment pipeline template in the target software deployment rule is the first target deployment instance.

[0056] According to embodiments of this disclosure, each parameter associated with the software artifact and each parameter associated with the environment in the first target deployment instance can be an initial value. For example, the initial value can be the name of the parameter, it can be empty, or it can be any preset value.

[0057] According to embodiments of this disclosure, configuring a first target deployment instance can be a process of replacing the values ​​of various parameters in the first target deployment instance using relevant information about the target software and the target environment. For example, the initial value of a parameter related to the database path in the first target deployment instance can be databasePath. When replacing the value of this parameter, the actual path of the database in the target environment can be used to replace the value of this parameter.

[0058] According to embodiments of this disclosure, when deploying software to a target environment, the target software to be deployed can be determined through target software deployment rules. If the deployment status of the target software meets preset conditions, a first target deployment instance is created. Then, the first target deployment instance can be configured using relevant information about the target software and the target environment. Finally, the configured second target deployment instance is used to deploy the target software in the target environment. Through these technical means, developers do not need to configure each deployment process individually for each software; a single configuration of the software deployment rules is sufficient to deploy the software artifact in any time period and any environment, thus automating software deployment. Therefore, this at least partially overcomes the technical problems of high implementation cost and low implementation efficiency in related technologies, effectively improving software deployment efficiency.

[0059] The following is for reference. Figure 3A and Figure 3B In conjunction with specific embodiments, Figure 2 The method shown will be further explained.

[0060] According to embodiments of this disclosure, such as Figure 2 The software deployment method shown can be implemented using a distributed task framework.

[0061] Figure 3A A schematic diagram of a distributed task framework for implementing a software deployment method according to an embodiment of the present disclosure is shown.

[0062] like Figure 3A As shown, the distributed task framework can manage multiple nodes, each of which can be a single server or a server cluster consisting of multiple servers. Each node can be implemented as a microservice module. The microservice modules used to implement the software deployment method may include a scheduled execution module 310, an instance creation module 320, a parameter assignment module 330, a deployment preparation module 340, a deployment startup module 350, and a status query module 360. Each node in the distributed task framework can implement any one of these six types of microservice modules. The number of each type of microservice module in the distributed task framework is not limited.

[0063] According to embodiments of this disclosure, the timed execution module 310 can be the initiator of a software deployment task. The timed execution module 310 can synchronize information on indirect software artifacts delivered between the current time and the previous delivery date, and compare it with information on deployed software artifacts to determine the set of artifacts to be deployed, i.e., the list of software to be deployed.

[0064] According to embodiments of this disclosure, the instance creation module 320 can create a first target deployment instance based on an application-level deployment pipeline template corresponding to the target software deployment rules.

[0065] According to an embodiment of this disclosure, the parameter assignment module 330 can assign environmental information of the target environment, such as the environment name identifier and the calling method of the environment-related software, and software information of the target software, such as the software version number and the configuration parameters in the software, to the corresponding parameters in the first target deployment instance in a certain order, thereby obtaining the second target deployment instance.

[0066] According to embodiments of this disclosure, the deployment preparation module 340 can perform import and preprocessing operations. The deployment preparation module 340 can import the same target software only once, and perform preprocessing operations on the executable scripts in the target software.

[0067] According to embodiments of this disclosure, the deployment module 350 can start the execution of the second target deployment instance after completing the pre-deployment preparations; or, after the instance execution is suspended, restart the execution of the second target deployment instance.

[0068] According to embodiments of this disclosure, the status query module 360 ​​can query the instance preparation status after import and preprocessing operations. The status query module 360 ​​can also query the execution status of the second target deployment instance after the instance is executed.

[0069] Figure 3B The illustration shows a flowchart of a software deployment method implemented using a distributed task framework according to an embodiment of the present disclosure.

[0070] like Figure 3B As shown, software deployment methods can be as follows: Figure 3A The various microservice modules shown are implemented through the first message queue 301, the second message queue 302, the third message queue 303, the fourth message queue 304, the fifth message queue 305, the sixth message queue 306, the seventh message queue 307, and the eighth message queue 308.

[0071] According to embodiments of this disclosure, the message queue can be implemented by any message middleware, including but not limited to Kafka, MQ, etc.

[0072] According to the embodiments of this disclosure, before responding to the deployment task, any timed execution module 310 can start all software deployment rules that are enabled for automatic deployment and store the software deployment rules in a message queue with message type as the set of pipeline messages to be deployed, i.e., the first message queue 301.

[0073] According to an embodiment of this disclosure, after triggering a deployment task for a target environment, the timed execution module 310 can obtain the deployed software information at the current time and the delivered software information within a preset time period, and determine the list of software to be deployed based on the deployed software information and the delivered software information.

[0074] According to embodiments of this disclosure, the preset time period may refer to the trigger interval of the deployment task.

[0075] According to embodiments of this disclosure, delivered software information may include information on software artifacts that have been delivered but not yet released. Deployed software information may include information on software artifacts that have been delivered and reissued. When a single software artifact has multiple unreleased versions, the version with the highest version number among the multiple unreleased versions can be selected and added to the list of software to be deployed.

[0076] According to embodiments of this disclosure, after completing its current task, any instance creation module 320 can consume messages in the first message queue 301 to obtain at least one software deployment rule whose status is indicated as enabled from the first message queue 301. Then, it determines the target software deployment rule related to the target environment from the at least one software deployment rule.

[0077] According to embodiments of this disclosure, the instance creation module 320 can determine the target software from the list of software to be deployed according to the application-environment dimension, that is, determine the software artifact to be deployed for a specified application in the target environment from the list of software to be deployed, i.e., the target software.

[0078] According to embodiments of this disclosure, the instance creation module 320 can also use the software product management system to query the deployment status of the target software and obtain query results.

[0079] According to embodiments of this disclosure, the deployment status may include delivered, published, not directly published, directly published, etc.

[0080] According to an embodiment of this disclosure, the instance creation module 320 can also package the target software deployment rules into a message and push it to the message queue with the message type of the pipeline instance creation message set, i.e., the second message queue 302, when the query result indicates that the deployment status of the target software meets the preset conditions.

[0081] According to embodiments of this disclosure, the preset conditions may refer to any one of the following: deployment status: delivered, unreleased, not directly released, etc.

[0082] According to embodiments of this disclosure, the instance creation module 320 can also terminate the execution of the current task and stop the automatic deployment of the target software if the query result indicates that the deployment status of the target software does not meet the preset conditions.

[0083] According to embodiments of this disclosure, any instance creation module 320 can consume messages in the second message queue 302 after completing the current task, obtain the target software deployment rules from the second message queue 302, and create a first target deployment instance based on the pipeline template configured in the target software deployment rules.

[0084] According to embodiments of this disclosure, the instance creation module 320 and the aforementioned instance creation module can be implemented by two nodes in a distributed task framework, respectively.

[0085] According to embodiments of this disclosure, the instance creation module 320 can also package the relevant information of the first target deployment instance and the target software into a message and push it to a message queue of the message type parameter assignment message set, namely the third message queue 303.

[0086] According to embodiments of this disclosure, any parameter assignment module 330 can, after completing the current task, consume messages in the third message queue 303 to obtain a first target deployment instance from the third message queue 303. The version information of the target software and the identifier of the target environment are then added to a preset position in the first target deployment instance to obtain a second target deployment instance.

[0087] According to embodiments of this disclosure, the preset position may refer to the position in the first target deployment instance where values ​​are assigned to various parameters.

[0088] According to embodiments of this disclosure, a second target deployment instance can refer to a deployment instance that has implemented a specific configuration for the target software and the target environment. By assigning values ​​to the deployment instance, a single software deployment rule can be applied to the deployment of different software artifacts in different environments, thereby effectively reducing the cost of software deployment.

[0089] According to embodiments of this disclosure, the parameter assignment module 330 can package the target software into messages and push them to message queues with message type of batch import message set and message queues with message type of preprocessed message set, namely the fourth message queue 304 and the sixth message queue 306.

[0090] According to embodiments of this disclosure, deploying target software in a target environment based on a second target deployment instance may include the following operations:

[0091] The target software is imported into the target environment, yielding the import processing result. Based on the target environment, the target software is preprocessed, yielding the preprocessing result. Finally, assuming both the import processing result and the preprocessing result indicate successful processing, a second target deployment instance is executed in the target environment to deploy the preprocessed target software there.

[0092] According to embodiments of this disclosure, importing the target software into the target environment facilitates the direct invocation of the target software within the target environment during deployment.

[0093] According to embodiments of this disclosure, preprocessing the target software may involve processing each executable script of the target software so that each executable script can normally access various functional components in the target environment, such as databases, thereby enabling the target software to run normally after deployment.

[0094] According to embodiments of this disclosure, any deployment preparation module 340 can consume messages in the fourth message queue 304 to obtain the target software; based on the target software, generate a data packet, and import the data packet into the target environment through a preset medium.

[0095] According to embodiments of this disclosure, the preset medium may be related to the type of data packet. For example, if the data packet is an image file, the preset medium may be the corresponding PaaS (Platform as a Service) console; if the data packet is a build package, the preset medium may be the hardware storage of the node corresponding to the deployment preparation module 340.

[0096] According to an embodiment of this disclosure, the deployment preparation module 340 can also determine the import processing result based on the import result of the data packet, and package the import processing result into a message and push it to the message queue with the message type of the waiting result message set, namely the fifth message queue 305.

[0097] According to embodiments of this disclosure, the import process result may include success, failure, skip, etc. Skip indicates that the target software is already stored in the target environment, that is, the target software has been imported by other deployment preparation modules 340.

[0098] According to embodiments of this disclosure, after completing the import operation, the deployment preparation module 340 can also consume messages in the sixth message queue 306 to obtain the target software; and obtain the target variable value from the configuration center based on the identifier of the target environment; and then use the target variable value to assign values ​​to the executable script in the target software.

[0099] According to embodiments of this disclosure, a configuration center can refer to any server used to store configuration information, i.e., variable values ​​that support the software running in a specific environment.

[0100] According to embodiments of this disclosure, the preprocessing result may include success, failure, skip, etc. Skip can indicate that the various variables in the target software have completed the assignment of variable values, that is, the target software has completed the preprocessing operation by other deployment preparation modules 340.

[0101] According to embodiments of this disclosure, the deployment preparation module 340 can also determine the preprocessing result based on the result of the assignment process, and package the preprocessing result into a message and push it to the fifth message queue 305.

[0102] According to embodiments of this disclosure, any one of the status query modules 360 can consume messages in the fifth message queue 305 to obtain the import processing result and preprocessing result corresponding to the target software, respectively.

[0103] According to embodiments of this disclosure, the import processing result and the preprocessing result may be the processing result of the same software artifact.

[0104] According to embodiments of this disclosure, when both the import processing result and the preprocessing result indicate successful processing, the status query module 360 ​​can package the second target deployment instance into a message and push it to the message queue of the message type "Start Deployment Message Set," namely the seventh message queue 307. Successful processing can indicate either success or skipping as the status represented by the import processing result and the preprocessing result.

[0105] According to embodiments of this disclosure, if both the import processing result and the preprocessing result indicate processing failure, the status query module 360 ​​can terminate the execution of the current task to stop the automatic deployment of the target software.

[0106] According to embodiments of this disclosure, any one of the deployment modules 350 can consume messages in the seventh message queue 307 to obtain a second target deployment instance; based on the second target deployment instance, determine the target software from the target environment; and execute the second target deployment instance to deploy the preprocessed target software in the target environment.

[0107] According to an embodiment of this disclosure, the deployment module 350 can also package the deployment result of the target software into a message and push it to a message queue of message type waiting for deployment result message set, namely the eighth message queue 308.

[0108] According to embodiments of this disclosure, any one of the status query modules 360 can consume messages in the eighth message queue 308 to obtain deployment results.

[0109] According to embodiments of this disclosure, the status query module 360 ​​and the aforementioned status query module can be implemented by two nodes in a distributed task framework, respectively.

[0110] According to embodiments of this disclosure, deployment results may include success, failure, abort, execution, etc.

[0111] According to embodiments of this disclosure, if the deployment result indicates successful or unsuccessful deployment, the status query module 360 ​​can record information in the log indicating the completion of the deployment of the second target deployment instance and stop the automatic deployment of the target software.

[0112] According to embodiments of this disclosure, if the deployment result indicates a deployment failure, it can be determined that there are variable errors, program errors, etc. in the target software. At this time, the status query module 360 ​​can also send feedback on the deployment failure to the technicians through the distributed task framework so that the technicians can solve the problems in the software in a timely manner.

[0113] According to an embodiment of this disclosure, if the deployment result indicates that the deployment has been aborted, the status query module 360 ​​can package the second target deployment instance into a message and push it to the seventh message queue 307 to redeploy the preprocessed target software.

[0114] According to embodiments of this disclosure, when the deployment result representation is in progress, the status query module 360 ​​can repackage the acquired messages and return them to the eighth message queue 308. The status query module 360 ​​can then continue consuming messages in the eighth message queue 308 after a period of pause to query the deployment results of the target software.

[0115] According to embodiments of this disclosure, by utilizing a distributed task framework and message queue to implement software deployment, different microservice modules can be used to simulate the manual execution of various pipeline operations. Under the premise of implementing a load balancing strategy, each operation can be distributed to currently idle nodes for execution, thereby increasing deployment efficiency and reducing the possibility of a single server crashing due to high load.

[0116] Figure 4 A block diagram of a software deployment apparatus according to an embodiment of the present disclosure is shown schematically.

[0117] like Figure 4 As shown, the software deployment device includes an acquisition module 410, a determination module 420, a creation module 430, a first processing module 440, and a deployment module 450.

[0118] The acquisition module 410 is used to acquire the target software deployment rules and the list of software to be deployed related to the target environment in response to the triggering of a deployment task for the target environment.

[0119] The determination module 420 is used to determine the target software corresponding to the target software deployment rules from the list of software to be deployed.

[0120] Create module 430 to create a first target deployment instance based on the target software deployment rules, provided that the deployment status of the target software meets preset conditions.

[0121] The first processing module 440 is used to configure the first target deployment instance based on the version information of the target software and the identifier of the target environment, so as to obtain the second target deployment instance.

[0122] Deployment module 450 is used to deploy the target software in the target environment based on the second target deployment instance.

[0123] According to embodiments of this disclosure, when deploying software to a target environment, the target software to be deployed can be determined through target software deployment rules. If the deployment status of the target software meets preset conditions, a first target deployment instance is created. Then, the first target deployment instance can be configured using relevant information about the target software and the target environment. Finally, the configured second target deployment instance is used to deploy the target software in the target environment. Through these technical means, developers do not need to configure each deployment process individually for each software; a single configuration of the software deployment rules is sufficient to deploy the software artifact in any time period and any environment, thus automating software deployment. Therefore, this at least partially overcomes the technical problems of high implementation cost and low implementation efficiency in related technologies, effectively improving software deployment efficiency.

[0124] According to embodiments of this disclosure, the acquisition module 410 includes a first acquisition unit, a second acquisition unit, a third acquisition unit, and a fourth acquisition unit.

[0125] The first acquisition unit is used to acquire the deployed software information at the current moment and the delivered software information within a preset time period, wherein the preset time period represents the trigger interval of the deployment task.

[0126] The second acquisition unit is used to determine the list of software to be deployed based on deployed software information and delivered software information.

[0127] The third acquisition unit is used to consume messages in the first message queue to acquire at least one software deployment rule whose status is represented as enabled from the first message queue.

[0128] The fourth acquisition unit is used to determine the target software deployment rules related to the target environment from at least one software deployment rule.

[0129] According to embodiments of this disclosure, the software deployment apparatus further includes a second processing module and a third processing module.

[0130] The second processing module is used to query the deployment status of the target software using the software product management system and obtain the query results.

[0131] The third processing module is used to package the target software deployment rules into a message and push it to the second message queue when the query results indicate that the deployment status of the target software meets the preset conditions.

[0132] According to embodiments of this disclosure, the creation module 430 includes a first creation unit and a second creation unit.

[0133] The first creation unit is used to consume messages in the second message queue to obtain the deployment rules of the target software when the deployment status of the target software meets preset conditions.

[0134] The second creation unit is used to create the first target deployment instance based on the pipeline template configured in the target software deployment rules.

[0135] According to embodiments of this disclosure, the software deployment apparatus further includes a third processing module:

[0136] The third processing module is used to package the first target deployment instance into a message and push it to the third message queue.

[0137] According to embodiments of this disclosure, the first processing module 440 includes a first processing unit and a second processing unit.

[0138] The first processing unit is used to consume messages in the third message queue in order to obtain the first target deployment instance from the third message queue.

[0139] The second processing unit is used to add the version information of the target software and the identifier of the target environment to a preset position in the first target deployment instance to obtain the second target deployment instance.

[0140] According to embodiments of this disclosure, deployment module 450 includes a first deployment unit, a second deployment unit, and a third deployment unit.

[0141] The first deployment unit is used to import the target software into the target environment and obtain the import processing results.

[0142] The second deployment unit is used to preprocess the target software based on the target environment to obtain the preprocessing result.

[0143] The third deployment unit is used to execute a second target deployment instance in the target environment when both the import processing result and the preprocessing result indicate successful processing, so as to deploy the preprocessed target software in the target environment.

[0144] According to embodiments of this disclosure, deployment module 450 further includes a fourth deployment unit.

[0145] The fourth deployment unit is used to package the target software into a message and push it to the fourth message queue.

[0146] According to embodiments of this disclosure, the first deployment unit includes a first deployment subunit, a second deployment subunit, a third deployment subunit, a fourth deployment subunit, and a fifth deployment subunit.

[0147] The first deployment subunit is used to consume messages from the fourth message queue to obtain the target software.

[0148] The second deployment subunit is used to generate data packets based on the target software.

[0149] The third deployment subunit is used to import data packets into the target environment through a preset medium, wherein the preset medium is related to the type of data packet.

[0150] The fourth deployment subunit is used to determine the import processing result based on the import result of the data packet.

[0151] The fifth deployment subunit is used to package the import processing results into a message and push it to the fifth message queue.

[0152] According to embodiments of this disclosure, deployment module 450 further includes a fifth deployment unit.

[0153] The fifth deployment unit is used to package the target software into a message and push it to the sixth message queue.

[0154] According to embodiments of this disclosure, the second deployment unit includes a sixth deployment subunit, a seventh deployment subunit, an eighth deployment subunit, a ninth deployment subunit, and a tenth deployment subunit.

[0155] The sixth deployment subunit is used to consume messages in the sixth message queue to obtain the target software.

[0156] The seventh deployment subunit is used to obtain target variable values ​​from the configuration center based on the identifier of the target environment.

[0157] The eighth deployment subunit is used to assign values ​​to the executable script in the target software using the target variable values.

[0158] The ninth deployment subunit is used to determine the preprocessing result based on the result of the assignment process.

[0159] The tenth deployment subunit is used to package the preprocessing results into messages and push them to the fifth message queue.

[0160] According to embodiments of this disclosure, deployment module 450 further includes a sixth deployment unit and a seventh deployment unit.

[0161] The sixth deployment unit is used to consume messages in the fifth message queue to obtain the import processing results and preprocessing results corresponding to the target software, respectively.

[0162] The seventh deployment unit is used to package the second target deployment instance into a message and push it to the seventh message queue when both the import processing result and the preprocessing result indicate that the processing was successful.

[0163] According to embodiments of this disclosure, the third deployment unit includes an eleventh deployment subunit, a twelfth deployment subunit, a thirteenth deployment subunit, and a fourteenth deployment subunit.

[0164] The eleventh deployment subunit is used to consume messages from the seventh message queue to obtain the second target deployment instance.

[0165] The twelfth deployment subunit is used to determine the target software from the target environment based on the second target deployment instance.

[0166] The thirteenth deployment subunit is used to execute the second target deployment instance to deploy the preprocessed target software in the target environment.

[0167] The fourteenth deployment subunit is used to package the deployment results of the target software into a message and push it to the eighth message queue.

[0168] According to embodiments of this disclosure, the deployment module 450 further includes an eighth deployment unit, a ninth deployment unit, and a tenth deployment unit.

[0169] The eighth deployment unit is used to consume messages in the eighth message queue and obtain the deployment results.

[0170] The ninth deployment unit is used to record information in the log indicating the completion of the deployment of the second target deployment instance, whether the deployment result indicates successful or unsuccessful.

[0171] The tenth deployment unit is used to package the second target deployment instance into a message and push it to the seventh message queue when the deployment result indicates that the deployment has been aborted, so as to redeploy the preprocessed target software.

[0172] Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be implemented by dividing them into multiple modules. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as hardware circuitry, such as Field Programmable Gate Arrays (FPGAs), Programmable Logic Arrays (PLAs), Systems-on-Chip, Systems-on-Substrate, Systems-on-Package, Application-Specific Integrated Circuits (ASICs), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.

[0173] For example, any multiple of the acquisition module 410, determination module 420, creation module 430, first processing module 440, and deployment module 450 can be combined into one module / unit / subunit, or any one of these modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functionality of one or more of these modules / units / subunits can be combined with at least part of the functionality of other modules / units / subunits and implemented in one module / unit / subunit. According to embodiments of this disclosure, at least one of the acquisition module 410, determination module 420, creation module 430, first processing module 440, and deployment module 450 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the acquisition module 410, determination module 420, creation module 430, first processing module 440, and deployment module 450 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.

[0174] It should be noted that the software deployment device part in the embodiments of this disclosure corresponds to the software deployment method part in the embodiments of this disclosure. The description of the software deployment device part is specifically referred to in the software deployment method part, and will not be repeated here.

[0175] Figure 5 A block diagram of an electronic device suitable for implementing a software deployment method according to an embodiment of the present disclosure is shown schematically. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0176] like Figure 5 As shown, a computer electronic device 500 according to an embodiment of the present disclosure includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage portion 508 into a random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0177] RAM 503 stores various programs and data required for the operation of electronic device 500. Processor 501, ROM 502, and RAM 503 are interconnected via bus 504. Processor 501 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 502 and / or RAM 503. It should be noted that the programs may also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0178] According to embodiments of this disclosure, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to a bus 504. The electronic device 500 may also include one or more of the following components connected to the I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the storage section 508 as needed.

[0179] According to embodiments of this disclosure, the method flow according to embodiments of this disclosure can be implemented as a computer software program. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by processor 501, it performs the functions defined in the system of embodiments of this disclosure. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0180] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0181] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0182] For example, according to embodiments of this disclosure, a computer-readable storage medium may include the ROM 502 and / or RAM 503 described above and / or one or more memories other than ROM 502 and RAM 503.

[0183] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the software deployment methods provided in the embodiments of this disclosure.

[0184] When the computer program is executed by the processor 501, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0185] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 509, and / or installed from a removable medium 511. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0186] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0187] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features recited in the various embodiments and / or claims of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not expressly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure may be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0188] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A software deployment method, comprising: In response to triggering a deployment task for a target environment, the system obtains the target software deployment rules and a list of software to be deployed related to the target environment. Determine the target software corresponding to the target software deployment rule from the list of software to be deployed; When the deployment status of the target software meets the preset conditions, messages in the second message queue are consumed to obtain the target software deployment rules from the second message queue, and a first target deployment instance is created based on the pipeline template configured in the target software deployment rules. The preset conditions indicate that the software artifact has been delivered but not released. Consume messages in the third message queue to obtain the first target deployment instance from the third message queue, and add the version information of the target software and the identifier of the target environment to a preset position in the first target deployment instance to obtain the second target deployment instance; as well as The target software is imported into the target environment to obtain the import processing result; Based on the target environment, the target software is preprocessed to obtain the preprocessing result; If both the import processing result and the preprocessing result indicate successful processing, the message in the seventh message queue is consumed to obtain the second target deployment instance; Based on the second target deployment instance, the target software is determined from the target environment; The second target deployment instance is executed to deploy the preprocessed target software in the target environment; the deployment result of the target software is packaged into a message and pushed to the eighth message queue.

2. The method according to claim 1, wherein, The acquisition of the target software deployment rules and the list of software to be deployed related to the target environment includes: Obtain the deployed software information at the current moment and the delivered software information within a preset time period, wherein the preset time period represents the trigger interval of the deployment task; Based on the deployed software information and the delivered software information, the list of software to be deployed is determined; Consume messages in the first message queue to obtain at least one software deployment rule whose status is indicated as enabled from the first message queue; and The target software deployment rule related to the target environment is determined from at least one of the software deployment rules.

3. The method according to claim 1, further comprising: The deployment status of the target software is queried using the software product management system to obtain the query results; as well as If the query result indicates that the deployment status of the target software meets the preset conditions, the deployment rules of the target software are packaged into a message and pushed to the second message queue.

4. The method according to claim 1, further comprising: The first target deployment instance is packaged into a message and pushed to the third message queue.

5. The method according to claim 1, further comprising: The target software is packaged into a message and pushed to the fourth message queue; The step of importing the target software into the target environment and obtaining the import processing result includes: Consume messages from the fourth message queue to obtain the target software; Generate a data package based on the target software; The data packet is imported into the target environment through a preset medium, wherein the preset medium is related to the type of the data packet; Based on the import result of the data packet, determine the import processing result; and The import processing results are packaged into a message and pushed to the fifth message queue.

6. The method according to claim 1, further comprising: The target software is packaged into a message and pushed to the sixth message queue; The step of preprocessing the target software based on the target environment to obtain a preprocessing result includes: Consume messages from the sixth message queue to obtain the target software; Based on the identifier of the target environment, obtain the target variable value from the configuration center; The target variable value is used to assign values ​​to the executable script in the target software; Based on the result of the assignment process, the preprocessing result is determined; and The preprocessing results are packaged into a message and pushed to the fifth message queue.

7. The method according to claim 5 or 6, further comprising: Consume messages in the fifth message queue to obtain the import processing result and the preprocessing result corresponding to the target software, respectively; as well as If both the import processing result and the preprocessing result indicate successful processing, the second target deployment instance is packaged into a message and pushed to the seventh message queue.

8. The method according to claim 7, further comprising: Consume messages from the eighth message queue to obtain the deployment result; In the case where the deployment result indicates successful or unsuccessful deployment, information indicating the completion of the deployment of the second target deployment instance is recorded in the log; as well as If the deployment result indicates that the deployment has been aborted, the second target deployment instance is packaged into a message and pushed to the seventh message queue to redeploy the preprocessed target software.

9. A software deployment apparatus, comprising: The acquisition module is used to acquire the target software deployment rules and the list of software to be deployed related to the target environment in response to the triggering of a deployment task for the target environment; The determination module is used to determine the target software corresponding to the target software deployment rule from the list of software to be deployed; A creation module is used to consume messages in a second message queue when the deployment status of the target software meets preset conditions, to obtain the target software deployment rules from the second message queue, and to create a first target deployment instance based on the pipeline template configured in the target software deployment rules. The preset conditions indicate that the software artifact has been delivered but not yet released. The first processing module is used to consume messages in the third message queue to obtain the first target deployment instance from the third message queue, and add the version information of the target software and the identifier of the target environment to a preset position of the first target deployment instance to obtain the second target deployment instance. as well as The deployment module is used to import the target software into the target environment and obtain the import processing result; Based on the target environment, the target software is preprocessed to obtain the preprocessing result; If both the import processing result and the preprocessing result indicate successful processing, the message in the seventh message queue is consumed to obtain the second target deployment instance; Based on the second target deployment instance, the target software is determined from the target environment; The second target deployment instance is executed to deploy the preprocessed target software in the target environment; the deployment result of the target software is packaged into a message and pushed to the eighth message queue.

10. An electronic device, comprising: One or more processors; Memory, used to store one or more instructions. When the one or more instructions are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method of any one of claims 1 to 8.

11. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 8.

12. A computer program product comprising computer-executable instructions, which, when executed, are used to implement the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Software deployment method and device and related equipment

    CN113238766A