Software deployment method and apparatus

By receiving software deployment requests in the cloud platform, identifying service components, deploying the software on multiple servers, and setting up communication relationships, the problem of high deployment difficulty and low efficiency in traditional software deployment models is solved, enabling fast and reliable software deployment and upgrades in the cloud environment.

CN115951901BActive Publication Date: 2025-12-09BEIJING FOUNDER ELECTRONICS CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111171659.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-08
Publication Date
2025-12-09
Estimated Expiration
2041-10-08

AI Technical Summary

Technical Problem

Traditional software deployment models suffer from high deployment difficulty and low efficiency in cloud environments. Especially in the era of cloud computing, how to quickly deploy, manage, and upgrade software applications is a key challenge.

Method used

A software deployment method and apparatus are provided, which receive software deployment requests in a cloud platform, determine service components and deploy software in multiple servers, set communication relationships between components, and deploy service components in containers, supporting software upgrade processing.

Benefits of technology

It improves the efficiency of software deployment, enabling fast and reliable software deployment and upgrades on the cloud platform, thus meeting user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115951901B_ABST
    Figure CN115951901B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a software deployment method and device, the method comprises the following steps: receiving a software deployment request sent by a first client, the software deployment request is used for requesting to deploy first software in a cloud platform; determining at least one service component corresponding to the first software and at least one target server in a plurality of servers according to the software deployment request; and deploying the first software in the at least one target server according to the at least one service component. Wherein, the software deployment system receives the software deployment request sent by the first client to realize the deployment of the first software, determines at least one service component required by the first software according to the software deployment request, and deploys the at least one service component required by the first software in the servers of the cloud platform, that is, the first software application can be provided for the first client, and the efficiency of software deployment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of cloud computing, and in particular to a software deployment method and device. BACKGROUND

[0002] After entering the era of cloud computing, application software is transformed from monolithic architecture to microservice architecture, and is deployed and delivered in a cloud-native microservice architecture. How to quickly deploy, manage and upgrade software applications is a key problem to be solved at present.

[0003] In the traditional mode, an enterprise first proposes its business requirements, and a software developer develops software according to the business requirements of the enterprise and deploys, debugs, installs, upgrades and maintains the software on site.

[0004] However, the software deployment process in the traditional mode is huge in engineering and takes a long time to complete, and subsequent debugging, maintenance and upgrading require huge and continuous cost input. Therefore, the software deployment in the traditional mode is not suitable for a cloud environment, and there is a problem of great difficulty and low efficiency in software deployment. SUMMARY

[0005] The present application provides a software deployment method and device to solve the problem of great difficulty and low efficiency in software deployment.

[0006] In a first aspect, the present application provides a software deployment method applied to a software deployment system in a cloud platform, wherein the cloud platform includes a plurality of servers, and the method comprises:

[0007] receiving a software deployment request sent by a first client, wherein the software deployment request is used to request to deploy a first software in the cloud platform;

[0008] determining at least one service component corresponding to the first software and at least one target server in the plurality of servers according to the software deployment request;

[0009] deploying the first software in the at least one target server according to the at least one service component.

[0010] In a possible design, the deploying the first software in the at least one target server according to the at least one service component comprises:

[0011] deploying the at least one service component to the at least one target server;

[0012] determining a communication relationship between the at least one service component;

[0013] According to the communication relationship, a communication interface between the at least one service component is set, and the communication interface is set between two service components having the communication relationship;

[0014] An entry service component is determined in the at least one service component.

[0015] In a possible design, the deploying the at least one service component to the at least one target server comprises:

[0016] A target server corresponding to each service component is determined.

[0017] For any one service component, a first container corresponding to the service component is determined in the target server corresponding to the service component, and the service component is deployed in the first container.

[0018] In a possible design, the determining the communication relationship between the at least one service component comprises:

[0019] A target server corresponding to each service component is determined.

[0020] It is determined that service components located in a same target server have the communication relationship.

[0021] A target service component in each target server is determined, and it is determined that target service components in two target servers having the communication relationship have the communication relationship.

[0022] In a possible design, the software deployment request comprises identification of the M service components and a component quantity of each service component; and according to the software deployment request, the at least one service component corresponding to the first software is determined, which comprises:

[0023] It is determined that the component quantity of the ith service component is N i , the i is an integer, 1≤i≤M, and the N i is an integer greater than or equal to 1.

[0024] The at least one service component corresponding to the first software comprises service components.

[0025] In a possible design, the software deployment request comprises a first component identification; and the entry service component is determined in the at least one service component, which comprises:

[0026] A component quantity corresponding to the first component identification is acquired.

[0027] If the number of components corresponding to the first component identifier is 1, the service component corresponding to the first component identifier in the at least one service component is determined as the entry service component;

[0028] If the number of components corresponding to the first component identifier is greater than 1, the entry service component is determined according to the remaining resource amount of the target server on which the service component corresponding to the first component identifier is located.

[0029] In a possible design, after the service component is deployed in the first container corresponding to the service component, the method further includes:

[0030] obtaining a software upgrade request sent by the first client, the software upgrade request including an identifier of the first software and an identifier of a service component to be upgraded, the service component to be upgraded being a newly-added service component or an updated service component;

[0031] performing upgrade processing on the first software according to the software upgrade request.

[0032] In a possible design, the service component to be upgraded is a newly-added service component; and performing upgrade processing on the first software according to the software upgrade request includes:

[0033] obtaining the newly-added service component;

[0034] determining a first server corresponding to the newly-added service component in the plurality of servers;

[0035] determining a second container corresponding to the newly-added service component in the first server, and deploying the newly-added service component in the second container.

[0036] In a possible design, the service component to be upgraded is an updated service component; and performing upgrade processing on the first software according to the software upgrade request includes:

[0037] obtaining the updated service component;

[0038] determining a second server corresponding to the updated service component in the plurality of servers;

