CN115794128A - Software deployment method, device, computer equipment and computer-readable storage medium - Google Patents

Software deployment method, device, computer equipment and computer-readable storage medium Download PDF

Info

Publication number
CN115794128A
CN115794128A CN202211534115.XA CN202211534115A CN115794128A CN 115794128 A CN115794128 A CN 115794128A CN 202211534115 A CN202211534115 A CN 202211534115A CN 115794128 A CN115794128 A CN 115794128A
Authority
CN
China
Prior art keywords
deployment
software
target
deployed
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211534115.XA
Other languages
Chinese (zh)
Inventor
胡宏栋
姜雪明
黄光为
张小红
潘倩倩
黄乙元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Supcon Information Industry Co Ltd
Original Assignee
Zhejiang Supcon Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Supcon Information Industry Co Ltd filed Critical Zhejiang Supcon Information Industry Co Ltd
Priority to CN202211534115.XA priority Critical patent/CN115794128A/en
Publication of CN115794128A publication Critical patent/CN115794128A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application provides a software deployment method, a software deployment device, computer equipment and a computer readable storage medium, and belongs to the technical field of computers. The method comprises the following steps: generating an initial arranging file according to configuration information corresponding to software to be deployed; determining at least one target deployment device from a plurality of resource devices in the software deployment system according to the configuration information, and generating an intermediate deployment file according to the initial deployment file and each target deployment device; splitting and converting the intermediate layout file based on each operation module to obtain at least one target layout file; and generating deployment tasks according to the target editing files, and respectively executing the deployment tasks by corresponding deployment engines so as to deploy the software to be deployed to the deployment equipment. The method and the device can achieve the effect of improving the software deployment efficiency.

Description

