A software deployment method, device, storage medium and computer device
By acquiring and adapting the script files for software deployment tasks, the risks of errors caused by manually configuring multiple environments are resolved, achieving efficient automated software deployment.
Patent Information
- Application Number
- CN202211371945.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-03
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2042-11-03
AI Technical Summary
Enterprises often need to manually configure multiple environments during software deployment, leading to a high risk of configuration errors and reduced software deployment efficiency.
By obtaining the script file of the target deployment orchestration task, the order of subtasks is determined, and functional adaptation and update processing is performed based on the order to generate the adapted script file.
It improves the efficiency of software deployment, reduces human error, automates environment configuration and dependency relationships, and enhances the reusability and efficiency of software deployment.
Smart Images

Figure CN115629770B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a software deployment method, apparatus, storage medium, and computer device. Background Technology
[0002] With the development of information technology, microservice technology is becoming increasingly widespread. While enterprises enjoy the convenience of microservices, they also face problems brought about by this technology. For example, the following problems exist during the software deployment process: (1) Many enterprises have multiple environments, such as development environment, testing environment, user acceptance environment, and production environment. These environments require maintenance personnel to find the corresponding environment machines for deployment. (2) Enterprises have different configurations when using different environments, and most of these configurations rely on maintenance personnel for manual maintenance, which carries significant risks, such as providing configuration errors or environment configuration errors. These problems reduce the efficiency of software deployment. Summary of the Invention
[0003] This invention provides a software deployment method, apparatus, storage medium, and computer device, which can improve the efficiency of software deployment.
[0004] This invention provides a software deployment method, including:
[0005] Obtain the script file corresponding to the target deployment orchestration task, wherein the target deployment orchestration task includes script files corresponding to at least two subtasks that have been arranged;
[0006] Determine the order of the subtasks in the target deployment orchestration task;
[0007] Based on the arrangement order, the script files of the subtasks in the target deployment orchestration task are functionally adapted to obtain the adapted script files corresponding to the subtasks.
[0008] Based on the adapted script file corresponding to the subtask, the script file of the target orchestration and deployment task is updated to obtain the target script file.
[0009] This invention also provides a software deployment apparatus, comprising:
[0010] The acquisition unit is used to acquire the script file corresponding to the target deployment orchestration task, wherein the target deployment orchestration task includes script files corresponding to at least two subtasks that have been arranged.
[0011] A determining unit is used to determine the arrangement order of subtasks in the target deployment orchestration task;
[0012] The function adaptation unit is used to perform function adaptation processing on the script files of subtasks in the target deployment orchestration task based on the arrangement order, so as to obtain the adapted script files corresponding to the subtasks.
[0013] The update unit is used to update the script file of the target orchestration and deployment task based on the adapted script file corresponding to the subtask, so as to obtain the target script file.
[0014] In one embodiment, the functional adaptation unit may include:
[0015] The functional attribute determination subunit is used to determine the functional attributes corresponding to the subtask based on the script file of the subtask.
[0016] The method determination subunit is used to determine the function adaptation method corresponding to the subtask based on the functional attributes corresponding to the subtask.
[0017] The function adaptation processing subunit is used to perform function adaptation processing on the subtasks based on the arrangement order and the adaptation method corresponding to each subtask, so as to obtain the adapted script file corresponding to the subtask.
[0018] In one embodiment, the functional adaptation processing subunit may include:
[0019] The version determination module is used to determine the adaptation version corresponding to the script file of the current subtask based on the arrangement order and the adaptation method corresponding to the current subtask.
[0020] The first script parsing module is used to parse the script file corresponding to the target deployment orchestration task to obtain the environmental information corresponding to the target deployment orchestration task;
[0021] The first association processing module is used to associate the adapted version of the current subtask with the environmental information of the target deployment orchestration task to obtain the associated script file of the current subtask.
[0022] In one embodiment, the functional adaptation processing subunit may include:
[0023] The second script parsing module is used to parse the script file corresponding to the target deployment orchestration task based on the arrangement order and the adaptation method corresponding to the current subtask, so as to obtain the environmental information corresponding to the target deployment orchestration task.
[0024] The second association processing module is used to associate the script file corresponding to the current subtask with the environment information to obtain the adapted script file.
[0025] In one embodiment, the functional adaptation processing subunit may include:
[0026] The third script parsing module is used to parse the script file corresponding to the current subtask based on the arrangement order and the adaptation method corresponding to the current subtask, so as to obtain the deployment package address information;
[0027] The deployment package determination module is used to determine the deployment package required by the current subtask based on the deployment package address information;
[0028] The compilation module is used to compile the deployment package required by the current subtask to obtain the compiled deployment package;
[0029] The third association processing module is used to associate the compiled deployment package with the script file of the current subtask to obtain the adapted script file.
[0030] In one embodiment, the functional adaptation processing subunit may include:
[0031] The fourth script parsing module is used to parse the script file of the current subtask based on the arrangement order and the adaptation method corresponding to the current subtask, so as to obtain the target deployment environment group information and the target deployment server;
[0032] The acquisition module is used to acquire the target deployment environment group based on the target deployment environment group information;
[0033] The deployment module is used to deploy the target deployment environment group to the target deployment server to obtain the deployed server.
[0034] The fourth association processing module is used to associate the address information of the deployed server with the script file of the current subtask to obtain the adapted script file.
[0035] In one embodiment, the acquisition unit may include:
[0036] The acquisition subunit is used to acquire the script file corresponding to the target deployment orchestration task through the orchestration system, wherein the target deployment orchestration task includes script files corresponding to at least two arranged subtasks.
[0037] In one embodiment, the determining unit may include:
[0038] The sub-unit is determined by the orchestration system to determine the order of subtasks in the target deployment orchestration task.
[0039] In one embodiment, the functional adaptation unit may include:
[0040] The function adaptation subunit is used to perform function adaptation processing on the script files of subtasks in the target deployment orchestration task based on the arrangement order through the orchestration system, so as to obtain the adapted script files corresponding to the subtasks.
[0041] In one embodiment, the update unit may include:
[0042] The update subunit is used to update the script file of the target orchestration and deployment task based on the adapted script file corresponding to the subtask through the orchestration system, so as to obtain the target script file.
[0043] In some embodiments of the present invention, a computer device may also be provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described above.
[0044] In some embodiments of the present invention, a computer-readable storage medium may also be provided, on which a computer program is stored, which, when run on a computer, causes the computer to perform the steps of the method described above.
[0045] Using the embodiments of this application, script files corresponding to a target deployment orchestration task can be obtained. The target deployment orchestration task includes script files corresponding to at least two arranged subtasks. The arrangement order of the subtasks in the target deployment orchestration task is determined. Based on the arrangement order, the script files of the subtasks in the target deployment orchestration task are functionally adapted to obtain adapted script files corresponding to the subtasks. Based on the adapted script files corresponding to the subtasks, the script files of the target orchestration deployment task are updated to obtain the target script file, which can improve the efficiency of software deployment. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a flowchart illustrating the software deployment method provided in an embodiment of the present invention;
[0048] Figure 2 This is a schematic diagram of a scenario for the software deployment method provided in an embodiment of the present invention;
[0049] Figure 3 This is another scenario diagram illustrating the software deployment method provided in this embodiment of the invention;
[0050] Figure 4 This is another scenario diagram illustrating the software deployment method provided in this embodiment of the invention;
[0051] Figure 5 This is a schematic diagram of the structure of the software deployment device provided in an embodiment of the present invention;
[0052] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0054] This invention provides a software deployment method, apparatus, computer device, and storage medium.
[0055] The computer equipment can be terminal devices such as mobile phones, tablets, and laptops, or wearable devices, smart TVs, or other smart terminals.
[0056] A server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms, but it is not limited to these.
[0057] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0058] This invention provides a software deployment method applicable to software deployment devices, such as... Figure 1 As shown, the process for distributing virtual items can be as follows:
[0059] 101. Obtain the script file corresponding to the target deployment orchestration task, wherein the target deployment orchestration task includes script files corresponding to at least two arranged subtasks.
[0060] In one embodiment, to address the problems existing in the prior art, this application proposes a software deployment method. This embodiment supports arranging subtasks to obtain a target deployment arrangement task.
[0061] Subtasks include tasks that can perform a specific function. For example, a subtask could refer to a database deployment orchestration subtask, a configuration deployment orchestration subtask, a deployment package orchestration subtask, or an environment selection orchestration subtask, and so on.
[0062] A target deployment orchestration task can include tasks that perform multiple complex functions. This target deployment orchestration task can be derived from an arrangement of multiple subtasks. For example, a target deployment orchestration task can be composed of database deployment orchestration subtasks, configuration deployment orchestration subtasks, deployment package orchestration subtasks, and environment selection orchestration subtasks. As another example, a target deployment orchestration task can be composed of database deployment orchestration subtasks, configuration deployment orchestration subtasks, and deployment package orchestration subtasks.
[0063] In one embodiment of this application, developers can build their own software deployment scheme based on subtasks, thereby reducing the complexity of software deployment and improving efficiency and reusability.
[0064] For example, developers can arrange subtasks to obtain target deployment orchestration tasks. This arrangement can be parallel, sequential, or other methods. For example... Figure 2 As shown, the target deployment orchestration task can include parallel database deployment orchestration subtasks and configuration deployment orchestration subtasks, as well as serial configuration deployment orchestration subtasks and deployment package orchestration subtasks. For example, as... Figure 3 As shown, the target deployment orchestration task may include database deployment orchestration subtasks, deployment package orchestration subtasks, and environment selection orchestration subtasks executed sequentially.
[0065] In one embodiment, after the developers have arranged the target deployment orchestration task, the software deployment device can obtain the script file corresponding to the target deployment orchestration task.
[0066] In one embodiment, to facilitate the implementation of the method proposed in this application, an orchestration system is provided. The orchestration system can be used to implement the method proposed in this application. This orchestration system can be downloaded into a software deployment device, enabling the software deployment device to implement this application through the orchestration system. For example, the orchestration system can obtain the script file corresponding to a target deployment orchestration task, wherein the target deployment orchestration task includes script files corresponding to at least two arranged subtasks.
[0067] 102. Determine the order of subtasks in the target deployment orchestration task.
[0068] In one embodiment, after the software deployment device obtains the script file corresponding to the target deployment orchestration task, it can determine the order of the subtasks in the target deployment orchestration task.
[0069] For example, the order of subtasks within a target deployment orchestration task can be determined using an orchestration system. Alternatively, the order of subtasks within a target deployment orchestration task can be obtained by iterating through the script file of that task.
[0070] 103. Based on the arrangement order, perform functional adaptation processing on the script files of subtasks in the target deployment orchestration task to obtain the adapted script files corresponding to the subtasks.
[0071] In one embodiment, the software deployment device can perform functional adaptation processing on the script files of subtasks in the target deployment orchestration task based on the arrangement order to obtain the adapted script files corresponding to the subtasks.
[0072] Specifically, functional adaptation processing of subtask script files refers to adapting the script files between subtasks so that they can work together. Furthermore, functional adaptation processing of subtask script files can also instruct the subtask script files to adapt to the target deployment orchestration task.
[0073] In one embodiment, the orchestration system can perform functional adaptation processing on the script files of subtasks in the target deployment orchestration task based on the arrangement order to obtain the adapted script files corresponding to the subtasks.
[0074] In one embodiment, the adaptation methods for different subtasks may differ. Therefore, when performing functional adaptation processing on the script files of subtasks in the target deployment orchestration task, the functional adaptation method for each subtask can be determined. Specifically, the step "based on the arrangement order, perform functional adaptation processing on the script files of subtasks in the target deployment orchestration task to obtain the adapted script files corresponding to the subtasks" may include:
[0075] Based on the script file of the subtask, determine the functional attributes corresponding to the subtask;
[0076] Based on the functional attributes corresponding to the subtask, determine the functional adaptation method corresponding to the subtask;
[0077] Based on the order of arrangement and the adaptation method corresponding to each subtask, the subtasks are functionally adapted to obtain the adapted script files corresponding to the subtasks.
[0078] The functional attribute describes the functions that a subtask can perform. For example, if the functional attribute of a subtask is database deployment orchestration, then the script file for that subtask can implement database deployment orchestration. Similarly, if the functional attribute of a subtask is deployment package orchestration, then the script file for that subtask can implement deployment package orchestration.
[0079] In one embodiment, the functional attributes of a subtask can be determined based on its script file. For example, the script file of the subtask can be traversed to obtain annotation information. Then, the functional attributes of the subtask can be determined based on the annotation information in the script file.
[0080] In one embodiment, the functional adaptation method for a subtask can be determined based on its corresponding functional attributes. This functional adaptation method can describe the execution logic of the subtask, thereby realizing the function corresponding to the subtask.
[0081] In one embodiment, the subtasks can be functionally adapted based on their arrangement order and the adaptation method corresponding to each subtask, resulting in the adapted script file corresponding to each subtask.
[0082] For example, as shown in Figure 4, the software deployment apparatus can first execute the database deployment orchestration subtask and the configuration deployment orchestration subtask in parallel. Then, the software deployment apparatus can execute the deployment package orchestration task and the environment selection orchestration task.
[0083] In one embodiment, for database deployment orchestration subtasks, the step "based on the arrangement order and the adaptation method corresponding to each subtask, perform functional adaptation processing on the subtasks to obtain the adapted script files corresponding to the subtasks" may include:
[0084] Based on the order of arrangement and the adaptation method corresponding to the current subtask, determine the corresponding adaptation version of the script file of the current subtask;
[0085] The script files corresponding to the target deployment orchestration task are parsed to obtain the environment information corresponding to the target deployment orchestration task;
[0086] The adapted version of the current subtask and the environment information of the target deployment orchestration task are associated to obtain the associated script file of the current subtask.
[0087] In one embodiment, when the current subtask is a database deployment orchestration subtask, the adaptation version corresponding to the script file of the current subtask can be determined based on the orchestration order and the adaptation method corresponding to the current subtask. Here, the adaptation version can refer to the version corresponding to the database. For example, assuming the database is an Oracle database, the corresponding version could be Oracle 1.0 or Oracle 2.0, and so on.
[0088] In one embodiment, the script file corresponding to the target deployment orchestration task can be parsed to obtain the environment information required by the target deployment orchestration task. This environment information describes the environment in which the target deployment orchestration task needs to be deployed, and the subtasks need to be adapted to the target deployment orchestration task so that the target deployment orchestration task can be implemented.
[0089] For example, environmental information may include production environment (prod), development environment (dev), or user acceptance testing environment (uat), etc.
[0090] In one embodiment, the adapted version of the current subtask and the environment information of the target deployment orchestration task can be associated to obtain the associated script file of the current subtask. For example, the database version can be deployed to the environment of the target deployment orchestration task.
[0091] For example, for a database deployment orchestration subtask, the environment information corresponding to the target deployment orchestration task can be determined, such as the production environment (prod). Then, the appropriate version for the subtask's script file can be selected through the Git database project. The production environment (prod) and the appropriate version can then be associated. Through these steps, the database version of the subtask can be associated with the environment information corresponding to the target deployment orchestration task, allowing the database environment to be configured using variables created within the orchestration system.
[0092] In one embodiment, when the current subtask is a configuration deployment orchestration subtask, the step "based on the arrangement order and the adaptation method corresponding to each subtask, perform functional adaptation processing on the subtask to obtain the adapted script file corresponding to the subtask" may include:
[0093] Based on the arrangement order and the adaptation method corresponding to the current subtask, the script file corresponding to the target deployment orchestration task is parsed to obtain the environment information corresponding to the target deployment orchestration task;
[0094] The script file and environment information corresponding to the current subtask are associated to obtain the adapted script file.
[0095] In one embodiment, the script file corresponding to the target deployment orchestration task can be parsed based on the arrangement order and the adaptation method corresponding to the current subtask to obtain the environment information corresponding to the target deployment orchestration task. For example, the script file corresponding to the target deployment orchestration task can be parsed based on the arrangement order and the adaptation method corresponding to the current subtask to obtain the Apollo configuration environment. Then, the script file corresponding to the current subtask and the environment information can be associated to obtain the adapted script file. Through the embodiments of this application, it is possible to create relevant variables in the Apollo configuration environment.
[0096] In one embodiment, when the current subtask is a deployment package orchestration subtask, the step "based on the arrangement order and the adaptation method corresponding to each subtask, perform functional adaptation processing on the subtask to obtain the adapted script file corresponding to the subtask" may include:
[0097] Based on the arrangement order and the adaptation method corresponding to the current subtask, the script file corresponding to the current subtask is parsed to obtain the deployment package address information;
[0098] Based on the deployment package address information, determine the deployment package required for the current subtask;
[0099] Compile the deployment package required by the current subtask to obtain the compiled deployment package;
[0100] The compiled deployment package and the script file of the current subtask are associated to obtain the adapted script file.
[0101] The deployment packages can be built by an orchestration system and stored in a deployment package list, with each deployment package having a corresponding storage address in the deployment package list.
[0102] In one embodiment, the script file corresponding to the current subtask can be parsed based on the arrangement order and the adaptation method corresponding to the current subtask to obtain the deployment package address information. Then, the deployment package required by the current subtask can be determined based on the deployment package address information.
[0103] The deployment package address information can refer to the storage address corresponding to the deployment package in the deployment package list. Then, the deployment package required by the subtask can be determined from the deployment package list based on the deployment package address information.
[0104] In one embodiment, the deployment package required by the current subtask can be compiled to obtain a compiled deployment package. By compiling the deployment package required by the current subtask, the compiled deployment package can be adapted to the target deployment orchestration task. Then, the compiled deployment package and the script file of the current subtask can be associated to obtain an adapted script file.
[0105] In one embodiment, when the current subtask is an environment selection orchestration subtask, the step "based on the arrangement order and the adaptation method corresponding to each subtask, perform functional adaptation processing on the subtask to obtain the adapted script file corresponding to the subtask" may include:
[0106] Based on the order of arrangement and the adaptation method corresponding to the current subtask, the script file of the subtask is parsed to obtain the target deployment environment group information and the target deployment server;
[0107] Based on the target deployment environment group information, obtain the target deployment environment group;
[0108] The target deployment environment group is deployed to the target deployment server to obtain the deployed server;
[0109] The address information of the deployed server is associated with the script file of the current subtask to obtain the adapted script file.
[0110] In one embodiment, the script file of the subtask can be parsed based on the arrangement order and the adaptation method corresponding to the current subtask to obtain the target deployment environment group information and the target deployment server.
[0111] The target environment group information specifies the address corresponding to the deployment environment group. The target deployment server specifies which target deployment server the target deployment orchestration task should be deployed to.
[0112] Then, the target deployment environment group can be obtained based on the target deployment environment group information. For example, the target deployment environment group can be obtained from the Git database based on the target deployment environment information.
[0113] In one embodiment, the target deployment environment group can be deployed to the target deployment server to obtain the deployed server. Then, the address information of the deployed server and the script file of the current subtask are associated to obtain the adapted script file. For example, in the orchestration series, an environment list in groups, such as prod groups, can be maintained. Each prod group corresponds to an environment server with a list of IP addresses.
[0114] 104. Based on the adapted script file corresponding to the subtask, update the script file of the target orchestration and deployment task to obtain the target script file.
[0115] In one embodiment, the script file for the target orchestration and deployment task can be updated based on the adapted script file corresponding to the subtask to obtain the target script file.
[0116] For example, the orchestration system can update the script file of the target orchestration and deployment task based on the adapted script file corresponding to the subtask to obtain the target script file.
[0117] For example, the adapted script files corresponding to subtasks can be compiled to obtain the target script file.
[0118] Then, the target script file can be saved, thus establishing a target orchestration and deployment task for an entire associated entity within an independent environment. When subsequently deploying the target script file to production, operations personnel only need to execute the corresponding orchestration task to complete the deployment in the production environment.
[0119] In one embodiment, this application proposes an orchestration system that can be freely combined and arranged from various subtasks. These subtasks may include database deployment orchestration subtasks, configuration deployment orchestration subtasks, deployment package orchestration subtasks, and environment selection orchestration subtasks. Developers can use these subtasks to construct software deployment schemes tailored to their needs, thereby reducing complexity and improving efficiency and reusability.
[0120] For example, such as Figure 4 As shown, the arrangement process can be as follows:
[0121] (1) Operations and development personnel can create relevant target deployment orchestration tasks. For example, they can create production environment orchestration tasks or user environment acceptance tasks, etc.
[0122] (2) Operations and development personnel can arrange and combine subtasks. For example, they can create new subtasks, which can be executed in parallel or sequentially. For example, such as... Figure 4 As shown, the database deployment orchestration subtask and the configuration deployment orchestration subtask are two orchestration tasks that run in parallel.
[0123] When the target deployment orchestration task is production environment deployment orchestration, the database deployment orchestration subtask allows configuration of database version and environment association. Specifically, select the database environment set up in the orchestration system, such as the Oracle database for the production environment (prod). Then, the corresponding database version can be selected through the script file corresponding to the subtask in the Git database, thereby associating the database version with the environment.
[0124] Specifically, for configuring and deploying orchestration subtasks, configuration files and environments can be associated. You can select the Apollo configuration environment within the orchestration system, and then associate the subtask's script files with that configuration environment.
[0125] (3) Create a deployment package orchestration subtask, which can select deployment packages that are compatible with the environment. The deployment package can be automatically found and compiled by the orchestration system using the deployment package address information. In addition, after obtaining the deployment package, the orchestration system can also build the deployment package and store it in the deployment package list for easy use next time.
[0126] (4) Create an environment selection orchestration subtask, which can add an IP column for the environment group to be deployed. The orchestration system maintains a list of environments organized by groups, such as the prod group. Each environment group corresponds to an environment server with a list of IP addresses.
[0127] (5) Save the orchestration task. Then, a target orchestration and deployment task for an entire associated entity in an independent environment is created. During subsequent production deployment, operations and maintenance personnel only need to execute the corresponding target orchestration and deployment task to complete the deployment of the production environment, thereby improving the efficiency of software deployment.
[0128] This embodiment allows for the acquisition of script files corresponding to a target deployment orchestration task. The target deployment orchestration task includes script files corresponding to at least two arranged subtasks. The arrangement order of the subtasks within the target deployment orchestration task is determined. Based on this arrangement order, the script files of the subtasks in the target deployment orchestration task undergo functional adaptation processing to obtain adapted script files corresponding to the subtasks. Based on the adapted script files corresponding to the subtasks, the script files of the target orchestration deployment task are updated. Through this embodiment and the orchestration system proposed in this application, a method for combining and arranging dependencies and relationships between resources and components is directly provided. Developers can select multiple components and multiple environments for execution, and can also freely orchestrate related subtasks. In actual production processes, related orchestration templates can be reused, reducing human error and improving software deployment efficiency.
[0129] To better implement the above methods, the present invention also provides a software deployment device, which is specifically integrated into a terminal or server.
[0130] refer to Figure 5 The software deployment device includes:
[0131] The acquisition unit 201 is used to acquire the script file corresponding to the target deployment orchestration task, wherein the target deployment orchestration task includes script files corresponding to at least two subtasks that have been arranged.
[0132] Determining unit 202 is used to determine the arrangement order of subtasks in the target deployment orchestration task;
[0133] The function adaptation unit 203 is used to perform function adaptation processing on the script files of subtasks in the target deployment orchestration task based on the arrangement order, so as to obtain the adapted script files corresponding to the subtasks.
[0134] The update unit 204 is used to update the script file of the target orchestration and deployment task based on the adapted script file corresponding to the subtask, so as to obtain the target script file.
[0135] In one embodiment, the functional adaptation unit 203 may include:
[0136] The functional attribute determination subunit is used to determine the functional attributes corresponding to the subtask based on the script file of the subtask.
[0137] The method determination subunit is used to determine the function adaptation method corresponding to the subtask based on the functional attributes corresponding to the subtask.
[0138] The function adaptation processing subunit is used to perform function adaptation processing on the subtasks based on the arrangement order and the adaptation method corresponding to each subtask, so as to obtain the adapted script file corresponding to the subtask.
[0139] In one embodiment, the functional adaptation processing subunit may include:
[0140] The version determination module is used to determine the adaptation version corresponding to the script file of the current subtask based on the arrangement order and the adaptation method corresponding to the current subtask.
[0141] The first script parsing module is used to parse the script file corresponding to the target deployment orchestration task to obtain the environmental information corresponding to the target deployment orchestration task;
[0142] The first association processing module is used to associate the adapted version of the current subtask with the environmental information of the target deployment orchestration task to obtain the associated script file of the current subtask.
[0143] In one embodiment, the functional adaptation processing subunit may include:
[0144] The second script parsing module is used to parse the script file corresponding to the target deployment orchestration task based on the arrangement order and the adaptation method corresponding to the current subtask, so as to obtain the environmental information corresponding to the target deployment orchestration task.
[0145] The second association processing module is used to associate the script file corresponding to the current subtask with the environment information to obtain the adapted script file.
[0146] In one embodiment, the functional adaptation processing subunit may include:
[0147] The third script parsing module is used to parse the script file corresponding to the current subtask based on the arrangement order and the adaptation method corresponding to the current subtask, so as to obtain the deployment package address information;
[0148] The deployment package determination module is used to determine the deployment package required by the current subtask based on the deployment package address information;
[0149] The compilation module is used to compile the deployment package required by the current subtask to obtain the compiled deployment package;
[0150] The third association processing module is used to associate the compiled deployment package with the script file of the current subtask to obtain the adapted script file.
[0151] In one embodiment, the functional adaptation processing subunit may include:
[0152] The fourth script parsing module is used to parse the script file of the current subtask based on the arrangement order and the adaptation method corresponding to the current subtask, so as to obtain the target deployment environment group information and the target deployment server;
[0153] The acquisition module is used to acquire the target deployment environment group based on the target deployment environment group information;
[0154] The deployment module is used to deploy the target deployment environment group to the target deployment server to obtain the deployed server.
[0155] The fourth association processing module is used to associate the address information of the deployed server with the script file of the current subtask to obtain the adapted script file.
[0156] In one embodiment, the acquisition unit 201 may include:
[0157] The acquisition subunit is used to acquire the script file corresponding to the target deployment orchestration task through the orchestration system, wherein the target deployment orchestration task includes script files corresponding to at least two arranged subtasks.
[0158] In one embodiment, the determining unit 202 may include:
[0159] The sub-unit is determined by the orchestration system to determine the order of subtasks in the target deployment orchestration task.
[0160] In one embodiment, the functional adaptation unit 203 may include:
[0161] The function adaptation subunit is used to perform function adaptation processing on the script files of subtasks in the target deployment orchestration task based on the arrangement order through the orchestration system, so as to obtain the adapted script files corresponding to the subtasks.
[0162] In one embodiment, the update unit 204 may include:
[0163] The update subunit is used to update the script file of the target orchestration and deployment task based on the adapted script file corresponding to the subtask through the orchestration system, so as to obtain the target script file.
[0164] In this embodiment, the acquisition unit obtains the script file corresponding to the target deployment orchestration task, wherein the target deployment orchestration task includes script files corresponding to at least two arranged subtasks; the determination unit determines the arrangement order of the subtasks in the target deployment orchestration task; the function adaptation unit performs function adaptation processing on the script files of the subtasks in the target deployment orchestration task based on the arrangement order to obtain the adapted script file corresponding to the subtask; and the update unit updates the script file of the target orchestration deployment task based on the adapted script file corresponding to the subtask to obtain the target script file, which can improve the efficiency of software deployment.
[0165] Furthermore, embodiments of the present invention also provide a computer device, which may be a terminal or a server, such as... Figure 6 As shown, it illustrates a structural schematic diagram of a computer device involved in an embodiment of the present invention, specifically:
[0166] The computer device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 6 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0167] The processor 401 is the control center of the computer device. It connects various parts of the computer device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, thereby providing overall monitoring of the computer device. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.
[0168] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0169] The computer device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0170] The computer device may also include an input unit 404, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0171] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the computer device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize various functions, as follows:
[0172] Obtain the script file corresponding to the target deployment orchestration task, wherein the target deployment orchestration task includes script files corresponding to at least two subtasks that have been arranged;
[0173] Determine the order of the subtasks in the target deployment orchestration task;
[0174] Based on the arrangement order, the script files of the subtasks in the target deployment orchestration task are functionally adapted to obtain the adapted script files corresponding to the subtasks.
[0175] Based on the adapted script file corresponding to the subtask, the script file of the target orchestration and deployment task is updated to obtain the target script file.
[0176] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0177] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0178] To this end, embodiments of the present invention also provide a computer-readable storage medium storing a plurality of instructions which can be loaded by a processor to execute the methods provided in various optional implementations of the embodiments of the present invention.
[0179] According to one aspect of this application, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the above embodiments.
[0180] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0181] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0182] Since the instructions stored in the storage medium can execute the steps in the method provided in the embodiments of the present invention, the beneficial effects that the method provided in the embodiments of the present invention can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0183] The software deployment method, apparatus, computer equipment, and storage medium provided by the embodiments of the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A software deployment method, characterized in that, include: Obtain the script file corresponding to the target deployment orchestration task, wherein the target deployment orchestration task includes script files corresponding to at least two subtasks that have been arranged; Determine the order of the subtasks in the target deployment orchestration task; Based on the stated order, the script files of the subtasks in the target deployment orchestration task are subjected to functional adaptation processing to obtain the adapted script files corresponding to the subtasks. This includes: determining the functional attributes corresponding to the subtasks based on the script files of the subtasks; determining the functional adaptation method corresponding to the subtasks based on the functional attributes corresponding to the subtasks; and performing functional adaptation processing on the subtasks based on the stated order and the adaptation method corresponding to each subtask to obtain the adapted script files corresponding to the subtasks. Based on the adapted script file corresponding to the subtask, the script file of the target deployment orchestration task is updated to obtain the target script file.
2. The method according to claim 1, characterized in that, Based on the arrangement order and the adaptation method corresponding to each subtask, the subtasks are functionally adapted to obtain the adapted script files corresponding to the subtasks, including: Based on the arrangement order and the adaptation method corresponding to the current subtask, determine the adaptation version corresponding to the script file of the current subtask; The script file corresponding to the target deployment orchestration task is parsed to obtain the environmental information corresponding to the target deployment orchestration task; The adapted version of the current subtask and the environment information of the target deployment orchestration task are associated to obtain the associated script file of the current subtask.
3. The method according to claim 1, characterized in that, Based on the arrangement order and the adaptation method corresponding to each subtask, the subtasks are functionally adapted to obtain the adapted script files corresponding to the subtasks, including: Based on the arrangement order and the adaptation method corresponding to the current subtask, the script file corresponding to the target deployment orchestration task is parsed to obtain the environmental information corresponding to the target deployment orchestration task; The script file corresponding to the current subtask and the environment information are associated to obtain the adapted script file.
4. The method according to claim 1, characterized in that, Based on the arrangement order and the adaptation method corresponding to each subtask, the subtasks are functionally adapted to obtain the adapted script files corresponding to the subtasks, including: Based on the arrangement order and the adaptation method corresponding to the current subtask, the script file corresponding to the current subtask is parsed to obtain the deployment package address information; Based on the deployment package address information, determine the deployment package required for the current subtask; The deployment package required by the current subtask is compiled to obtain the compiled deployment package; The compiled deployment package and the script file of the current subtask are associated to obtain the adapted script file.
5. The method according to claim 1, characterized in that, Based on the arrangement order and the adaptation method corresponding to each subtask, the subtasks are functionally adapted to obtain the adapted script files corresponding to the subtasks, including: Based on the arrangement order and the adaptation method corresponding to the current subtask, the script file of the current subtask is parsed to obtain the target deployment environment group information and the target deployment server; Based on the target deployment environment group information, obtain the target deployment environment group; The target deployment environment group is deployed to the target deployment server to obtain the deployed server; The address information of the deployed server and the script file of the current subtask are associated to obtain the adapted script file.
6. The method according to claim 1, characterized in that, The script file corresponding to the target deployment orchestration task is obtained through the orchestration system; The orchestration system determines the order of subtasks within the target deployment orchestration task. Based on the arrangement order, the orchestration system performs functional adaptation processing on the script files of subtasks in the target deployment orchestration task to obtain the adapted script files corresponding to the subtasks. The target deployment orchestration task updates the script file of the target deployment orchestration task based on the adapted script file corresponding to the subtask through the orchestration system, and obtains the target script file.
7. A software deployment apparatus, characterized in that, include: The acquisition unit is used to acquire the script file corresponding to the target deployment orchestration task, wherein the target deployment orchestration task includes script files corresponding to at least two subtasks that have been arranged. A determining unit is used to determine the arrangement order of subtasks in the target deployment orchestration task; A function adaptation unit is configured to perform function adaptation processing on the script files of subtasks in the target deployment orchestration task based on the arrangement order, to obtain adapted script files corresponding to the subtasks. The process includes: determining the functional attributes corresponding to the subtasks based on their script files; determining the function adaptation method corresponding to the subtasks based on their functional attributes; and performing function adaptation processing on the subtasks based on the arrangement order and the adaptation method corresponding to each subtask, to obtain adapted script files corresponding to the subtasks. The update unit is used to update the script file of the target deployment orchestration task based on the adapted script file corresponding to the subtask, so as to obtain the target script file.
8. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the software deployment method as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When a computer program is run on a computer, it causes the computer to perform the steps of the software deployment method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Server environment deployment method and device
CN107066292A
Micro-service gray release method and device, computer equipment and storage medium
CN112822272A