[0039] determining a third container corresponding to the updated service component in the second server, and deploying the updated service component in the third container;

[0040] determining an existing service component corresponding to the updated service component, and deleting the existing service component in the cloud platform, the existing service component and the updated service component having the same component identifier.

[0041] In a second aspect, the present application provides a software deployment apparatus, including:

[0042] receive a software deployment request sent by a first client, the software deployment request being used to request to deploy a first software in the cloud platform;

[0043] determine at least one service component corresponding to the first software and at least one target server in the plurality of servers according to the software deployment request;

[0044] deploy the first software in the at least one target server according to the at least one service component.

[0045] In a possible design, the processing module is specifically configured to:

[0046] deploy the at least one service component to the at least one target server;

[0047] determine a communication relationship between the at least one service component;

[0048] set a communication interface between the at least one service component according to the communication relationship, and the communication interface is set between two service components having the communication relationship;

[0049] determine an entry service component in the at least one service component.

[0050] In a possible design, the processing module is specifically configured to:

[0051] determine a target server corresponding to each service component;

[0052] for any one service component, determine a first container corresponding to the service component in the target server corresponding to the service component, and deploy the service component in the first container.

[0053] In a possible design, the processing module is specifically configured to:

[0054] determine a target server corresponding to each service component;

[0055] determine that service components located in a same target server have a communication relationship;

[0056] determine a target service component in each target server, and determine that target service components in two target servers having the communication relationship have the communication relationship.

[0057] In a possible design, the software deployment request includes an identifier of the M service components and a component quantity of each service component; and the determining module is specifically configured to:

[0058] determining a component number of the ith service component as N i , the i is an integer, 1≤i≤M, the N i is an integer greater than or equal to 1;

[0059] determining that the at least one service component corresponding to the first software comprises service components.

[0060] In a possible design, the software deployment request comprises a first component identifier; and the processing module is specifically configured to:

[0061] obtain a component number corresponding to the first component identifier;

[0062] if the component number corresponding to the first component identifier is 1, determining a service component corresponding to the first component identifier in the at least one service component as the entry service component;

[0063] if the component number corresponding to the first component identifier is greater than 1, determining the entry service component according to a remaining resource amount of a target server on which the service component corresponding to the first component identifier is located.

[0064] In a possible design, the processing module is specifically configured to:

[0065] obtain a software upgrade request sent by the first client, the software upgrade request comprising an identifier of the first software and an identifier of a service component to be upgraded, the service component to be upgraded being a new service component or an updated service component;

[0066] perform an upgrade process on the first software according to the software upgrade request.

[0067] In a possible design, the processing module is specifically configured to:

[0068] obtain the new service component;

[0069] determine a first server corresponding to the new service component in the plurality of servers;

[0070] determine a second container corresponding to the new service component in the first server, and deploy the new service component in the second container.

[0071] In a possible design, the processing module is specifically configured to:

[0072] obtain the updated service component;

[0073] determine a second server corresponding to the updated service component in the plurality of servers;

[0074] determine a third container corresponding to the update service component in the second server, and deploy the update service component in the third container;

[0075] determine an existing service component corresponding to the update service component, and delete the existing service component in the cloud platform, the component identifier of the existing service component being same as that of the update service component.

[0076] In a third aspect, the present application provides a software deployment device, comprising:

[0077] a memory configured to store a program;

[0078] a processor configured to execute the program stored in the memory, and when the program is executed, the processor is configured to execute the method in the first aspect and any possible design of the first aspect.

[0079] In a fourth aspect, the present application provides a computer readable storage medium, comprising instructions, when the instructions are executed on a computer, the computer is caused to execute the method in the first aspect and any possible design of the first aspect.

[0080] In a fifth aspect, the present application provides a computer program product, the program product comprising: a computer program stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to cause the electronic device to execute the method in the first aspect and any possible design of the first aspect.

[0081] The present application provides a software deployment method and device, the method comprising: receiving a software deployment request sent by a first client, the software deployment request being used to request to deploy a first software in a cloud platform. According to the software deployment request, determining at least one service component corresponding to the first software, and determining at least one target server in a plurality of servers. According to the at least one service component, deploying the first software in the at least one target server. Wherein, the software deployment system receives the software deployment request sent by the first client to realize the deployment of the first software, determines at least one service component required by the first software according to the software deployment request, and deploys the at least one service component required by the first software in the servers of the cloud platform, that is, the first software application can be provided for the first client, which improves the efficiency of software deployment. BRIEF DESCRIPTION OF DRAWINGS

[0082] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0083] Figure 1 An application scenario provided by the present application

[0084] Figure 2 The flow of the software deployment method provided by the embodiments of the present application Figure 1 ;

[0085] Figure 3 The flow of the software deployment method provided by the embodiments of the present application Figure 2 ;

[0086] Figure 4 The schematic diagram of storing each service component in the corresponding target server provided by the embodiments of the present application

[0087] Figure 5 The schematic diagram of establishing the communication relationship between the service components provided by the embodiments of the present application Figure 1 ;

[0088] Figure 6 The schematic diagram of establishing the communication relationship between the service components provided by the embodiments of the present application Figure 2 ;

[0089] Figure 7 The flow of the software deployment method provided by the embodiments of the present application Figure 3 ;

[0090] Figure 8 The structural schematic diagram of the software deployment device provided by the embodiments of the present application

[0091] Figure 9 The hardware structural schematic diagram of the software deployment device provided by the embodiments of the present application

[0092] Through the above drawings, the specific embodiments of the present application have been shown, and more detailed description will be given hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application by any means, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0093] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of the present application.

[0094] It should be noted that in this document, the terms "comprising", "containing" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or device that includes the element.

[0095] In order to facilitate the understanding of the technical solutions of the present application, the related concepts, background art, prior art, technical problems existing in the prior art and technical concepts of the present application are introduced as follows:

[0096] Cloud computing service realizes that the hardware, software and data required by individuals and enterprises are put on the network, and are connected to each other at any time and place using different electronic devices to achieve the purpose of access and operation. By distributing computing on a large number of distributed computers instead of local computers or remote servers, the required storage and operation capabilities are provided for individuals or enterprises. After entering the era of cloud computing, application software is transformed from monolithic architecture to microservice architecture, and is deployed and delivered in a cloud-native microservice architecture. How to quickly deploy, manage and upgrade software applications is the key problem to be solved at present.

[0097] In the traditional mode, the enterprise first proposes its business requirements, and the software developer develops software according to the business requirements of the enterprise and deploys, debugs, installs, upgrades and maintains on site.

[0098] However, the software deployment process in the traditional mode is huge in engineering, takes a long time to complete, and requires huge and continuous cost investment for subsequent debugging, maintenance and upgrading. Therefore, the software deployment mode in the traditional mode is not suitable for cloud environment, and there is a problem of large software deployment difficulty and low efficiency.

[0099] Based on the above problems, the present application proposes the following technical concept: based on the cloud computing service mode, the inventor considers providing corresponding software deployment, upgrading and other services for individual, enterprise and other users on the basis of cloud computing services. Specifically, a software deployment system is considered to be established on the cloud computing server side, and a plurality of software corresponding service components are stored in the software deployment system. Among them, the service component can be used to indicate a plurality of microservices corresponding to the software. In this way, once the user makes a software deployment request, the software deployment system deploys the service components required by the software corresponding to the software request on the cloud computing server for the user to realize the deployment of the software required by the user, so that the user can obtain software services through cloud computing services. At the same time, when the user makes a software upgrade request, the software deployment system can upgrade the software required by the user according to the software upgrade request of the user to meet the software upgrade request of the user, so that the user can obtain the upgraded version of the service through the cloud computing service. Therefore, the efficiency of software deployment is improved.

[0100] Next, combined with Figure 1 , a kind of application scenarios of the embodiment of the present application is introduced, Figure 1 a kind of application scenarios provided by the present application.

[0101] Please refer to Figure 1 , including cloud server, enterprise user terminal and individual user terminal. Among them, software deployment system is arranged in the cloud server. As Figure 1 indicated, the enterprise user terminal sends a software deployment request to the cloud server, and the software deployment system in the cloud server deploys corresponding software for the enterprise user in the cloud server according to the software deployment request. In addition, the individual user terminal sends a software upgrade request to the cloud server, and the software deployment system upgrades the software required by the individual user in the software deployed on the cloud server side according to the software upgrade request to meet the needs of the individual user for software upgrade processing.

[0102] Next, through specific embodiments, the technical solutions shown by the present application are described in detail. It should be noted that the following examples can exist independently, or can be combined with each other, and the same or similar contents are not repeated in different embodiments.

[0103] Based on the above-mentioned technical concept, the software deployment method provided by the present application will be described in detail below in combination with Figure 2 and specific embodiments, Figure 2 the flow of the software deployment method provided by the embodiment of the present application Figure 1 .

[0104] As Figure 2 indicated, the method comprises:

[0105] S201, receiving a software deployment request sent by a first client, the software deployment request being used to request to deploy a first software in a cloud platform.

[0106] The execution subject of the embodiments of the present application can be a software deployment system in the cloud platform.

[0107] In the embodiments, the first client refers to a device terminal used by an individual user or an enterprise user of the cloud platform. The electronic device can be a computer, a mobile phone, a tablet, or any other electronic device that can communicate with the cloud platform.

[0108] After the first client establishes communication with the cloud platform, the first client can send a software deployment request to the cloud platform. The software deployment request is used to request to deploy software for the first user terminal in the cloud platform. The software deployment request includes the software name of the requested deployment software, the service components required by the requested deployment software, and the required number of each service component. The service component can be, for example, a micro-service component corresponding to the software.

[0109] It should be noted that the micro-service architecture mainly decomposes the middle layer, and splits a large application into many small applications, i.e., each small application is a micro-service. The micro-service can be deployed on different servers or different containers. The advantage of this micro-service architecture is that when one micro-service fails, it will not affect other micro-services, or the load of one micro-service will not affect other applications. A micro-service code only focuses on a specific business function, so the micro-service business is clear and the code amount is small. Therefore, the deployment and maintenance of the micro-service are relatively simple.

[0110] For example, the deployment system of the cloud platform receives a software deployment request including the software name of the required deployment software as software A, and the service components required by the software A include five service components, i.e., service component a, service component b, service component c, service component d, and service component e. The deployment system also receives the corresponding deployment number of each of the five service components. For example, the required deployment number of each of the five service components is 3, 2, 4, 6, and 3, respectively. That is, to implement the software corresponding to the software deployment request, 3 service component a, 2 service component b, 4 service component c, 6 service component d, and 3 service component e need to be deployed.

[0111] S202, determining at least one service component corresponding to the first software according to the software deployment request, and determining at least one target server in a plurality of servers.

[0112] Based on the above step S201, taking the software name of the requested deployment software, the required service components of the requested deployment software, and the required number of each service component as an example, the specific implementation of the software deployment according to the software deployment request is introduced.

[0113] Next, a possible implementation of determining at least one service component corresponding to the first software is described.

[0114] In a possible implementation, various service components are stored in the software deployment system. According to the software deployment request, the software deployment system first finds the required service components from the stored various service components. Taking the software deployment request in step S201 as an example, the first software in the software deployment request is software A, the required service components of the first software include five, and the five service components are service component a, service component b, service component c, service component d, and service component e. In addition, the required deployment numbers of the five service components are 3, 2, 4, 6, and 3 respectively. Therefore, the software deployment system finds service component a, service component b, service component c, service component d, and service component e from the stored various service components. Then, according to the required deployment number of each service component, each service component is deployed, that is, at least one service component corresponding to the first software is determined. Among them, only one of the multiple same service components at the same time is in a normal working state, and the other same service components are in a standby state. It should be noted that when the other same service components are in a standby state, the running data and other information of the service component in a normal working state can be synchronized and stored on the service component itself at regular intervals. This can effectively ensure that when the service component in a normal working state fails, or the server where the service component in a normal working state is located fails or the available resources are too low, a service component can be selected from the other same service components to immediately enter a normal working state, which ensures the normal operation of the software application.

[0115] It should be noted that the software deployment system needs to determine the target server for each service component.

[0116] Next, a possible implementation of determining at least one target server in multiple servers is described.

[0117] In a possible implementation, the software deployment system obtains resource availability of each server. The resource availability of each server is a ratio of the available resources of the server to the total resources of the server. According to the resource availability of each server, a corresponding target server is determined for each service component. It should be noted that the memory size occupied by each service component, the resource size required for running, and the memory size occupied by the data generated by running can be the same or different, and no limitation is made in this regard. For example, in the process of determining the stored server for each service component, for any one of the plurality of servers, it can be determined whether the service component is stored in the server by judging whether the resource availability of the server is greater than or equal to a preset threshold. Specifically, if the resource availability of the server is greater than or equal to the preset threshold, it is determined that the service component can be stored in the server; if the resource availability of the server is less than the preset threshold, it is determined that the service component cannot be stored in the server.

[0118] S203, deploying the first software in the at least one target server according to the at least one service component.

[0119] Based on the step S202, the at least one service component corresponding to the first software is determined, and the at least one target server in the plurality of servers is determined. Next, the at least one service component corresponding to the first software is deployed in the at least one target server, so as to realize the successful deployment of the first software.

[0120] In a possible implementation, each service component is deployed in the target server corresponding to the service component. Through the interface, the service components corresponding to the first software are connected two by two, so that the at least one service component corresponding to the first software can work normally, that is, the service components corresponding to various functions of the first software can work normally, that is, the successful deployment of the first software is realized.

[0121] The software deployment method provided by the embodiment of the present application comprises the following steps: receiving a software deployment request sent by a first client, the software deployment request being used to request to deploy a first software in a cloud platform. According to the software deployment request, at least one service component corresponding to the first software is determined, and at least one target server in a plurality of servers is determined. According to the at least one service component, the first software is deployed in the at least one target server. In the method, the software deployment system receives the software deployment request sent by the first client to realize the deployment of the first software, determines at least one service component required by the first software according to the software deployment request, and deploys the at least one service component required by the first software in the servers of the cloud platform, that is, the first software application can be provided for the first client, which improves the efficiency of software deployment.

[0122] On the basis of the above embodiments, the software deployment method provided by the present application is further introduced below in combination with a specific embodiment. Figure 3 is introduced, Figure 3 the flow of the software deployment method provided by the embodiment of the present application Figure 2 .

[0123] As Figure 3 shown, the method comprises:

[0124] S301, receiving a software deployment request sent by a first client, the software deployment request being used to request to deploy first software in a cloud platform.

[0125] The implementation manner of step S301 is similar to that of step S201, and thus is not described herein again.

[0126] S302, determining that the component quantity of an ith service component is N i , i is an integer, 1≤i≤M, and N i is an integer greater than or equal to 1.

[0127] S303, determining that at least one service component corresponding to the first software comprises service components.

[0128] Next, step S302 and step S303 are introduced together.

[0129] In the embodiment, the software deployment system obtains a software deployment request from a first client, and the software deployment request comprises the identification of M service components and the component quantity required by each service component.

[0130] For example, the service components required by the first software comprise five service components, which are service component a, service component b, service component c, service component d, and service component e. Meanwhile, the deployment quantity of the five service components is 3, 2, 4, 6, and 3 respectively. Therefore, the first service component is service component a, and the component quantity of the first service component is N1=3; the second service component is service component b, and the component quantity of the first service component is N2=2; the third service component is service component c, and the component quantity of the first service component is N3=4; the fourth service component is service component d, and the component quantity of the first service component is N4=6; and the fifth service component is service component e, and the component quantity of the first service component is N5=3.

[0131] On the basis of determining the service components required by the first software and the component quantity corresponding to each service component, next, the total quantity of the service components corresponding to the first software is determined.

[0132] On the basis of the above examples, the at least one service component corresponding to the first software is determined according to the service components required by the first software and the number of service components corresponding to each service component.

[0133] The total number of service components included in the at least one service component corresponding to the first software is N1+N2+N3+N4+N5=18.

[0134] S304, according to the software deployment request, determining the at least one service component corresponding to the first software and determining at least one target server in the plurality of servers.

[0135] Wherein, the implementation of step S304 is similar to that in step S202, which will not be repeated here.

[0136] S305, determining the target server corresponding to each service component.

[0137] S306, for any one service component, determining the first container corresponding to the service component in the target server corresponding to the service component, and deploying the service component in the first container.

[0138] Next, step S305 and step S306 are described together.

[0139] Next, a possible implementation of determining at least one target server in a plurality of servers is described.

[0140] In a possible implementation, the software deployment system obtains the resource availability of each server. Wherein, the resource availability of each server is the ratio of the available resources of the server to the total number of all resources of the server. According to the resource availability of each server, the target server corresponding to the service component is determined. It should be noted that the memory size occupied by each service component, the resource size required for running and the memory size occupied by the data generated by running can be different or different, which is not limited. For example, in the process of determining the stored server for each service component, for any one of the plurality of servers, it can be determined whether to store the service component in the server by judging whether the resource availability of the server is greater than or equal to the preset threshold. Specifically, if the resource availability of the server is greater than or equal to the preset threshold, it is determined that the service component can be stored in the server; if the resource availability of the server is less than the preset threshold, it is determined that the service component cannot be stored in the server.

[0141] In the field of computer, the container refers to a series of processes separated from other parts of the system.

[0142] In a possible implementation, for each service component, a container corresponding to the service component is set in the target server corresponding to the service component, that is, a first container corresponding to the service component is set in the target server corresponding to the service component; after the first container is set in the target server corresponding to the service component, the service component is deployed in the first container corresponding to the service component.

[0143] In the following, the possible implementation is further introduced in combination with Figure 4 and Figure 4 specific examples, Figure 4 a schematic diagram provided by the embodiments of the present application for storing each service component in the target server corresponding to the service component.

[0144] Referring to Figure 4 , according to the resource availability of each target server, the target server corresponding to each service component is determined. As shown in Figure 5 , the target servers determined for the three service components a are target server 1, target server 3 and target server 5 respectively; the target servers determined for the two service components b are target server 2 and target server 6 respectively; the target servers determined for the four service components c are target server 2, target server 3, target server 5 and target server 6 respectively; the target servers determined for the six service components d are target server 1, target server 2, target server 3, target server 4 and target server 5 respectively; the target servers determined for the three service components e are target server 3, target server 4 and target server 5 respectively.

[0145] S307, determine that the service components located in the same target server have a communication relationship.

[0146] Based on the above steps S305 and S306, the target server corresponding to each service component is determined, and the service component is deployed in the first container corresponding to the service component. It should be noted that there is a case that multiple service components are deployed in the same target server.

[0147] In the following, an example is taken that each service component in step S303 is stored in the target server corresponding to the service component, and the possible implementation of determining that the service components located in the same target server have a communication relationship is exemplarily described.

[0148] In a possible implementation, first, the target server in which each service component in the first software is deployed is determined. Next, for each target server, it is considered that among at least one service component of the first software deployed in the target server, a communication relationship is established between the two service components closest to each other.

[0149] In the following, the possible implementation is further introduced in combination with Figure 5 andFigure 1 The possible implementation manners are described through a specific example, Figure 4 The schematic for establishing the communication relationship between the service components is provided for the embodiment of the present application Figure 5 .

[0150] For example, according to Figure 5 The specific conditions of the service components of the first software deployed in each target server can be determined. Specifically, in the target server 1, the service component a and the service component d are deployed; in the target server 2, the service component b, the service component c and the service component d are deployed; in the target server 3, the service component a, the service component d and the service component e are deployed; in the target server 4, the service component c, the service component d and the service component e are deployed; in the target server 4, the service component a, the service component d and the service component e are deployed; in the target server 5, the service component a, the service component c, the service component d and the service component e are deployed; in the target server 6, the service component b, the service component c and the service component d are deployed. Next, refer to Figure 6 The communication relationship between the service components in each target server is determined. As shown in Figure 6 In the target server 1, the communication relationship is established between the service component a and the service component d to realize the mutual communication between the service components in the target server. In the target server 2, the communication relationship is established between the service component b and the service component d, and the communication relationship is established between the service component d and the service component c to realize the mutual communication between the service components in the target server 2. In the target server 3, the communication relationship is established between the service component e and the service component a, and the communication relationship is established between the service component a and the service component d to realize the mutual communication between the service components in the target server 3. Similarly, the communication relationship between the service components in the target server 4, the target server 5 and the target server 6 is determined, which is not described herein.

[0151] S308, determining the target service components in each target server, and determining that the target service components in two target servers having the communication relationship have the communication relationship.

[0152] The step S307 is a method for determining the communication relationship between the service components in the same target server. Next, the communication relationship between the service components deployed in different target servers is established to establish the communication relationship between the service components in different target servers. The target service component is determined in each service component. If there is one service component in the target server, the service component is the target service component. If there are two or more service components in the target server, one of the service components is determined as the target service component, and one of the remaining service components is selected as the target service component. If there are two or more service components in the target server, two target service components need to be determined in the target server.

[0153] Next, the possible implementation manners are described in combination with Figure 2 and Figure 6 specific examples, Figure 6 the schematic diagram for establishing the communication relationship between the service components provided by the embodiments of the present application is provided. Figure 7 .

[0154] Referring to Figure 7 , the target server 2, the target server 3, and the target server 4 are taken as examples for description. In the target server 2, the service component b is the target service component, and the service component c is the target service component. In the target server 3, the service component e is the target service component, and the service component d is the target service component. In the target server 4, the service component c is the target service component, and the service component e is the target service component. Then, as shown in Figure 3 , the communication relationship between the service component c in the target server 2 and the service component d in the target server 3 is established, and the communication relationship between the service component e in the target server 3 and the service component c in the target server 4 is established, to realize the communication between the service components in the target servers 2, 3, and 4.

[0155] S309, according to the communication relationship, a communication interface between at least one service component is set, and the two service components having the communication relationship have the communication interface.

[0156] Based on the step S307 and the step S308, it is determined that the service components in the same target server have the communication relationship, and it is determined that the target service components in the two target servers having the communication relationship have the communication relationship.

[0157] Next, according to the communication relationship between the service components, a possible implementation manner for setting the communication interface between at least one service component is described.

[0158] In a possible implementation, a communication interface is arranged on a first container where two service components in a communication relationship are located, to realize communication between the service components.

[0159] S310, obtain the component quantity corresponding to the first component identifier.

[0160] It should be noted that one of the service components in the first software is selected as the entry service component, that is, the service component corresponding to the first component identifier is used as the service entry of the first software application.

[0161] For example, based on the example in step S303, the obtaining of the component quantity corresponding to the first component identifier is described. If it is obtained from the software deployment request that the first component identifier is a service component c. Meanwhile, it is obtained from the software service request that the deployment quantity required by the service component c is 4. The deployment quantity required by the service component c is determined as the component quantity corresponding to the first component identifier. For example, the deployment quantity required by the service component c is 4, that is, the component quantity corresponding to the first component identifier (the service component c) is obtained.

[0162] S311, if the component quantity corresponding to the first component identifier is 1, the service component corresponding to the first component identifier in the at least one service component is determined as the entry service component.

[0163] In the embodiment, the quantity of the service components corresponding to the first component identifier in the first software is at least one. The first software has only one entry service component. That is, the entry service component needs to be determined according to the component quantity corresponding to the first component identifier in the first software.

[0164] In the embodiment, if the component quantity corresponding to the first component identifier in the first software is 1, the service component corresponding to the first component identifier is determined as the entry service component.

[0165] S312, if the component quantity corresponding to the first component identifier is greater than 1, the entry service component is determined according to the remaining resource quantity of the target server where the service component corresponding to the first component identifier is located.

[0166] In a possible implementation, when the component quantity corresponding to the first component identifier in the first software is greater than 1, the target server with the largest remaining resource quantity is determined as the entry service component according to the remaining resource quantity of the target server where the service component corresponding to the first component identifier is located.

[0167] The software deployment method provided in the embodiment comprises: determining the component quantity of the i th service component as N i , i is an integer, 1≤i≤M, N iis an integer greater than or equal to 1. The at least one service component corresponding to the first software is determined service components. According to the software deployment request, the at least one service component corresponding to the first software is determined, and the at least one target server in the plurality of servers is determined. The target server corresponding to each service component is determined. For any one service component, the first container corresponding to the service component is determined in the target server corresponding to the service component, and the service component is deployed in the first container. The target server corresponding to each service component is determined. The service components located in the same target server have a communication relationship. The target service component in each target server is determined, and the target service components in two target servers having a communication relationship have a communication relationship. According to the communication relationship, the communication interface between the at least one service component is set, and the communication interface is set between two service components having a communication relationship. The number of components corresponding to the first component identifier is obtained. If the number of components corresponding to the first component identifier is 1, the service component corresponding to the first component identifier in the at least one service component is determined as the entry service component. If the number of components corresponding to the first component identifier is greater than 1, the entry service component is determined according to the remaining resource amount of the target server in which the service component corresponding to the first component identifier is located. Wherein, the entry service component is determined according to the remaining resource amount of the target server in which the service component corresponding to the first component identifier is located. Selecting the service component in the target server with larger remaining resource amount as the entry service component can improve the reliability and stability of the normal work of the entry service component.

[0168] On the basis of the above embodiments, the software deployment method provided by the present application will be further introduced in combination with a specific embodiment. The software deployment method provided by the present application will be introduced in combination with Figure 7 , Figure 8 the flow of the software deployment method provided by the embodiment of the present application Figure 8 .

[0169] As Figure 9 shown, the method comprises:

[0170] S701, obtaining a software upgrade request sent by a first client, the software upgrade request comprising an identifier of first software and an identifier of a service component to be upgraded, the service component to be upgraded being a new service component or an updated service component.

[0171] It should be noted that with the continuous improvement of user demand, the software function is also continuously upgraded. The user will choose whether to submit a software upgrade request according to his own needs. If the user chooses to submit a software upgrade request, the user will send a software upgrade request through the first client to enable the request software deployment system to upgrade the software.

[0172] The software upgrade request includes the identification of the first software and the identification of the service component to be upgraded. It should be emphasized that the software upgrade is to upgrade at least one service component in the first software. The service component to be upgraded is referred to as the service component to be upgraded. Specifically, according to the specific situation of the software upgrade, it can be divided into two types: one is to add a service component to the first software, and the other is to update the existing service component of the first software.

[0173] Therefore, in the process of software upgrade, it is necessary to determine whether the service component to be upgraded is a newly added service component or an updated service component.

[0174] S702, obtaining the newly added service component.

[0175] In this embodiment, when the software upgrade request sent by the first client is obtained, the identification of the first software and the identification of the service component to be upgraded in the software request are obtained. When there is no service component with the same identification as the service component to be upgraded in the first software, the service component to be upgraded is a newly added service component.

[0176] In a possible implementation, the software deployment system finds the service component with the service component identification being the identification of the service component to be upgraded from the stored plurality of service components, that is, obtains the newly added service component.

[0177] S703, determining the first server corresponding to the newly added service component in the plurality of servers.

[0178] In a possible implementation, the resource availability of each server is obtained, and the server with the largest resource availability is determined as the first server corresponding to the newly added server.

[0179] In this embodiment, only the determination of the first server corresponding to the newly added service component in the plurality of servers is exemplarily described, and the implementation of the determination of the first server corresponding to the newly added service component in the plurality of servers is not limited. The implementation of the determination of the first server corresponding to the newly added service component in the plurality of servers can be selected according to actual needs.

[0180] S704, determining the second container corresponding to the newly added service component in the first server, and deploying the newly added service component in the second container.

[0181] Based on the above steps, the first server to which the newly added service component is deployed is determined, and then a second container is created in the first server, and the newly added service component is deployed in the second container.

[0182] S705, obtaining the updated service component.

[0183] In the embodiment, when the software upgrade request sent by the first client is acquired, the first software in the software request and the to-be-upgraded service component are identified. When the service component with the same identification as the to-be-upgraded service component exists in the first software, the to-be-upgraded service component is the updated service component.

[0184] In a possible implementation, the software deployment system finds the service component with the service component identification being the to-be-upgraded service component identification from the stored plurality of service components, that is, the updated service component is acquired.

[0185] S706, determining a second server corresponding to the updated service component in the plurality of servers.

[0186] In a possible implementation, the resource availability of each server is acquired, and the server with the maximum resource availability is determined as the second server corresponding to the updated server.

[0187] In the embodiment, only the determination of the second server corresponding to the updated service component in the plurality of servers is exemplarily described, and the implementation of the determination of the second server corresponding to the updated service component in the plurality of servers is not limited, and the implementation of the determination of the second server corresponding to the updated service component in the plurality of servers can be selected according to actual needs.

[0188] S707, determining a third container corresponding to the updated service component in the second server, and deploying the updated service component in the third container.

[0189] Based on the above steps, the second server in which the updated service component is deployed is determined for the updated service component, and then a third container is created in the second server, and the updated service component is deployed in the third container.

[0190] S708, determining an existing service component corresponding to the updated service component, and deleting the existing service component in the cloud platform, the component identification of the existing service component being the same as that of the updated service component.

[0191] In the embodiment, when the software deployment system successfully deploys the updated service component in the third container in the second server, the software deployment system determines the existing service component corresponding to the updated service component in the first software, wherein the component identification of the existing service component is the same as that of the service component.

[0192] Next, the software deployment system deletes the existing service component corresponding to the updated service component in the first software in the cloud platform.

[0193] The software deployment method provided by the embodiments of the present application comprises the following steps: obtaining a software upgrade request sent by a first client, wherein the software upgrade request comprises the identification of first software and the identification of a service component to be upgraded, the service component to be upgraded is a newly-added service component or an updated service component; obtaining the newly-added service component; determining a first server corresponding to the newly-added service component in a plurality of servers; determining a second container corresponding to the newly-added service component in the first server, and deploying the newly-added service component in the second container; obtaining the updated service component; determining a second server corresponding to the updated service component in the plurality of servers; determining a third container corresponding to the updated service component in the second server, and deploying the updated service component in the third container; determining an existing service component corresponding to the updated service component, and deleting the existing service component in a cloud platform, wherein the component identification of the existing service component is the same as that of the updated service component. The first client sends a software upgrade request to a cloud server, and a software deployment system upgrades the software to be upgraded on the cloud server according to the software upgrade request, so as to meet the requirement of the first client for upgrading the software.

[0194] Figure 9 The structure diagram of the software deployment device provided by the embodiments of the present application is shown in FIG. 8. ​ As shown in FIG. 8, the device 800 comprises a receiving module 801, a determining module 802 and a processing module 803.

[0195] The receiving module 801 is configured to receive a software deployment request sent by a first client, wherein the software deployment request is used to request to deploy first software in a cloud platform.

[0196] The determining module 802 is configured to determine at least one service component corresponding to the first software according to the software deployment request, and determine at least one target server in a plurality of servers.

[0197] The processing module 803 is configured to deploy the first software in the at least one target server according to the at least one service component.

[0198] In a possible design, the processing module 803 is specifically configured to:

[0199] deploy the at least one service component to the at least one target server;

[0200] determine the communication relationship between the at least one service component;

[0201] set the communication interface between the at least one service component according to the communication relationship, and the two service components having the communication relationship are provided with the communication interface;

[0202] determine an entry service component in the at least one service component.

[0203] In a possible design, the processing module 803 is specifically configured to:

[0204] determine a target server corresponding to each service component;

[0205] for any one service component, determine a first container corresponding to the service component in the target server corresponding to the service component, and deploy the service component in the first container.

[0206] In a possible design, the processing module 803 is specifically configured to:

[0207] determine a target server corresponding to each service component;

[0208] determine that there is a communication relationship between service components located in the same target server;

[0209] determine a target service component in each target server, and determine that there is a communication relationship between target service components in two target servers having the communication relationship.

[0210] In a possible design, the software deployment request includes the identification of the M service components and the component quantity of each service component; and the determining module 802 is specifically configured to:

[0211] determine that the component quantity of the i th service component is N i , where i is an integer, 1≤i≤M, and N i is an integer greater than or equal to 1;

[0212] determine that the at least one service component corresponding to the first software includes M service components.

[0213] In a possible design, the software deployment request includes a first component identification; and the processing module 803 is specifically configured to:

[0214] obtain a component quantity corresponding to the first component identification;

[0215] if the component quantity corresponding to the first component identification is 1, determine the service component corresponding to the first component identification in the at least one service component as the entry service component;

[0216] if the component quantity corresponding to the first component identification is greater than 1, determine the entry service component according to a remaining resource quantity of a target server in which the service component corresponding to the first component identification is located.

[0217] In a possible design, the processing module 803 is specifically configured to:

[0218] obtain a software upgrade request sent by the first client, the software upgrade request comprising an identification of the first software and an identification of a service component to be upgraded, the service component to be upgraded being a newly-added service component or an updated service component;

[0219] perform an upgrade process on the first software according to the software upgrade request.

[0220] In a possible design, the processing module 803 is specifically configured to:

[0221] obtain the newly-added service component;

[0222] determine a first server corresponding to the newly-added service component in the plurality of servers;

[0223] determine a second container corresponding to the newly-added service component in the first server, and deploy the newly-added service component in the second container.

[0224] In a possible design, the processing module 803 is specifically configured to:

[0225] obtain the updated service component;

[0226] determine a second server corresponding to the updated service component in the plurality of servers;

[0227] determine a third container corresponding to the updated service component in the second server, and deploy the updated service component in the third container;

[0228] determine an existing service component corresponding to the updated service component, and delete the existing service component in the cloud platform, the existing service component and the updated service component having the same component identification.

[0229] The apparatus provided in this embodiment can be used to execute the technical solutions of the method embodiments, and has similar implementation principles and technical effects, which will not be repeated here.

[0230] ​ A hardware structure schematic diagram of a software deployment device provided in this embodiment is shown in FIG. 9, which includes a processor 901 and a memory 902. ​ The processor 901 is configured to execute the computer-executed instructions stored in the memory, so as to implement each step of the software deployment method in the above embodiments. For details, refer to the related description in the method embodiments.

[0231] The memory 902 is configured to store computer-executed instructions.

[0232] The processor 901 is configured to execute the computer-executed instructions stored in the memory, so as to implement each step of the software deployment method in the above embodiments. For details, refer to the related description in the method embodiments.

[0233] Optionally, the memory 902 can be independent or integrated with the processor 901.

[0234] When the memory 902 is independently arranged, the software deployment device further includes a bus 903 for connecting the memory 902 and the processor 901.