Software deployment method, device, computer equipment and computer-readable storage medium
Technical Field
The present application relates to the field of network communication technologies, and in particular, to a software deployment method, an apparatus, a computer device, and a computer-readable storage medium.
Background
With the development of internet technology and computer technology, technicians develop various software products, which need to be installed and deployed on corresponding servers if the software products are to be interacted with and normally used by users. However, traditional deployment approaches have not been adequate to the current demands of increasing software deployment.
In the related art, related technicians start to deploy various software products in an automated deployment manner, for example, binary deployment may be performed through an infrastructure tool, so that host-based software automated deployment may be implemented. In addition, cloud native deployment can be performed through a Kubernets (K8S for short), so that software automation deployment and resource arrangement optimization based on a cloud native environment can be realized.
However, both the infrastructure tool and the K8S tool in the related art can only deploy software in a specific environment by using different layout files, and if a software product needs to be deployed successfully by fusing multiple deployment modes, multiple technology stacks are required to respectively develop layout files with different formats and repeated contents. Therefore, the related art solution has a problem that the efficiency of software deployment is low.
Disclosure of Invention
The application aims to provide a software deployment method, a software deployment device, computer equipment and a computer readable storage medium, and the effect of improving software deployment efficiency can be achieved.
The embodiment of the application is realized as follows:
in a first aspect of an embodiment of the present application, a software deployment method is provided, which is applied to a deployment server in a software deployment system, and the method includes:
generating an initial arrangement file according to configuration information corresponding to software to be deployed, wherein the initial arrangement file comprises at least one operation module, and each operation module corresponds to a deployment engine respectively;
determining at least one target deployment device from a plurality of resource devices in the software deployment system according to the configuration information, and generating an intermediate layout file according to the initial layout file and each target deployment device;
splitting and converting the intermediate layout file based on each operation module to obtain at least one target layout file, wherein the format of each target layout file is respectively matched with the deployment engine corresponding to each operation module;
and generating deployment tasks according to the target layout files, and respectively executing the deployment tasks by corresponding deployment engines so as to deploy the software to be deployed to the target deployment equipment.
Optionally, the splitting and converting the intermediate layout file based on each running module to obtain at least one target layout file includes:
splitting at least one sub layout file from the intermediate layout file according to each operation module, wherein each sub layout file comprises one operation module, configuration information and real-time resource information corresponding to the operation module;
format conversion is carried out on each sub-layout file according to the deployment engine corresponding to each operation module respectively to obtain each converted sub-layout file, and the format of each converted sub-layout file is matched with the deployment engine corresponding to each operation module respectively;
and taking each converted sub layout file as each target layout file respectively.
Optionally, the generating a deployment task according to each target editing file, and executing each deployment task by a corresponding deployment engine respectively includes:
encapsulating each target layout file, the function module of the software to be deployed corresponding to each target layout file and the execution sequence of the function module to obtain each deployment task, wherein the execution sequence of each deployment task corresponds to the execution sequence of each function module of the software to be deployed;
determining a deployment engine corresponding to the target editing file in the deployment task, and distributing each deployment task to each deployment engine;
and executing the deployment tasks by the deployment engines according to the execution sequence of the deployment tasks.
Optionally, the determining at least one target deployment device from the plurality of resource devices in the software deployment system according to the configuration information includes:
respectively determining the matching conditions of each operation module according to the configuration information in the initial layout file;
determining environment information and real-time resource information of each resource device, and determining at least one device to be deployed which meets the matching condition of the operation module from each resource device according to the environment information and the real-time resource information;
determining target deployment equipment corresponding to the operation module from the equipment to be deployed;
wherein the real-time resource information includes at least one of: the processor resource, the memory resource, the network resource, the storage resource and the process resource of the resource device, wherein the environment information includes at least one of the following items: the resource device comprises a hardware architecture, an operating system and a deployment engine corresponding to the resource device.
Optionally, the determining, from the devices to be deployed, a target deployment device corresponding to the operation module includes:
determining the priority of each device to be deployed by performing weighted calculation on the real-time resource information of each device to be deployed;
and taking the device to be deployed with the highest priority in the devices to be deployed as the target deployment device corresponding to each operation module.
Optionally, the generating an intermediate layout file according to the initial layout file and the target deployment device includes:
writing the real-time resource information of each target deployment device into the initial layout file;
and binding the real-time resource information of each target deployment device with each operation module in the initial layout file to obtain the intermediate layout file.
Optionally, the generating an initial layout file according to configuration information corresponding to software to be deployed includes:
receiving the configuration information sent by the front-end device in the software deployment system, where the configuration information includes at least one of the following: the running environment information of the software to be deployed, the parameter information of the software to be deployed, the running module and the identifier of the deployment engine corresponding to the running module;
and acquiring a preset arranging template, and writing each configuration information into the preset arranging template to obtain the initial arranging file.
In a second aspect of the embodiments of the present application, there is provided a software deploying apparatus, including:
the generating module is used for generating an initial arranging file according to the configuration information corresponding to the software to be deployed, the initial arranging file comprises at least one operating module, and each operating module corresponds to one deployment engine;
the determining and generating module is used for determining at least one target deployment device from a plurality of resource devices in the software deployment system according to the configuration information, and generating an intermediate arrangement file according to the initial arrangement file and each target deployment device;
the splitting and converting module is used for splitting and converting the intermediate layout file based on each operation module to obtain at least one target layout file, and the format of each target layout file is respectively matched with the deployment engine corresponding to each operation module;
and the execution module is used for generating deployment tasks according to the target editing files, and respectively executing the deployment tasks by the corresponding deployment engines so as to deploy the software to be deployed to the deployment equipment.
In a third aspect of the embodiments of the present application, a computer device is provided, where the computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when executed by the processor, the computer program implements the software deployment method of the first aspect.
In a fourth aspect of embodiments of the present application, a computer-readable storage medium is provided, where a computer program is stored, and when the computer program is executed by a processor, the software deployment method of the first aspect is implemented.
The beneficial effects of the embodiment of the application include:
according to the software deployment method provided by the embodiment of the application, the initial layout file is generated according to the configuration information corresponding to the software to be deployed. Because the initial layout file is a universal layout file which is generated according to the configuration information and can be suitable for different types of deployment engines, only related technicians develop one formatted initial layout file to deploy the file to be deployed to each resource device through different deployment engines.
And determining at least one target deployment device from a plurality of resource devices in the software deployment system according to the configuration information, and generating an intermediate arrangement file according to the initial arrangement file and each target deployment device. Because each target deployment device is determined from each resource device based on the configuration information, it can be ensured that the software to be deployed can run correctly and stably after the software to be deployed is deployed to each target deployment device. In addition, the intermediate layout file comprises the resource information of each target deployment device and the initial layout file, so that the software to be deployed can be accurately deployed to each target deployment device according to the configuration information when the software to be deployed is subsequently deployed based on the intermediate layout file.
And splitting and converting the intermediate layout file based on each operation module to obtain at least one target layout file. The format of each target layout file can be identified, analyzed and processed by the corresponding deployment engine, and further, each target layout file can be processed by the corresponding deployment engine so as to deploy each function module of the software to be deployed to the corresponding target deployment device based on the operation module corresponding to each target layout file.
And generating deployment tasks according to the target layout files, and respectively executing the deployment tasks by corresponding deployment engines so as to deploy the software to be deployed to the target deployment equipment. Under the condition of executing each deployment task, the function modules corresponding to the operation modules in the software to be deployed can be deployed to the target deployment equipment based on the operation modules corresponding to the target layout files, so that the purpose of deploying the software to be deployed can be achieved.
It can be understood that the function of deploying the software to be deployed by fusing multiple deployment engines can be realized only by developing one initial deployment file, and multiple deployment files with repeated contents and different formats do not need to be developed by multiple technology stacks respectively.
Therefore, the effect of improving the software deployment efficiency can be achieved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic structural diagram of a software deployment system according to an embodiment of the present application;
fig. 2 is a flowchart of a first software deployment method according to an embodiment of the present application;
fig. 3 is a flowchart of a second software deployment method according to an embodiment of the present application;
fig. 4 is a flowchart of a third software deployment method provided in the embodiment of the present application;
fig. 5 is a flowchart of a fourth software deployment method according to an embodiment of the present application;
fig. 6 is a flowchart of a fifth software deployment method according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a software deployment apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, as presented in the figures, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present application, it should be noted that, unless otherwise explicitly stated or limited, the terms "disposed," "mounted," "connected," and "connected" are to be construed broadly and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
In the related art, the related technicians start to deploy various software products by means of automated deployment, for example, binary deployment can be performed through an infrastructure tool, so that host-based software automated deployment can be realized. In addition, cloud native deployment can be performed through a Kubernetes (K8S for short), so that software automation deployment and resource arrangement optimization based on a cloud native environment can be realized. However, both the infrastructure tool and the K8S tool in the related art can only deploy software in a specific environment by using different layout files, and if a software product needs to be successfully deployed by fusing multiple deployment modes, multiple technology stacks are required to respectively develop multiple layout files with repeated contents and different formats. Therefore, the related art solution has a problem that the efficiency of software deployment is low.
To this end, an embodiment of the present application provides a software deployment method, where an initial layout file is generated according to configuration information corresponding to software to be deployed, at least one target deployment device is determined from multiple resource devices in the software deployment system according to the configuration information, an intermediate layout file is generated according to the initial layout file and each target deployment device, the intermediate layout file is split and converted based on each running module to obtain at least one target layout file, a deployment task is generated according to each target layout file, and each deployment task is executed by a corresponding deployment engine respectively to deploy the software to be deployed to the deployment device, so that an effect of improving software deployment efficiency can be achieved.
The embodiment of the present application takes a software deployment method applied in a software deployment system as an example for description. The embodiment of the application is not limited to be applied to software deployment in a software deployment system.
Fig. 1 is a schematic structural diagram of a software deployment system provided in an embodiment of the present application, and referring to fig. 1, the software deployment system may include a deployment server a, at least one front-end device B, and multiple resource devices C.
Each front-end device B may be connected to the deployment server a, and each resource device C may also be connected to the deployment server a.
Alternatively, the front-end device B may be a terminal device operated and controlled by a technician involved.
Generally, the front-end device B may provide a visual interface, and a plurality of configuration information cells for technicians to select or fill in may be displayed on the visual interface, so that the technicians may operate on the visual interface of the front-end device B to input configuration information required in the software deployment process into the front-end device B.
In addition, after the technician finishes inputting all the configuration information, the front-end device B may further send the configuration information to the deployment server a by triggering a confirmation control provided on the visual interface.
Optionally, the deployment server a may determine, according to the configuration information, software to be deployed corresponding to the configuration information and determine a storage location of the software to be deployed, when receiving the configuration information, so as to facilitate accurately finding a file of the software to be deployed in a subsequent software deployment according to the configuration information.
Alternatively, each resource device C may be any terminal device or server capable of running the software to be deployed. Each resource device C may also be a virtual device, that is, in this case, each resource device C may be a virtual machine disposed on the deployment server a, which is not limited in this embodiment of the present application.
In addition, a plurality of deployment engines may be installed or operated on the deployment server a, for example, an enterprise, a kubernet, and any other deployment engine that can execute software deployment may be installed or operated on the deployment server a, which is not limited in this embodiment of the present application.
The software deployment method provided by the embodiments of the present application is explained in detail below.
Fig. 2 is a flowchart of a software deployment method provided in the present application, where the method may be applied to the deployment server a. Referring to fig. 2, an embodiment of the present application provides a software deployment method, including:
step 1001: and generating an initial arranging file according to the configuration information corresponding to the software to be deployed.
Optionally, the software to be deployed may be any software, and the development language of the software to be deployed may be any programming language such as java, C language, C + +, and the like, which is not limited in this embodiment of the present application.
Optionally, the configuration information may be some environmental information and resource information required when deploying the software to be deployed.
For example, the configuration information may include an operation module of the software to be deployed, an operation environment required by the software to be deployed, specific parameters of the operation, a resource allocation requirement, and a category of a deployment engine corresponding to each operation module in the software to be deployed.
Specifically, the execution environment required by the software to be deployed may refer to a hardware architecture required by the software to be deployed when running on a corresponding resource device, such as an X86 architecture, an X64 architecture, an ARM architecture, and the like. The operating system may also be an operating system required when the software to be deployed runs on the corresponding device, such as a Windows system, a MacOS system, a Linux system, and the like. The embodiments of the present application do not limit this.
The resource allocation requirement may refer to CPU resources, memory resources, network resources, hard disk resources, the number of processes, and the like that need to be allocated when the software to be deployed runs.
The category of the deployment engine corresponding to each running module may include a binary deployment engine, a cloud-native deployment engine, and the like. Generally, the binary deployment engine may include an anchor tool or any other possible deployment tool, and the cloud native deployment engine may include kubernets (K8 s for short) or any other possible deployment tool, which is not limited in this embodiment of the present application.
The specific parameter of the to-be-deployed software during running may refer to some parameter information that ensures that the to-be-deployed software can run correctly, for example, a port number that the to-be-deployed software needs to call, and the like.
In addition, each running module of the software to be deployed may be a code or a program for deploying one functional module in the software to be deployed, which is not limited in this embodiment of the application.
Alternatively, the initial layout file may be a specifically formatted layout file or a layout file generated based on a specific template, which may be a generic layout file suitable for various different types of deployment engines.
The initial layout file comprises at least one operation module, and each operation module corresponds to one deployment engine respectively. That is to say, each running module may correspond to the same type of deployment engine, or may correspond to different types of deployment engines, which is not limited in this embodiment of the present application.
It should be noted that the initial orchestration file is an orchestration file that is generated according to the configuration information and is applicable to different types of deployment engines, and then when the to-be-deployed software is subsequently deployed based on the initial orchestration file, the to-be-deployed file can be deployed to each resource device through different deployment engines without developing multiple orchestration files with repeated contents.
Step 1002: and determining at least one target deployment device from a plurality of resource devices in the software deployment system according to the configuration information, and generating an intermediate arrangement file according to the initial arrangement file and each target deployment device.
The resource devices may be the resource devices C described above.
Optionally, the target deployment device may refer to a resource device in each resource device, where the resource device may run the software to be deployed, and specifically may refer to a resource device in each resource device, where a hardware architecture, an operating system, a CPU resource, a memory resource, a network resource, a hard disk resource, and a process number all conform to the configuration information. The embodiments of the present application do not limit this.
Optionally, the intermediate layout file may refer to a layout file obtained after the real-time resource information of each target deployment device is written into the initial layout file.
It should be noted that, since each target deployment device is determined from each resource device based on the configuration information, it is ensured that the software to be deployed can run correctly and stably after the software to be deployed is deployed to each target deployment device. In addition, the intermediate layout file comprises the resource information of each target deployment device and the initial layout file, so that the software to be deployed can be accurately deployed to each target deployment device according to the configuration information when the software to be deployed is subsequently deployed based on the intermediate layout file.
Step 1003: and splitting and converting the intermediate layout file based on each operation module to obtain at least one target layout file.
Optionally, each target layout file may correspond to one operation module respectively, and also correspond to a plurality of operation modules respectively, which is not limited in this embodiment of the present application.
Optionally, the format of each target layout file is matched with the deployment engine corresponding to each running module respectively.
That is to say, each target orchestration file may be used to deploy one or more running modules of the software to be deployed to the corresponding target deployment device.
It is noted that the split conversion process may be a process including a splitting process and a conversion process. The splitting process may be an operation of splitting data or information corresponding to each running module from the intermediate layout file, and the converting process may be an operation of converting the data or information corresponding to each split running module into a format corresponding to a deployment engine corresponding to each running module.
The intermediate layout file is subjected to splitting conversion processing to obtain each target layout file, so that the format of each target layout file can be ensured to be recognized, analyzed and processed by a corresponding deployment engine, and further each target layout file can be ensured to be processed by the corresponding deployment engine so as to deploy each function module of the software to be deployed to corresponding target deployment equipment based on the corresponding operation module of each target layout file.
Step 1004: and generating deployment tasks according to the target layout files, and respectively executing the deployment tasks by corresponding deployment engines so as to deploy the software to be deployed to the target deployment equipment.
Alternatively, each deployment task may be a task for deploying each execution module based on each target orchestration file. Each deployment task may correspond to a respective target orchestration file.
Each deployment task may be used to indicate a mapping relationship between an operating module in each target layout file and a functional module of the software to be deployed, a storage location of the functional module corresponding to each target layout file, a sequence of calling data and/or information when each target layout file is deployed, and the like, which is not limited in this embodiment of the application.
The deployment engines corresponding to the respective deployment tasks may refer to the deployment engines of the same type as the deployment engines indicated by the target orchestration files corresponding to the respective deployment tasks.
It should be noted that, since each deployment task is obtained based on each target layout file, in the case of executing each deployment task, the function module corresponding to each operation module in the software to be deployed may be deployed to the target deployment device based on the operation module corresponding to each target layout file. When all the deployment tasks are executed, all the functional modules in the software to be deployed are deployed to each target deployment device through the corresponding deployment engine, so that the purpose of deploying the software to be deployed can be achieved.
In the embodiment of the application, the initial arranging file is generated according to the configuration information corresponding to the software to be deployed. Because the initial layout file is a universal layout file which is generated according to the configuration information and can be suitable for different types of deployment engines, related technicians can deploy the file to be deployed to each resource device through different deployment engines only by developing one formatted initial layout file.
And determining at least one target deployment device from a plurality of resource devices in the software deployment system according to the configuration information, and generating an intermediate deployment file according to the initial deployment file and each target deployment device. Because each target deployment device is determined from each resource device based on the configuration information, it can be ensured that the software to be deployed can run correctly and stably after the software to be deployed is deployed to each target deployment device. In addition, the intermediate layout file comprises the resource information of each target deployment device and the initial layout file, so that the software to be deployed can be accurately deployed to each target deployment device according to the configuration information when the software to be deployed is subsequently deployed based on the intermediate layout file.
And splitting and converting the intermediate layout file based on each operation module to obtain at least one target layout file. The format of each target layout file can be identified, analyzed and processed by the corresponding deployment engine, and further, each target layout file can be processed by the corresponding deployment engine so as to deploy each function module of the software to be deployed to the corresponding target deployment device based on the operation module corresponding to each target layout file.
And generating deployment tasks according to the target layout files, and respectively executing the deployment tasks by corresponding deployment engines so as to deploy the software to be deployed to the target deployment equipment. Under the condition of executing each deployment task, the functional modules corresponding to the running modules in the software to be deployed can be deployed to the target deployment equipment based on the running modules corresponding to the target layout files, so that the purpose of deploying the software to be deployed can be achieved.
It can be understood that the function of deploying the software to be deployed by fusing multiple deployment engines can be realized only by developing one initial orchestration file, and multiple technology stacks are not required to respectively develop multiple orchestration files with repeated contents and different formats.
Therefore, the effect of improving the software deployment efficiency can be achieved.
In a possible implementation manner, referring to fig. 3, splitting and converting the intermediate layout file based on each running module to obtain at least one target layout file includes:
step 1005: and splitting at least one sub layout file from the intermediate layout file according to each operation module.
Optionally, each sub-layout file includes one running module, configuration information corresponding to the running module, and real-time resource information.
That is, each sub layout file may correspond to one run module.
The real-time resource information may refer to real-time resource information of the target deployment device corresponding to the operation module, and the real-time resource information may include a CPU resource, a memory resource, a network resource, a hard disk resource, a process number, and the like of the target deployment device corresponding to the operation module at the current time.
In addition, the sub layout file may further include information such as a hardware architecture and an operating system of the target deployment device corresponding to the running module, which is not limited in this embodiment of the present application.
Step 1006: and performing format conversion on each sub-layout file according to the deployment engine corresponding to each operation module to obtain each converted sub-layout file.
Optionally, the format of each converted sub-layout file is respectively matched with the deployment engine corresponding to each running module.
It should be noted that the operation of performing format conversion on each sub layout file may specifically refer to the operation of the conversion processing in step 1003, which is not described in detail in this embodiment of the present application.
It should be noted that, by performing format conversion on each sub layout file according to the deployment engine corresponding to each operating module, it can be ensured that the format of each sub layout file can be converted into a format that can be identified, analyzed, and processed by the deployment engine corresponding to each operating module.
Therefore, when related technical personnel develop the arrangement file for deploying the software to be deployed, only one universal initial arrangement file suitable for various different types of deployment engines needs to be developed, one arrangement file does not need to be developed for the different types of deployment engines, and the purpose of improving software deployment efficiency can be achieved.
Step 1007: and respectively taking each converted sub layout file as each target layout file.
Therefore, the format of each target layout file can be ensured to be recognized, analyzed and processed by the corresponding deployment engine, and further, each target layout file can be ensured to be processed by the corresponding deployment engine so as to deploy the operation module corresponding to each target layout file to the corresponding target deployment device.
In a possible implementation manner, referring to fig. 4, generating a deployment task according to each target orchestration file, and executing each deployment task by a corresponding deployment engine respectively includes:
step 1008: and encapsulating each target layout file, the functional module of the software to be deployed corresponding to each target layout file and the execution sequence of the functional module to obtain each deployment task.
Optionally, the execution sequence of each deployment task corresponds to the execution sequence of each functional module of the software to be deployed.
Each functional module may be code or a code segment for implementing one or more functions in the specific code of the software to be deployed.
The execution sequence of the functional modules may refer to the sequence in which the functional modules are executed under the condition that the software to be deployed operates normally.
In addition, the information such as the software parameters and the packaging time of the software to be deployed can also be packaged to obtain each deployment task. The software parameters of the software to be deployed may include a name, a version number, and the like of the software to be deployed.
It should be noted that, during the encapsulation, each function module may be read from the corresponding storage module or storage device according to the mapping relationship between the running module in each target layout file and the function module of the software to be deployed, so as to encapsulate the execution sequence of each target layout file, each function module, and each function module to obtain each deployment task.
Step 1009: determining the deployment engines corresponding to the target editing files in the deployment tasks, and distributing each deployment task to each deployment engine.
For example, if the type of the deployment engine corresponding to each running module indicated by the configuration information of the target orchestration file in the deployment task is a binary deployment engine, the deployment engine corresponding to the target orchestration file in the deployment task is an anchor tool. If the type of the deployment engine corresponding to each operating module indicated by the configuration information of the target editing file in the deployment task is a cloud native deployment engine, the deployment engine corresponding to the target editing file in the deployment task is K8s.
It should be noted that after each deployment task is distributed to each deployment engine, each deployment engine can identify, analyze and process each target layout file because each deployment task includes each target layout file, the functional module of the software to be deployed corresponding to each target layout file, and the execution sequence of the functional module. In this way, it is ensured that each target orchestration file can be accurately processed by the corresponding deployment engine after each deployment task is distributed to each deployment engine.
Step 1010: and executing the deployment tasks by the deployment engines according to the execution sequence of the deployment tasks.
In this way, when the deployment tasks are executed according to the execution sequence of the deployment tasks, the running module corresponding to each target arrangement file can deploy each functional module in the software to be deployed to the target deployment device according to the sequence of the software to be deployed for executing each functional module. And further, the software to be deployed can be ensured to run correctly and stably after the software to be deployed is deployed.
One possible way, the deployment tasks may be distributed to the deployment engines as follows:
each of the deployed tasks is pushed to a task queue.
Specifically, the pushing may be performed according to an execution sequence of each deployment task, or may be performed according to any possible sequence, which is not limited in this embodiment of the present application.
And calling each deployment engine to monitor the task queue, and acquiring the deployment tasks corresponding to each deployment engine in real time through each deployment engine.
For example, the real-time acquisition of the deployment tasks corresponding to each deployment engine by each deployment engine may refer to determining, by any deployment engine, whether the deployment engine corresponding to the target orchestration file in each deployment task is the same as any deployment engine, and if so, pulling, by any deployment engine, whether the deployment engine corresponding to the target orchestration file is the same as any deployment engine from the task queue.
In this way, each deployment task can be distributed to each deployment engine.
In one possible implementation manner, referring to fig. 5, determining at least one target deployment device from a plurality of resource devices in the software deployment system according to the configuration information includes:
step 1011: and respectively determining the matching conditions of each operation module according to the configuration information in the initial layout file.
Optionally, the matching condition may refer to an execution environment and/or a resource allocation requirement required when the execution module is executed or a functional module corresponding to the execution module is executed.
Illustratively, if the configuration information includes the running module N and the running module M, and the configuration information indicates that the running environment required by the running module N is the hardware architecture of X86 and the operating system of the Windows system, and the running environment required by the running module M is the hardware architecture of X64 and the operating system of the Windows system.
In addition, it is assumed that the configuration information indicates that the resource allocation requirement of the running module N is: 1GB memory resource, 24GB hard disk resource, 10Kb/s network resource, the configuration information indicates that the resource allocation requirement of the running module M is as follows: CPU resource of 10 megahertz, memory resource of 0.5GB, hard disk resource of 10 GB.
Then, the matching condition of the running module N may be "allocable memory resource is greater than 1GB, allocable hard disk resource is greater than 24GB, allocable network speed is greater than 10Kb/s, hardware architecture is X86 architecture, and operating system is Windows system".
The matching condition of the running module M may be that "the allocable memory resource is greater than 0.5GB, the allocable hard disk resource is greater than 10GB, the allocable CPU resource is greater than 10 mhz, the hardware architecture is an X64 architecture, and the operating system is a Windows system".
It should be understood that the above description is only an example, and does not represent that the matching conditions in the embodiments of the present application are only those listed in the embodiments of the present application, and the embodiments of the present application do not limit this.
Step 1012: determining environment information and real-time resource information of each resource device, and determining at least one device to be deployed which meets the matching condition of the running module from each resource device according to the environment information and the real-time resource information.
Optionally, the real-time resource information of each resource device includes at least one of the following: the processor resource, the memory resource, the network resource, the storage resource and the process resource of the resource device, wherein the environment information comprises at least one of the following items: the resource device comprises a hardware architecture, an operating system and a deployment engine corresponding to the resource device.
The environment information of each resource device includes at least one of: the hardware architecture, operating system, etc. of the resource device.
Each device to be deployed may be any resource device that satisfies the matching condition, which is not limited in this embodiment of the present application.
Therefore, at least one device to be deployed which can operate the functional module corresponding to each operation module can be accurately and reliably determined from each resource device.
Step 1013: and determining target deployment equipment corresponding to the operation module from the equipment to be deployed.
Optionally, the target deployment device may refer to an optimal one of the devices to be deployed.
In this way, it can be ensured that the software to be deployed can run correctly and stably after being deployed to each target deployment device.
In a possible implementation manner, determining, from each device to be deployed, a target deployment device corresponding to the operation module includes:
and determining the priority of each device to be deployed by performing weighted calculation on the real-time resource information of each device to be deployed.
Optionally, the priority of each device to be deployed may be used to indicate performance of each device to be deployed for operating the function module corresponding to the operation module. Generally, the higher the priority of each device to be deployed is, the higher the performance of each device to be deployed for operating the function module corresponding to the operating module is.
And taking the device to be deployed with the highest priority in the devices to be deployed as the target deployment device corresponding to each running module.
The priority of each device to be deployed may be specifically determined by the following method: firstly, scoring operation is respectively carried out on each device to be deployed according to each type of information in the real-time resource information.
For example, the scoring operation may be performed on the processor resource, the memory resource, the network resource, the storage resource, and the process resource of each device to be deployed, and in addition, the scoring may be performed on the hardware architecture and the operating system of each device to be deployed.
For another example, assume that two devices to be deployed, namely, a device P to be deployed and a device Q to be deployed, are determined according to the matching condition of the running module M. The allocable memory resource of the device P to be deployed is 1GB, the allocable hard disk resource is 100GB, and the allocable CPU resource is 10 mhz. The allocable memory resource of the device Q to be deployed is 2GB, the allocable hard disk resource is 50GB, and the allocable CPU resource is 20 mhz. Then the score of allocable memory resources of the device P to be deployed may be 2, the score of allocable hard disk resources may be 10, the score of allocable CPU resources may be 1, the score of allocable memory resources of the device Q to be deployed may be 4, the score of allocable hard disk resources may be 5, and the score of allocable CPU resources may be 2.
And then, carrying out weighted calculation on the scores of all types of information of the equipment to be deployed to obtain the final score value of the equipment to be deployed.
For example, assume that the weight of allocable memory resources is 0.4, the weight of allocable hard disk resources is 0.1, and the weight of allocable CPU resources is 0.5. Then, the final score value of the device to be deployed P is 0.4 × 2+0.1 × 10+0.5 × 1=2.3, and the final score value of the device to be deployed Q is 0.4 × 4+0.1 × 5+0.5 × 2=3.1.
And determining the priority of each device to be deployed according to the final scoring value of each device to be deployed.
Specifically, the priority of the device to be deployed with the largest final score value may be set to be the highest, and the priority of the device to be deployed with the smallest final score value may be set to be the lowest.
If the final scoring values of the multiple devices to be deployed are the same, the priority of each device to be deployed can be determined according to preset conditions. For example, the priorities of a plurality of devices to be deployed with the same final score value may be adjusted according to the size of the IP address. The embodiments of the present application do not limit this.
In this way, the flexibility and reliability of determining the target deployment device may be improved.
In one possible implementation manner, generating an intermediate layout file according to the initial layout file and the target deployment device includes:
and writing the real-time resource information of each target deployment device into the initial arranging file.
Optionally, the real-time resource information of each target deployment device may be written into a corresponding position in the initial orchestration file by rendering the real-time resource information of each target deployment device and the initial orchestration file.
And binding the real-time resource information of each target deployment device with each operation module in the initial layout file to obtain the intermediate layout file.
It should be noted that, by binding the real-time resource information of each target deployment device with each operation module in the initial arrangement file, the intermediate arrangement file can indicate the target deployment device corresponding to each operation module, so as to ensure that the function module corresponding to each operation module can be deployed to each target deployment device.
In a possible implementation manner, referring to fig. 6, generating an initial layout file according to configuration information corresponding to software to be deployed includes:
step 1014: and receiving the configuration information sent by the front-end equipment in the software deployment system.
Optionally, the configuration information further includes at least one of: the running environment information of the software to be deployed, the parameter information of the software to be deployed, the running module and the identifier of the deployment engine corresponding to the running module.
Optionally, the identifier of the deployment engine corresponding to the running module may be a flag used to indicate a category of the deployment engine corresponding to each running module in the software to be deployed.
For example, if the type of the deployment engine corresponding to one running module is a binary deployment engine, the identifier of the deployment engine corresponding to the running module may be set to 0. If the type of the deployment engine corresponding to one running module is the cloud-native deployment engine, the identifier of the deployment engine corresponding to the running module may be set to 1. If the type of the deployment engine corresponding to one running module is the user-defined deployment engine, the identifier of the deployment engine corresponding to the running module may be set to 2. The embodiments of the present application do not limit this.
In addition, the parameter information of the software to be deployed may be the above-mentioned specific parameter when the software to be deployed runs. The operating environment information of the software to be deployed may be the operating environment and/or the resource allocation requirement required by the software to be deployed.
The head-end apparatus may be any of the head-end apparatuses B described above.
In this way, the initial layout file can be generated accurately according to the configuration information input by the user through the front-end equipment.
Step 1015: and acquiring a preset arranging template, and writing each configuration information into the preset arranging template to obtain the initial arranging file.
Alternatively, the preset layout template may be a file template designed by the user according to actual needs for writing the configuration information and/or the real-time resource information of each target deployment device.
The preset arranging template can be a blank template, or a template in which the types of the configuration information and/or the types of the real-time resource information are written in advance.
In addition, the format of the preset layout template may be any one of the specific formats described above that can be processed by the deployment server. The preset layout template may also be any template that can be converted into a format that can be recognized by a binary deployment engine or a cloud native deployment engine, which is not limited in the embodiment of the present application.
Since the preset layout template is a template capable of converting formats, the initial layout file generated based on the preset layout template and the configuration information can be suitable for universal layout files of different types of deployment engines, so that only related technicians develop one formatted initial layout file, and then the initial layout file is converted into formats which can be processed by different deployment engines in the subsequent deployment process, so that the file to be deployed can be deployed to each resource device through the different deployment engines, and the effect of improving the software deployment efficiency can be achieved.
The following describes a device, an apparatus, a computer-readable storage medium, and the like for executing the software deployment method provided by the present application, and specific implementation procedures and technical effects thereof are referred to above, and are not described again below.
Fig. 7 is a schematic structural diagram of a software deployment apparatus provided in an embodiment of the present application, and referring to fig. 7, the apparatus includes:
the generating module 201 is configured to generate an initial layout file according to configuration information corresponding to software to be deployed.
The initial layout file comprises at least one operation module, and each operation module corresponds to one deployment engine respectively.
A determining and generating module 202, configured to determine at least one target deployment device from the multiple resource devices in the software deployment system according to the configuration information, and generate an intermediate orchestration file according to the initial orchestration file and each target deployment device.
The splitting and converting module 203 is configured to split and convert the intermediate layout file based on each running module to obtain at least one target layout file.
And the format of each target layout file is respectively matched with the deployment engine corresponding to each operation module.
The executing module 204 is configured to generate deployment tasks according to the target orchestration files, and respectively execute the deployment tasks by the corresponding deployment engines, so as to deploy the software to be deployed to the deployment device.
The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. As another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present application. Referring to fig. 8, the computer apparatus includes: a memory 301 and a processor 302, wherein the memory 301 stores a computer program operable on the processor 302, and the processor 302 executes the computer program to implement the steps of any of the above-mentioned method embodiments.
The embodiments of the present application also provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
Optionally, the present application also provides a program product, such as a computer-readable storage medium, comprising a program which, when executed by a processor, is adapted to perform any of the software deployment method embodiments described above.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a portable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made to the present application by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A software deployment method is applied to a deployment server in a software deployment system, and comprises the following steps:
generating an initial arrangement file according to configuration information corresponding to software to be deployed, wherein the initial arrangement file comprises at least one operation module, and each operation module corresponds to one deployment engine respectively;
determining at least one target deployment device from a plurality of resource devices in the software deployment system according to the configuration information, and generating an intermediate deployment file according to the initial deployment file and each target deployment device;
splitting and converting the intermediate layout file based on each operation module to obtain at least one target layout file, wherein the format of each target layout file is respectively matched with a deployment engine corresponding to each operation module;
and generating deployment tasks according to the target editing files, and respectively executing the deployment tasks by corresponding deployment engines so as to deploy the software to be deployed to the target deployment equipment.
2. The software deployment method according to claim 1, wherein the performing, based on each of the operation modules, a splitting conversion process on the intermediate layout file to obtain at least one target layout file includes:
splitting at least one sub layout file from the intermediate layout file according to each operation module, wherein each sub layout file comprises one operation module, configuration information and real-time resource information corresponding to the operation module;
format conversion is carried out on the sub layout files according to the deployment engines corresponding to the operation modules respectively to obtain converted sub layout files, and the formats of the converted sub layout files are matched with the deployment engines corresponding to the operation modules respectively;
and respectively taking each converted sub layout file as each target layout file.
3. The software deployment method according to claim 1, wherein the generating a deployment task according to each of the target orchestration files, and executing each of the deployment tasks by a corresponding deployment engine respectively comprises:
packaging each target layout file, the functional module of the software to be deployed corresponding to each target layout file and the execution sequence of the functional module to obtain each deployment task, wherein the execution sequence of each deployment task corresponds to the execution sequence of each functional module of the software to be deployed;
determining deployment engines corresponding to target editing files in the deployment tasks, and distributing each deployment task to each deployment engine;
executing, by each of the deployment engines, each of the deployment tasks in an execution order of each of the deployment tasks.
4. The software deployment method of claim 1, wherein the determining at least one target deployment device from among a plurality of resource devices in the software deployment system according to the configuration information comprises:
respectively determining the matching conditions of the operation modules according to the configuration information in the initial layout file;
determining environment information and real-time resource information of each resource device, and determining at least one device to be deployed which meets the matching condition of the operating module from each resource device according to the environment information and the real-time resource information;
determining target deployment equipment corresponding to the operation module from each equipment to be deployed;
wherein the real-time resource information comprises at least one of: processor resources, memory resources, network resources, storage resources, and process resources of the resource device, where the environment information includes at least one of: and the hardware architecture, the operating system and the deployment engine correspond to the resource equipment.
5. The software deployment method according to claim 4, wherein the determining, from each of the devices to be deployed, a target deployment device corresponding to the operation module includes:
determining the priority of each device to be deployed by performing weighted calculation on the real-time resource information of each device to be deployed;
and taking the device to be deployed with the highest priority in the devices to be deployed as the target deployment device corresponding to each running module.
6. The software deployment method of claim 4, wherein generating an intermediate orchestration file from the initial orchestration file and the target deployment device comprises:
writing the real-time resource information of each target deployment device into the initial layout file;
and binding the real-time resource information of each target deployment device with each operation module in the initial layout file to obtain the intermediate layout file.
7. The software deployment method of any one of claims 1 to 6, wherein the generating an initial orchestration file according to the configuration information corresponding to the software to be deployed comprises:
receiving the configuration information sent by a front-end device in the software deployment system, wherein the configuration information includes at least one of the following items: the running environment information of the software to be deployed, the parameter information of the software to be deployed, the running module and the identifier of a deployment engine corresponding to the running module;
and acquiring a preset arranging template, and writing the configuration information into the preset arranging template to obtain the initial arranging file.
8. A software deploying apparatus, characterized in that the apparatus comprises:
the system comprises a generation module, a deployment engine and a scheduling module, wherein the generation module is used for generating an initial arrangement file according to configuration information corresponding to software to be deployed, the initial arrangement file comprises at least one operation module, and each operation module corresponds to one deployment engine;
the determining and generating module is used for determining at least one target deployment device from a plurality of resource devices in the software deployment system according to the configuration information, and generating an intermediate arrangement file according to the initial arrangement file and each target deployment device;
the splitting and converting module is used for splitting and converting the intermediate layout file based on each operating module to obtain at least one target layout file, and the format of each target layout file is respectively matched with the deployment engine corresponding to each operating module;
and the execution module is used for generating deployment tasks according to the target editing files, and respectively executing the deployment tasks by corresponding deployment engines so as to deploy the software to be deployed to the deployment equipment.
9. A computer device, comprising: memory, a processor, in which a computer program is stored that is executable on the processor, the processor implementing the steps of the method of any of the preceding claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202211534115.XA 2022-12-01 2022-12-01 Software deployment method, device, computer equipment and computer-readable storage medium Pending CN115794128A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211534115.XA CN115794128A (en) 2022-12-01 2022-12-01 Software deployment method, device, computer equipment and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211534115.XA CN115794128A (en) 2022-12-01 2022-12-01 Software deployment method, device, computer equipment and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN115794128A true CN115794128A (en) 2023-03-14

