CN111596927B - Service deployment method and device and electronic equipment - Google Patents

Service deployment method and device and electronic equipment Download PDF

Info

Publication number
CN111596927B
CN111596927B CN202010414849.9A CN202010414849A CN111596927B CN 111596927 B CN111596927 B CN 111596927B CN 202010414849 A CN202010414849 A CN 202010414849A CN 111596927 B CN111596927 B CN 111596927B
Authority
CN
China
Prior art keywords
application
current application
deployment
applications
current
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.)
Active
Application number
CN202010414849.9A
Other languages
Chinese (zh)
Other versions
CN111596927A (en
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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology 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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202010414849.9A priority Critical patent/CN111596927B/en
Publication of CN111596927A publication Critical patent/CN111596927A/en
Application granted granted Critical
Publication of CN111596927B publication Critical patent/CN111596927B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the disclosure provides a service deployment method, a device and electronic equipment, and relates to the field of cloud computing, wherein the method comprises the steps of firstly acquiring application definitions of a plurality of applications corresponding to a service to be deployed, wherein the application definitions comprise dependency information of the applications; determining a current application from a plurality of applications in turn; determining whether one or more applications on which the current application depends have been successfully deployed based on the dependency information of the current application; if so, the current application is deployed. When the method deploys the service, the deployment of all components of the whole service can be completed through one deployment request, thereby being beneficial to improving the deployment efficiency of the service and relieving the problem of low deployment efficiency of the service in the prior art.

Description

Service deployment method and device and electronic equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a service deployment method, a device, and an electronic device.
Background
Currently, for services, a common deployment technology is to install an application into a Kubernetes cluster using Helm (a package management tool of Kubernetes), where Helm is a package management tool of Kubernetes, and in fact, helm generates native resources of Kubernetes according to Chart (package files of Helm) and parameters, such as Deployment, service, configmap, so that the application runs and provides services.
However, typically, a service is made up of multiple applications, each of which is typically packaged into a Chart, such as MySQL is a separate Chart. The single Chart installation can not complete the deployment of all components of the whole service.
In summary, the existing service deployment method has the problem of low deployment efficiency.
Disclosure of Invention
In view of the above, the present application aims to provide a service deployment method, a device and an electronic device, so as to alleviate the problem of low deployment efficiency in the prior art, and facilitate to improve service deployment efficiency.
In a first aspect, an embodiment of the present application provides a service deployment method, including the following steps:
acquiring application definitions of a plurality of applications corresponding to the service to be deployed, wherein the application definitions comprise dependency information of the applications;
determining a current application from the plurality of applications in turn;
determining whether one or more applications on which the current application depends have been successfully deployed based on the dependency information of the current application;
and if so, deploying the current application.
With reference to the first aspect, an embodiment of the present application provides a first possible implementation manner of the first aspect, where the step of determining, based on the dependency information of the current application, whether one or more applications on which the current application depends have been deployed successfully includes:
judging whether one or more applications on which the current application depends exist or not based on the dependency information of the current application;
if one or more applications on which the current application depends exist, determining whether the one or more applications on which the current application depends have been successfully deployed.
With reference to the first possible implementation manner of the first aspect, the embodiment of the present application provides a second possible implementation manner of the first aspect, where the method further includes:
and if the current application does not exist one or more applications depended on, executing the step of deploying the current application.
With reference to the first aspect, the embodiment of the present application provides a third possible implementation manner of the first aspect, where the method further includes:
and if not, identifying the deployment state of the service as deployment failure.
With reference to the first aspect, an embodiment of the present application provides a fourth possible implementation manner of the first aspect, where the application definition further includes a file of the application for describing resources required by the application at the time of application deployment;
the step of deploying the current application comprises the following steps:
and calling a tool interface corresponding to a file for describing the resources required by the current application when the application is deployed, installing the file for describing the resources required by the current application when the application is deployed for the current application, and generating a record of the application instance of the current application.
With reference to the fourth possible implementation manner of the first aspect, the embodiment of the present application provides a fifth possible implementation manner of the first aspect, wherein the application definition further includes a hart file of the application; the step of deploying the current application comprises the following steps:
and calling a Helm interface to install the Chart file of the current application, and generating an application instance record of the current application.
With reference to the fourth possible implementation manner of the first aspect, the embodiment of the present application provides a fifth possible implementation manner of the first aspect, wherein it is determined whether the current application has a corresponding application instance;
if the current application does not have a corresponding application instance, executing a step of calling a tool interface corresponding to a file for describing resources required by the current application in application deployment to install the file for describing the resources required by the current application in application deployment of the current application, and generating a record of the application instance of the current application;
and if the current application has a corresponding application instance, determining the deployment state of the current application.
With reference to the first aspect, an embodiment of the present application provides a sixth possible implementation manner of the first aspect, where the method further includes:
a directed acyclic graph DAG (Directed Acyclic Graph) is generated based on application definitions of the plurality of applications.
In a second aspect, an embodiment of the present application further provides a service deployment apparatus, including:
the system comprises an acquisition module, a service deployment module and a service deployment module, wherein the acquisition module is used for acquiring application definitions of a plurality of applications corresponding to a service to be deployed, and the application definitions comprise dependency information of the applications;
the determining module is used for sequentially determining the current application from the plurality of applications;
the judging module is used for determining whether one or more applications on which the current application depends are successfully deployed or not based on the dependency information of the current application;
and the deployment module is used for deploying the current application if the current application is the current application.
In a third aspect, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the steps of the service deployment method described above are implemented when the processor executes the computer program.
In a fourth aspect, embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the service deployment method described above.
The embodiment of the application has the following beneficial effects: the service deployment method, the device, the electronic equipment and the computer readable storage medium provided by the embodiment of the application are characterized in that application definitions of a plurality of applications corresponding to the service to be deployed are obtained, wherein the application definitions comprise the dependency information of the applications; then determining the current application from a plurality of applications in turn; finally, based on the dependency information of the current application, determining whether one or more applications on which the current application depends are successfully deployed; and if so, deploying the current application. Therefore, the technical scheme provided by the embodiment of the application can complete the deployment of all components of the whole service through one deployment request when one service is deployed, is beneficial to improving the service deployment efficiency, and relieves the problem of lower service deployment efficiency in the prior art.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a service deployment method according to an embodiment of the present application;
FIG. 2 is a flowchart showing the step S106 in FIG. 1;
FIG. 3 is a dependency relationship between applications of service A;
FIG. 4 is a directed acyclic graph DAG of service A;
FIG. 5 is a flowchart of another service deployment method according to an embodiment of the present application;
FIG. 6 is a specific flowchart of a service deployment method according to an embodiment of the present application;
fig. 7 is a schematic diagram of a service deployment device according to an embodiment of the present application;
fig. 8 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The deployment method for the service in the prior art mainly uses Helm to install the application into the Kubernetes cluster. In practice, helm will generate the native resources of Kubernetes, such as Deployment, service, configmap, etc. according to Chart and parameters, to run the application and provide services, however the above method has the following disadvantages: since a service is typically made up of multiple applications, each application is typically packaged into a Chart, e.g., mySQL is a separate Chart. The single Chart installation can only deploy one application, and the deployment of all applications of the whole service can not be completed, so that the service deployment efficiency is affected.
Based on the above, the service deployment method and device provided by the embodiment of the application can complete the deployment of all components of the whole service through one deployment request when deploying one service, thereby being beneficial to improving the deployment efficiency and relieving the technical problem of lower deployment efficiency in the prior art.
For the sake of understanding the present embodiment, a detailed description is first given of a service deployment method disclosed in the present embodiment.
Embodiment one:
as shown in fig. 1, an embodiment of the present application provides a service deployment method, which includes:
step S102, acquiring application definitions of a plurality of applications corresponding to a service to be deployed, wherein the application definitions comprise dependency information of the applications;
step S104, determining the current application from a plurality of applications in turn;
step S106, based on the dependency information of the current application, determining whether one or more applications on which the current application depends have been successfully deployed;
step S108, if yes, deploying the current application.
It is noted that the service to be deployed generally includes a plurality of applications, application definitions of the plurality of applications are preconfigured, where the application definitions include dependency information of each application, where the dependency information may include a dependency relationship and an application combination;
in an alternative embodiment, the application definition may further include deployment file information of the application, where the deployment file information includes a file for describing resources required by the application when the application is deployed; the application may be a Chart type application, and the deployment file information of the Chart type application includes a Chart file; the application may also be a REST (Representational State Transfer, presentation layer state transition) type application, and the deployment file information of the REST type application includes a REST file, which should be noted that the application may also be other types of applications.
In an alternative embodiment, the step S108 includes, when deploying the current application:
and calling a tool interface corresponding to the deployment file information of the current application, installing a file of the current application for describing resources required by the current application in application deployment, and generating a record of an application instance of the current application.
Or judging whether the current application has a corresponding application instance; if the current application does not have a corresponding application instance, executing a step of calling a tool interface corresponding to the deployment file information of the current application to install a file of the current application for describing resources required by the current application when the application is deployed, and generating a record of the application instance of the current application; and if the current application has a corresponding application instance, determining the deployment state of the current application.
The application can support REST and other types besides Chart, and can uniformly manage and control application deployment modes of all application types.
Specifically, in this embodiment, the application is a hart type application, the deployment file information is hart source file information, and the hart source file information includes a hart file.
In an alternative embodiment, the application definitions described above may be pre-stored to a database.
In an alternative embodiment, for step S104, one may be selected randomly from multiple applications of the service as the current application, or multiple applications may be selected randomly from multiple applications of the service as the current application;
in an alternative embodiment, in step S104, one of the plurality of applications of the service may be selected as the current application according to the set deployment order, or a plurality of applications may be selected as the current application according to the set deployment order.
In an alternative embodiment, this step S104 may be implemented by:
1. a directed acyclic graph DAG is generated based on application definitions of a plurality of applications, wherein the directed acyclic graph DAG can be used to determine a sequencing of application deployments.
Because the directed acyclic graph DAG can clearly obtain the dependency relationship between applications in service, the deployment order of the applications can be determined through the directed acyclic graph DAG, for example, the bottom layer application is deployed first, and then the upper layer application is deployed.
2. The current application is determined from a plurality of applications based on the directed acyclic graph DAG.
Specifically, the method comprises the steps of firstly determining that a bottom layer application is deployed as a current application, and then determining that an upper layer application is deployed as the current application; the application without any dependency relationship or a plurality of applications depending on the same application can be deployed in parallel, which is beneficial to improving the deployment efficiency.
In an alternative embodiment, referring to fig. 2, the step S106 may be implemented by:
step S202, judging whether one or more applications on which the current application depends exist or not based on the dependency information of the current application;
in step S204, if there are one or more applications depending on the current application, it is determined whether the one or more applications depending on the current application have been deployed successfully.
In an alternative embodiment, the step of determining whether one or more applications on which the current application depends have been successfully deployed comprises:
1) Judging whether one or more applications on which the current application depends are completely deployed or not;
2) If yes, executing to judge whether the one or more applications on which the current application depends are successfully deployed.
Firstly judging whether the application is deployed or not, and then judging whether the deployed application is deployed successfully or not.
In an alternative embodiment, the method further comprises:
in step S206, if the current application does not have one or more applications on which the current application depends, the current application is deployed.
The application without the dependency relationship is directly deployed, so that the deployment efficiency is improved.
I.e. the current application is deployed directly without any dependent applications of the current application.
It should be noted that in an alternative embodiment, when there are multiple applications without dependencies, parallel deployment may be performed to improve deployment efficiency.
In addition, when the current application is multiple, if the application on which the current application depends is the same application and the same application is deployed successfully, the multiple current applications can be deployed simultaneously or in parallel, and the deployment efficiency can be improved.
For ease of understanding, the generation process of the directed acyclic graph DAG is illustrated below in conjunction with FIGS. 3 and 4:
as shown in fig. 3, service a is composed of applications A, B, C, D. While application A and application B depend on application C at the same time, application A, application B and application C depend on application D at the same time; where application a depends on application C, it can be understood that: after the application C is successfully deployed, the application A can be deployed.
According to the dependency relationship of each application of the service A, generating a directed acyclic Graph DAG of the deployment relationship through a Mutable Graph, as shown in FIG. 3.
According to the DAG of fig. 4, determining a deployment order of applications or guiding determining an order and number of current applications from a plurality of applications; specifically, when the service is deployed, the application D may be deployed first, and after the application D is deployed, the application C may be deployed; after the application C is deployed, deploying the application A and the application B simultaneously; thereby enabling deployment of service a.
It should be noted that, after the deployment of the application D, the application D may be understood as after the deployment of the application D is completed, or may be understood as after the deployment of the application D is successful; similarly, the same understanding can be made after application C deployment.
In an alternative embodiment, in step S108, the step of deploying the current application may be implemented by one of the following ways:
mode a:
and A1, calling a Helm interface to install the Chart file of the current application, and generating an application instance record of the current application.
Specifically, firstly, acquiring a Chart file in currently applied Chart source file information from a database; calling a Helm interface to install the Chart file of the current application, and finally, generating an application instance record of the current application; i.e. the application instance record corresponds to the current application.
Mode B:
b1, judging whether the current application has a corresponding application instance or not;
if not, namely the current application does not have a corresponding application instance, executing the B2; if yes, namely, the current application has a corresponding application instance, executing the step B3;
b2, calling a Helm interface to install the Chart file of the current application, and generating an application instance record of the current application;
b3, determining the deployment state of the current application.
Wherein, this step B3 may be performed by:
b31, judging whether the current application is deployed;
if not, for example, the current application is being deployed, then step B32 is performed; if yes, namely the current application is deployed, executing a step B33;
b32 waits for a period of time and returns to step B31;
b33, judging whether the current application is deployed successfully or not;
if yes, go to step B34; if not, step B35 is performed.
B34, marking the deployment state of the current application as successful deployment; and returning to the step of determining the current application from the plurality of applications in turn.
B35 identifies the deployment status of the service as a deployment failure.
The service deployment method provided by the embodiment of the application comprises the steps of obtaining application definitions of a plurality of applications corresponding to the service to be deployed, wherein the application definitions comprise the dependency information of the applications; determining a current application from a plurality of applications in turn; determining whether one or more applications on which the current application depends have been successfully deployed based on the dependency information of the current application; if so, the current application is deployed. Therefore, the method can complete the deployment of the whole service only by one deployment request when one service is deployed, and is beneficial to improving the deployment efficiency.
Embodiment two:
as shown in fig. 5, an embodiment of the present application provides another service deployment method, which includes:
step S502, acquiring application definitions of a plurality of applications corresponding to a service to be deployed, wherein the application definitions comprise dependency information of the applications;
step S504, generating a directed acyclic graph DAG based on application definitions of a plurality of applications;
step S506, determining the current application from a plurality of applications in turn;
specifically, determining a current application from a plurality of applications in turn based on the directed acyclic graph DAG;
step S508, based on the dependency information of the current application, determining whether one or more applications on which the current application depends have been successfully deployed;
step S510, if yes, deploying the current application.
Specifically, if one or more applications on which the current application depends have been successfully deployed, deploying the current application; the one or more applications on which the current application depends having been deployed successfully is understood herein to mean that all applications on which the current application depends have been deployed successfully.
Step S512, if not, the deployment state of the service is identified as deployment failure.
Specifically, if there is an application with a deployment failure in one or more applications on which the current application depends, the service is directly identified as the deployment failure.
For easy understanding, a specific flow of the service deployment method provided by the embodiment of the present application is described below with reference to fig. 6:
step S601, acquiring application definitions of a plurality of applications corresponding to a service to be deployed; the application definition includes dependency information of the application;
the application definition here also includes the Chart source file information of the application;
in step S602, a directed acyclic graph DAG is generated based on application definitions of a plurality of applications.
Step S603, determining a current application from the plurality of applications in turn based on the directed acyclic graph DAG;
for the current application, the following steps are performed:
step S604, judging whether the current application has deployment dependent application;
deployment-dependent applications herein refer to applications on which the current application depends; the deployment-dependent application may be one or more.
If yes, i.e. there is a deployment dependent application for the current application, then execution step 605; if not, that is, the current application does not have the deployment-dependent application, executing step S615;
step S605, judging whether deployment of the deployment-dependent application is completed;
if not, the deployment dependent application is not complete in deployment, then step S606 is performed; if yes, i.e. the deployment dependent application has completed deployment, then step S607 is performed;
step S606, preferentially executing the application depending on the deployment or ending the deployment of the current application;
step S607, judging whether the deployment-dependent application fails to deploy;
if yes, the deployment of the application dependent on the deployment fails, and step S608 is executed; if not, namely the deployment of the deployment-dependent application is successful, executing step S609;
step S608, identifying the service as a deployment failure;
step S609, judging whether an application instance exists in the current application;
if not, i.e. there is no application instance for the current application, then step S610 is performed; if yes, i.e. the current application has an application instance, then the execution step is 611;
step S610, call Helm API to deploy Chart, and execute step S611;
step S611, judging whether the current application is deployed to end;
if not, i.e. the current application deployment is not finished (e.g. being deployed), then step S612 is performed; if yes, the current application deployment is finished, executing step S613;
step S612, waiting for a period of time, and returning to step S611;
step S613, judging whether the current application is successfully deployed;
if yes, i.e. the current application deployment is successful, step S614 is performed; if not, i.e. the current application deployment fails, then step S608 is executed;
step S614; identifying the current application as successful deployment;
step S615, deploying the current application.
The service deployment method provided by the embodiment of the application is an application deployment control flow based on DAG, each application definition is stored in a database, and the application definition comprises Chart source file information and application dependency information. And providing services to the outside through a RESTFUL API mode. When the application is deployed by calling the API, reading the application definition information, generating the DAG according to the application dependency information, and then calling the Helm API according to the DAG to install Chart. Specifically, the method comprises the steps of obtaining application definitions of a plurality of applications corresponding to a service to be deployed, and determining a current application from the plurality of applications in sequence; if the current application does not depend on any application, the deployment flow of the current application is directly entered. If all the dependent applications of the current application are successfully deployed, the deployment flow of the current application is entered. If the application depended on by the current application has deployment failure, directly marking the application as the deployment failure; the direct identification of deployment failure can be understood as that the current application identification is deployment failure, and can also be understood as that the whole service deployment fails; in consideration of concurrent requests, each application corresponds to an application instance after deployment, and application instance information is stored in a database. The deployment state is controlled by the application instance. After entering the deployment flow of the current application, if the current application does not have an application instance, directly calling the Helm interface to execute the Chart installation request, and generating an application instance record. If the current application has the application instance, judging the deployment state of the current application, if the current application is being deployed, waiting for the end of deployment, and judging the deployment result after the end of deployment. After traversing each application, the method finally deploys each application according to the DAG flow.
The service deployment method generates a Directed Acyclic Graph (DAG) of an application deployment flow by configuring application combinations and dependency relationships. When a service is deployed, a deployment request can be sent once to complete the deployment of all components of the whole service, and the bottom layer application is deployed first and then the upper layer application is deployed according to the dependency relationship. Applications without dependencies or applications or services that rely on the same application may be deployed in parallel to improve efficiency. The method has the following advantages: 1. by special application definition, application dependence and combination relation are maintained, and the operation is more flexible; 2. besides Chart, the application also supports REST and other types, and the application deployment modes of all application types are uniformly managed and controlled. 3. If different services depend on the same application, the method can detect and combine the deployment procedures.
Embodiment III:
as shown in fig. 7, the embodiment of the present application further provides a service deployment apparatus, where the apparatus includes: an acquisition module 701, a determination module 702, a judgment module 703, and a deployment module 704.
The acquiring module 701 is configured to acquire application definitions of a plurality of applications corresponding to a service to be deployed, where the application definitions include dependency information of the applications;
the determining module 702 is configured to determine, in sequence, a current application from the plurality of applications;
the judging module 703 is configured to determine, based on the dependency information of the current application, whether one or more applications on which the current application depends have been deployed successfully;
the deployment module 704 is configured to deploy the current application if so.
In an alternative embodiment, the determining module 703 is configured to determine, based on the dependency information of the current application, whether one or more applications on which the current application depends exist when determining, based on the dependency information of the current application, whether one or more applications on which the current application depends have been deployed successfully; if one or more applications on which the current application depends exist, determining whether the one or more applications on which the current application depends have been successfully deployed.
In an alternative embodiment, the deployment module 704 is further configured to deploy the current application if the current application does not have any dependent applications.
In an alternative embodiment, the application definition further includes deployment file information of the application, where the deployment file information includes a file for describing resources required by the application when the application is deployed; the deployment module 704 is configured to, when the current application is deployed, invoke a tool interface corresponding to deployment file information of the current application to install a file of the current application, where the file is used to describe resources required by the current application when the application is deployed, and generate a record of an application instance of the current application.
In an alternative embodiment, the application definition further includes a Chart file for the application; the deployment module 704 is further configured to invoke a Helm interface to install a hart file of the current application, and generate an application instance record of the current application.
In an optional embodiment, the deployment module 704 is configured to determine whether a corresponding application instance exists in the current application when the current application is deployed; if the current application does not have a corresponding application instance, executing a step of calling a tool interface corresponding to a file for describing resources required by the current application in application deployment to install the file for describing the resources required by the current application in application deployment of the current application, and generating a record of the application instance of the current application; and if the current application has a corresponding application instance, determining the deployment state of the current application.
In an optional embodiment, the deployment module 704 is configured to determine whether a corresponding application instance exists in the current application when the current application is deployed; if the current application does not have a corresponding application instance, calling a Helm interface to install a Chart file of the current application, and generating an application instance record of the current application; and if the current application has a corresponding application instance, determining the deployment state of the current application.
In an alternative embodiment, the apparatus further comprises a marking module for identifying the deployment status of the service as a deployment failure if one or more applications on which the current application depends fail to deploy.
In an alternative embodiment, the apparatus further comprises a generation module for generating a directed acyclic graph based on application definitions of the plurality of applications.
It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding process in the foregoing method embodiment for the specific working process of the apparatus described above, which is not described herein again.
The service deployment device provided by the embodiment of the application has the same technical characteristics as the service deployment method provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
The embodiment of the application also provides an electronic device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the steps of the service deployment method when executing the computer program.
Referring to the schematic structural diagram of the electronic device 800 shown in fig. 8, the electronic device includes: a processor 804, a memory 801, a bus 802, and a communication interface 803, the processor 804, the communication interface 803, and the memory 801 being connected by the bus 802; the processor 804 is configured to execute executable modules, such as computer programs, stored in the memory 801.
The memory 801 may include a high-speed random access memory (RAM: random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as one or more magnetic disk memories. Communication connections between the system network element and one or more other network elements are implemented through one or more communication interfaces 803 (which may be wired or wireless).
Bus 802 may be an ISA bus, a PCI bus, or an EISA bus, among others. Only one double arrow is shown in fig. 8, but not only one bus or one type of bus.
The memory 801 is configured to store a program, and the processor 804 executes the program after receiving an execution instruction, and the method executed by the apparatus for defining a process according to any of the foregoing embodiments of the present application may be applied to the processor 804 or implemented by the processor 804.
The processor 804 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the methods described above may be performed by integrated logic circuitry in hardware or instructions in software in processor 804. The processor 804 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The storage medium is located in the memory 801 and the processor 804 reads information in the memory 801 and in combination with its hardware performs the steps of the above method.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program executes the steps of the service deployment method when being executed by a processor.
The embodiment of the application also provides a computer readable storage medium, which stores machine executable instructions, and when the computer executable instructions are called and run by a processor, the computer executable instructions cause the processor to run the service deployment method and/or the service deployment method provided by the embodiment of the application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Finally, it should be noted that: the above examples are only specific embodiments of the present application, and are not intended to limit the scope of the present application, but it should be understood by those skilled in the art that the present application is not limited thereto, and that the present application is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. A method of service deployment, the method comprising:
acquiring application definitions of a plurality of applications corresponding to the service to be deployed, wherein the application definitions comprise dependency information of the applications;
determining a current application from the plurality of applications in turn;
determining whether one or more applications on which the current application depends have been successfully deployed based on the dependency information of the current application;
if yes, deploying the current application;
the application definition also comprises deployment file information of the application, wherein the deployment file information comprises a file for describing resources required by the application when the application is deployed;
the step of deploying the current application comprises the following steps:
calling a tool interface corresponding to the deployment file information of the current application, installing a file of the current application for describing resources required by the current application when the application is deployed, and generating a record of an application instance of the current application;
the application definition also comprises a Chart file of the application;
the step of deploying the current application comprises the following steps:
calling a Helm interface to install the Chart file of the current application, and generating a record of an application instance of the current application;
the step of deploying the current application further comprises:
judging whether the current application has a corresponding application instance or not;
if the current application does not have a corresponding application instance, executing a step of calling a tool interface corresponding to the deployment file information of the current application to install a file of the current application for describing resources required by the current application when the application is deployed, and generating a record of the application instance of the current application;
and if the current application has a corresponding application instance, determining the deployment state of the current application.
2. The method of claim 1, wherein the step of determining whether one or more applications on which the current application depends have been successfully deployed based on the dependency information of the current application comprises:
judging whether one or more applications on which the current application depends exist or not based on the dependency information of the current application;
if one or more applications on which the current application depends exist, determining whether the one or more applications on which the current application depends have been successfully deployed.
3. The method as recited in claim 2, further comprising:
and if the current application does not exist one or more applications depended on, executing the step of deploying the current application.
4. The method as recited in claim 1, further comprising:
and if not, identifying the deployment state of the service as deployment failure.
5. The method according to claim 1, wherein the method further comprises:
a directed acyclic graph is generated based on application definitions of the plurality of applications.
6. A service deployment apparatus, comprising:
the system comprises an acquisition module, a service deployment module and a service deployment module, wherein the acquisition module is used for acquiring application definitions of a plurality of applications corresponding to a service to be deployed, and the application definitions comprise dependency information of the applications;
the determining module is used for sequentially determining the current application from the plurality of applications;
the judging module is used for determining whether one or more applications on which the current application depends are successfully deployed or not based on the dependency information of the current application;
the deployment module is used for deploying the current application if the current application is the current application;
the application definition also comprises deployment file information of the application, wherein the deployment file information comprises a file for describing resources required by the application when the application is deployed; the deployment module is used for calling a tool interface corresponding to the deployment file information of the current application to install a file of the current application for describing resources required by the current application when the application is deployed, and generating a record of an application instance of the current application when the current application is deployed;
the application definition also comprises a Chart file of the application; the deployment module is also used for calling a Helm interface to install the Chart file of the current application and generating an application instance record of the current application;
the deployment module is used for judging whether the current application has a corresponding application instance or not when the current application is deployed; if the current application does not have a corresponding application instance, executing a step of calling a tool interface corresponding to a file for describing resources required by the current application in application deployment to install the file for describing the resources required by the current application in application deployment of the current application, and generating a record of the application instance of the current application; and if the current application has a corresponding application instance, determining the deployment state of the current application.
7. The apparatus of claim 6, wherein the determining module is configured to determine, based on the dependency information of the current application, whether one or more applications on which the current application depends exist when determining, based on the dependency information of the current application, whether one or more applications on which the current application depends have been deployed successfully; if one or more applications on which the current application depends exist, determining whether the one or more applications on which the current application depends have been successfully deployed.
8. The apparatus of claim 7, wherein the means for deploying is configured to deploy the current application if the current application does not have any dependent applications.
9. The apparatus of claim 6, further comprising a marking module to identify a deployment status of the service as a deployment failure if one or more applications on which the current application depends fail to deploy.
10. The apparatus of claim 6, further comprising a generation module to generate a directed acyclic graph based on application definitions of the plurality of applications.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any of the preceding claims 1 to 5 when the computer program is executed.
12. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor performs the steps of the method of any of the preceding claims 1 to 5.
CN202010414849.9A 2020-05-15 2020-05-15 Service deployment method and device and electronic equipment Active CN111596927B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010414849.9A CN111596927B (en) 2020-05-15 2020-05-15 Service deployment method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010414849.9A CN111596927B (en) 2020-05-15 2020-05-15 Service deployment method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111596927A CN111596927A (en) 2020-08-28
CN111596927B true CN111596927B (en) 2023-08-18

Family

ID=72182512

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010414849.9A Active CN111596927B (en) 2020-05-15 2020-05-15 Service deployment method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111596927B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238763A (en) * 2021-05-17 2021-08-10 京东数字科技控股股份有限公司 Application deployment method, device, storage medium and program product
CN113885956B (en) * 2021-09-29 2023-08-29 北京百度网讯科技有限公司 Service deployment method and device, electronic equipment and storage medium
CN115190010B (en) * 2022-07-01 2023-04-07 北京友友天宇系统技术有限公司 Distributed recommendation method and device based on software service dependency relationship
CN117608810A (en) * 2024-01-18 2024-02-27 腾讯科技(深圳)有限公司 Service processing method, device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106487912A (en) * 2016-10-26 2017-03-08 北京荣之联科技股份有限公司 The management being served by and dissemination method and device more
CN108762769A (en) * 2018-06-04 2018-11-06 万惠投资管理有限公司 Micro services application layout and dispositions method, device and terminal
WO2019076369A1 (en) * 2017-10-19 2019-04-25 北京金山云网络技术有限公司 Cloud platform deployment method, device, electronic device, and readable storage medium
CN109933337A (en) * 2019-03-25 2019-06-25 北京易链天下技术服务有限公司 A kind of key deployment strategy method that single machine services more
CN110276199A (en) * 2019-06-25 2019-09-24 中国—东盟信息港股份有限公司 A kind of dynamic security detection method of Kubernetes cloud native applications
CN110391938A (en) * 2019-07-26 2019-10-29 北京百度网讯科技有限公司 Method and apparatus for deployment services
CN110515628A (en) * 2019-08-09 2019-11-29 济南浪潮数据技术有限公司 Using dispositions method and device
CN111090437A (en) * 2019-11-19 2020-05-01 平安科技(深圳)有限公司 Application deployment method and device and computer readable storage medium
CN111142881A (en) * 2019-12-27 2020-05-12 浪潮云信息技术有限公司 Kubernets-based charts automation deployment system and method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110474960B (en) * 2014-12-23 2021-07-09 华为技术有限公司 Method and device for service deployment in virtual network
US10942719B2 (en) * 2018-05-15 2021-03-09 Ingram Micro Inc. System and method for connector development and integration channel development

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106487912A (en) * 2016-10-26 2017-03-08 北京荣之联科技股份有限公司 The management being served by and dissemination method and device more
WO2019076369A1 (en) * 2017-10-19 2019-04-25 北京金山云网络技术有限公司 Cloud platform deployment method, device, electronic device, and readable storage medium
CN108762769A (en) * 2018-06-04 2018-11-06 万惠投资管理有限公司 Micro services application layout and dispositions method, device and terminal
CN109933337A (en) * 2019-03-25 2019-06-25 北京易链天下技术服务有限公司 A kind of key deployment strategy method that single machine services more
CN110276199A (en) * 2019-06-25 2019-09-24 中国—东盟信息港股份有限公司 A kind of dynamic security detection method of Kubernetes cloud native applications
CN110391938A (en) * 2019-07-26 2019-10-29 北京百度网讯科技有限公司 Method and apparatus for deployment services
CN110515628A (en) * 2019-08-09 2019-11-29 济南浪潮数据技术有限公司 Using dispositions method and device
CN111090437A (en) * 2019-11-19 2020-05-01 平安科技(深圳)有限公司 Application deployment method and device and computer readable storage medium
CN111142881A (en) * 2019-12-27 2020-05-12 浪潮云信息技术有限公司 Kubernets-based charts automation deployment system and method

Also Published As

Publication number Publication date
CN111596927A (en) 2020-08-28

Similar Documents

Publication Publication Date Title
CN111596927B (en) Service deployment method and device and electronic equipment
US11593149B2 (en) Unified resource management for containers and virtual machines
CN108614726B (en) Virtual machine creation method and device
CN107896162B (en) Deployment method and device of monitoring system, computer equipment and storage medium
US10430172B2 (en) Re-configuration in cloud computing environments
AU2018310287A1 (en) Smart contract processing method and apparatus
CN108255707B (en) Development role creating method, device, equipment and storage medium of test case
US20170048008A1 (en) Method and apparatus for verification of network service in network function virtualization environment
CN111897633A (en) Task processing method and device
EP3032413B1 (en) Code generation method, compiler, scheduling method, apparatus and scheduling system
CN108809683B (en) Method and device for deploying cloud application system
CN110058894B (en) Method, apparatus and computer program product for executing applications in a hybrid cloud
US20230153158A1 (en) Method, apparatus, system, and storage medium for performing eda task
CN111176818A (en) Distributed prediction method, device, system, electronic equipment and storage medium
CN111124871A (en) Interface test method and device
CN111858727A (en) Multi-data-source data export system and method based on template configuration
KR20200046078A (en) Scalable techniques for executing custom algorithms on media items
CN104700255B (en) Multi-process processing method, device and system
WO2019117767A1 (en) Method, function manager and arrangement for handling function calls
CN113051245A (en) Method, device and system for migrating data
CN111767126A (en) System and method for distributed batch processing
US10255155B2 (en) Scheduler
CN115794384A (en) Code compiling task allocation method, device, equipment and storage medium
CN114791884A (en) Test environment construction method and device, storage medium and electronic equipment
CN107291439B (en) Target incremental data construction 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
GR01 Patent grant
GR01 Patent grant