[0235] The embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the software deployment method executed by the software deployment device is implemented.

[0236] The embodiment of the present application further provides a computer program product, and the program product includes a computer program. The computer program is stored in a readable storage medium. At least one processor of an electronic device can read the computer program from the readable storage medium. The at least one processor executes the computer program, so that the electronic device executes the scheme provided in any one of the above embodiments.

[0237] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other manners. For example, the above-described device embodiments are merely illustrative. For example, the division of the modules is merely a logical function division. There can be another division manner for actual implementation. For example, a plurality of modules or features can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or modules, and can be electrical, mechanical or in other forms.

[0238] The integrated modules implemented in the form of software functional modules can be stored in a computer readable storage medium. The software functional modules stored in the storage medium include a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the methods described in the embodiments of the present application.

[0239] It should be understood that the above processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the disclosed method can be directly embodied as hardware processor execution, or a combination of hardware and software modules in the processor.

[0240] The memory can include a high-speed RAM memory, and can also include a non-volatile storage NVM, such as at least one disk memory, and can also be a U disk, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.

[0241] The bus can be an industry standard architecture (ISA) bus, a peripheral component (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.

[0242] The above storage medium can be realized by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0243] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware. The above-mentioned program can be stored in a computer readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the above-mentioned storage medium includes ROM, RAM, magnetic disk or optical disk and various storage medium that can store program codes.

[0244] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A software deployment method, characterized by, A software deployment system applied to a cloud platform, the cloud platform comprising a plurality of servers, the method comprising: receiving a software deployment request sent by a first client, the software deployment request being used to request deployment of first software in the cloud platform, the software deployment request comprising a first component identifier; determining at least one service component corresponding to the first software according to the software deployment request, and determining at least one target server in the plurality of servers; deploying the at least one service component to the at least one target server; determining a communication relationship between the at least one service component; setting a communication interface between the at least one service component according to the communication relationship, two service components having a communication relationship being provided with a communication interface therebetween; obtaining a component quantity corresponding to the first component identifier; if the component quantity corresponding to the first component identifier is 1, determining a service component corresponding to the first component identifier in the at least one service component as an entry service component; if the component quantity corresponding to the first component identifier is greater than 1, determining the entry service component according to a remaining resource quantity of a target server in which the service component corresponding to the first component identifier is located.

2. The method of claim 1, wherein, The deploying the at least one service component to the at least one target server comprises: determining a target server corresponding to each service component; for any one service component, determining a first container corresponding to the service component in the target server corresponding to the service component, and deploying the service component in the first container.

3. The method of claim 2, wherein, The determining a communication relationship between the at least one service component comprises: determining a target server corresponding to each service component; determining that service components located in a same target server have a communication relationship; determining a target service component in each target server, and determining that target service components in two target servers having a communication relationship have a communication relationship.

4. The method according to any one of claims 1 to 3, characterized in that, The software deployment request comprises identifiers of M service components and a component quantity of each service component; The determining at least one service component corresponding to the first software according to the software deployment request comprises: determining the number of components of the ith service component as , i being an integer, , said being an integer greater than or equal to 1; determining at least one service component corresponding to the first software comprises service component.

5. The method according to any one of claims 1 to 3, characterized in that, After the deploying the service component in the first container corresponding to the service component, the method further comprises: obtaining a software upgrade request sent by the first client, the software upgrade request comprising an identifier of the first software and an identifier of a service component to be upgraded, the service component to be upgraded being a newly-added service component or an updated service component; performing upgrade processing on the first software according to the software upgrade request.

6. The method of claim 5, wherein, The service component to be upgraded is a newly-added service component; the performing upgrade processing on the first software according to the software upgrade request comprises: obtaining the newly-added service component; determining a first server corresponding to the newly-added service component in the plurality of servers; determining a second container corresponding to the newly-added service component in the first server, and deploying the newly-added service component in the second container.

7. The method of claim 5, wherein, The service component to be upgraded is an updated service component; The performing upgrade processing on the first software according to the software upgrade request comprises: obtaining the updated service component; determining a second server corresponding to the update service component in the plurality of servers; determining a third container corresponding to the update service component in the second server, and deploying the update service component in the third container; determining an existing service component corresponding to the update service component, and deleting the existing service component in the cloud platform, the component identifier of the existing service component being the same as that of the update service component.

8. A software deployment apparatus characterized by comprising: A software deployment system applied to a cloud platform, the cloud platform comprising a plurality of servers, the apparatus comprising: a receiving module configured to receive a software deployment request sent by a first client, the software deployment request being used to request to deploy a first software in the cloud platform, the software deployment request comprising a first component identifier; a determining module configured to determine at least one service component corresponding to the first software according to the software deployment request, and determine at least one target server in the plurality of servers; a processing module configured to deploy the at least one service component to the at least one target server, determine a communication relationship between the at least one service component, set a communication interface between the at least one service component according to the communication relationship, two service components having a communication relationship have a communication interface set therebetween, obtain a component quantity corresponding to the first component identifier, determine a first component identifier corresponding service component in the at least one service component as an entry service component if the component quantity corresponding to the first component identifier is 1, and determine the entry service component according to a remaining resource amount of a target server where the first component identifier corresponding service component is located if the component quantity corresponding to the first component identifier is greater than 1.

9. A software deployment device, characterized by comprising: a processor, and a memory connected with the processor in communication; the memory storing computer execution instructions; the processor executing the computer execution instructions stored in the memory to implement the method in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 7.

11. A computer program product comprising a computer program, characterized in that, the computer program, when executed by a processor, implements the method of any one of claims 1 to 7. the computer program, when executed by a processor, implements the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Component update method and device

    CN106254105A

  • Micro-service architecture for enterprise-level application software in cloud computing environment

    CN107959718A

  • Method and device for deploying cloud service assemblies

    CN109327490A

  • Software deployment method and device, computer equipment and storage medium

    CN112162753A