Family

ID=85444704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211534115.XA Pending CN115794128A (en) 2022-12-01 2022-12-01 Software deployment method, device, computer equipment and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN115794128A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116126365A (en) * 2023-04-18 2023-05-16 之江实验室 Model deployment method, system, storage medium and electronic equipment
CN116909582A (en) * 2023-09-13 2023-10-20 云账户技术(天津)有限公司 Visual large-screen service deployment method and device and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116126365A (en) * 2023-04-18 2023-05-16 之江实验室 Model deployment method, system, storage medium and electronic equipment
CN116909582A (en) * 2023-09-13 2023-10-20 云账户技术(天津)有限公司 Visual large-screen service deployment method and device and electronic equipment
CN116909582B (en) * 2023-09-13 2024-01-30 云账户技术(天津)有限公司 Visual large-screen service deployment method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN109933522B (en) Test method, test system and storage medium for automatic case
CN115794128A (en) Software deployment method, device, computer equipment and computer-readable storage medium
CN107493310B (en) Cloud resource processing method and cloud management platform
US20210149668A1 (en) System and method for generating documentation for microservice based applications
EP2933726B1 (en) Apparatus, system and method for application log data processing
US20180288143A1 (en) Managing idle and active servers in cloud data centers
CN107678752A (en) A kind of task processing method and device towards isomeric group
CN111679886A (en) Heterogeneous computing resource scheduling method, system, electronic device and storage medium
CN111651140B (en) Service method and device based on workflow
CN107025146B (en) A kind of document generating method, device and system
CN112313627A (en) Mapping mechanism of events to serverless function workflow instances
CN111078553B (en) Data development task testing method and device, computer equipment and storage medium
Scotece et al. 5g-kube: Complex telco core infrastructure deployment made low-cost
CN109327321A (en) Network model business executes method, apparatus, SDN controller and readable storage medium storing program for executing
CN108829383A (en) A kind of data processing method and device of interface separation
CN103309676A (en) Web service encapsulation method and system for ocean numerical modeling regional ocean modeling system (ROMS)
CN113434146A (en) Code compiling method, device, storage medium and electronic device
CN113268362A (en) Operation and maintenance method, device and equipment based on server-free platform and storage medium
KR20190069637A (en) Charging method and system in multi cloud in the same way
CN108427599A (en) Method, apparatus and storage medium is uniformly processed in asynchronous task
CN115794386A (en) Resource calling method and device of virtual machine and storage medium
CN103294874A (en) Web service packaging method and system for FEKO of electromagnetic simulation computing system
CN103530091A (en) Method and device for implementing task of calculating CPMD (car-Parrinello molecular dynamics simulations)
CN113485942A (en) Automatic testing method and device based on independent module
CN113900811A (en) Event-driven task scheduling method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination