CN109918090B - Application deployment method and device - Google Patents

Application deployment method and device Download PDF

Info

Publication number
CN109918090B
CN109918090B CN201910116621.9A CN201910116621A CN109918090B CN 109918090 B CN109918090 B CN 109918090B CN 201910116621 A CN201910116621 A CN 201910116621A CN 109918090 B CN109918090 B CN 109918090B
Authority
CN
China
Prior art keywords
deployment
application
data center
target version
machines
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
CN201910116621.9A
Other languages
Chinese (zh)
Other versions
CN109918090A (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.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and 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 Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201910116621.9A priority Critical patent/CN109918090B/en
Publication of CN109918090A publication Critical patent/CN109918090A/en
Application granted granted Critical
Publication of CN109918090B publication Critical patent/CN109918090B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention relates to the technical field of computers, and discloses an application deployment method and device. The application deployment method comprises the following steps: dividing machines of each data center into a plurality of batches; detecting the deployment configuration of each data center in the current batch, wherein the deployment configuration at least comprises a deployment strategy; and deploying the target version of the application on the machine of each data center according to the deployment strategy of each data center. According to the invention, the automatic deployment of the application is realized, a general fault-tolerant and stable application deployment scheme is provided, and the deployment configuration of each data center can be set according to requirements, so that the method is more flexible.

Description

Application deployment method and device
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to an application deployment method and device.
Background
With the rapid development of computer technology, a new version of a computer software application is released from the beginning of several months, and the software application may need to release the new version in weeks, days and hours, so that the release frequency is faster and faster. The complex requirement and a large amount of user access make the software application architecture more complex and the software application volume larger.
The inventor finds that at least the following problems exist in the prior art: in the face of complicated and various software application release steps, when software applications are deployed on a server, if manual operation is performed for deployment, misoperation may occur, and the release speed of the software applications is affected.
Disclosure of Invention
The embodiment of the invention aims to provide an application deployment method and device, which can realize automatic deployment of applications.
In order to solve the above technical problem, an embodiment of the present invention provides an application deployment method, including: dividing the machines of each data center into a plurality of batches; detecting the deployment configuration of each data center in the current batch, wherein the deployment configuration at least comprises a deployment strategy; and deploying the target version of the application on the machine of each data center according to the deployment strategy of each data center.
An embodiment of the present invention further provides an application deployment apparatus, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the application deployment method as described above.
Compared with the prior art, the method and the device have the advantages that the machines of each data center are divided into a plurality of batches, the machines of each data center are divided into the plurality of batches, the deployment configuration of each data center in the current batch is detected, the attached configuration at least comprises the deployment strategy, and then the target version of the application is deployed on the machines of each data center according to the deployment strategy of each data center, so that the automatic deployment of the application is realized, a universal, fault-tolerant and stable application deployment scheme is provided, the deployment configuration of each data center can be set according to requirements, and the method and the device are more flexible.
In addition, before detecting the deployment configuration of each data center in the current batch, the method further includes: judging whether the application to be deployed needs to be stopped for deployment or not; if the application to be deployed does not need to be stopped for deployment, the step of detecting the deployment configuration of each data center in the current batch is carried out; if the application to be deployed needs to be stopped for deployment, machine flow of each data center is closed, and the application of the target version is deployed on the machines of each data center according to batches. In this embodiment, if the application to be deployed with the target version needs to be shutdown and deployed, the machine flow of each data center is closed, and the application with the target version is deployed on the machines of each data center in batches, that is, whether shutdown and deployment are needed can be determined according to the deployment requirement of the application.
In addition, the deployment configuration further comprises a deployment failure number threshold; when deploying the application of the target version on the machines of each data center according to the deployment strategy of each data center, recording the number of the machines which fail to deploy the application of the target version; and when the number of the machines which fail to deploy the target version of the application reaches a deployment failure frequency threshold value, stopping deploying the target version of the application on the machines of each data center. In the embodiment, the number of the machines with failed application for deploying the target version is recorded, so that individual machines with failed deployment can be ignored, and the whole application release process is prevented from being influenced; meanwhile, when the number of the machines with failed deployment reaches the threshold of the number of failed deployment times, the deployment of the application of the target version on the machines of each data center can be stopped in time, and whether the application of the target version has problems or not is checked, so that the rapid repair is facilitated.
In addition, the deployment configuration also includes a flow control policy; deploying the application of the target version on the machine of each data center according to the deployment strategy of each data center, which specifically comprises the following steps: and deploying the application of the target version on the machine of each data center according to the deployment strategy of each data center by adopting a flow control strategy. In this embodiment, the deployment configuration further includes a flow control policy, so that the target version of the application can be deployed on the machines of each data center according to the deployment policy of each data center by using the flow control policy.
In addition, the flow control policy is any one of: a Nginx flow control policy, an openness flow control policy, an Rpc flow control policy, and a flow proportion control policy. The present embodiment provides specific contents of the flow control policy.
In addition, before deploying the target version of the application on the machine of each data center according to the deployment policy of each data center, the method further includes: judging whether the current batch is a batch in a preset order; if the current batch is a batch in a preset sequence, deploying the application of the target version on the machines of each data center according to the deployment strategy of each data center, and returning the application on at least one preset machine from the target version to the previous version; if the application of at least one machine is successfully returned from the target version to the previous version, the application of the target version is deployed on at least one machine again; and if the current batch is not the batch in the preset sequence, the step of deploying the target version of the application on the machine of each data center according to the deployment strategy of each data center is carried out. In the embodiment, at least one machine is selected from batches in a preset sequence to perform version rollback verification, and whether the application of the deployment target version is successful or not can be verified firstly; and secondly, whether the version rollback verification is effective can be verified, so that the version rollback can be performed quickly in time when the application has problems.
In addition, the batch in the preset order is the first batch in the plurality of batches. In the present embodiment, version rollback verification is performed in the first batch, and the function of the version rollback verification function can be maximized.
In addition, after deploying the target version of the application on the machines of each data center according to the deployment strategy of each data center, the method further includes: and storing the application of the target version and the application configuration corresponding to the application of the target version in a preset file server. In this embodiment, version management is also performed on the application configuration of the application, so as to quickly locate the application version with configuration errors.
In addition, the deployment strategy is shutdown deployment or grayscale deployment. The present embodiment provides specific contents of the deployment policy.
In addition, the grayscale is deployed as any one of: AB deployment, canary deployment, blue-green deployment and custom gray deployment. The embodiment provides specific contents of gray level deployment.
In addition, the deployment strategy is self-defined gray level deployment; deploying the target version of the application on the machine of each data center according to the deployment strategy of each data center, wherein the deployment strategy comprises the following steps: according to the user-defined gray level deployment, acquiring the machines planned to be deployed in each data center, and closing the flow of the machines planned to be deployed; and deploying the target version of the application on the machine planned to be deployed, and starting the machine traffic planned to be deployed. The embodiment provides a specific implementation mode for deploying the target version of the application on the machine of each data center according to the deployment strategy of each data center when the deployment strategy is the user-defined gray deployment.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a detailed flowchart of an application deployment method according to a first embodiment of the present invention;
FIG. 2 is a detailed flowchart of an application deployment method according to a second embodiment of the present invention;
FIG. 3 is a detailed flowchart of an application deployment method according to a third embodiment of the present invention;
FIG. 4 is a detailed flowchart of an application deployment method according to a fourth embodiment of the present invention
FIG. 5 is a detailed flowchart of an application deployment method according to a fifth embodiment of the present invention;
fig. 6 is a specific flowchart of an application deployment method according to a sixth embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
The first embodiment of the present invention relates to an application deployment method applied to an application deployment device, where the application deployment device may be a server, and may be capable of deploying an application of a target version on a machine of each data center, where the machine may be a server, and one data center generally includes multiple machines, and the application deployment is one of the steps of an entire application release process, and before the application deployment, the method further includes: the steps of pulling the trunk code, compiling and constructing the code, verifying the test, packaging and the like are not described in detail herein.
A specific flow of the application deployment method according to this embodiment is shown in fig. 1.
Step 101, dividing the machines of each data center into a plurality of batches.
Specifically, multiple applications in different places are a general solution with high availability, most of the applications need to be deployed in different data centers, when a target version of an application is deployed on a machine of each data center, the machine of each data center is first divided into multiple batches, one batch may include multiple data centers, and one batch may include part or all of the machines of each data center, that is, the machines of one data center, may be divided into different batches. In the present embodiment, the machine may be divided into a machine room, a cabinet, and other levels, which may be determined according to actual application needs.
Step 102, detecting the deployment configuration of each data center in the current batch.
Specifically, each data center can set different deployment configurations, and when an application of a target version is deployed on machines of the data centers in a current batch, the deployment configurations of the data centers are obtained, wherein the deployment configurations at least comprise deployment strategies, and the deployment strategies are shutdown deployment or grayscale deployment; the grayscale deployment is any one of: AB deployment, canary deployment, blue-green deployment and custom gray deployment.
And 103, deploying the target version of the application on the machine of each data center according to the deployment strategy of each data center.
How to deploy the target version of the application on the machine of the data center is described in detail below according to different deployment strategies.
1. Taking a data center in a current batch as an example, when an application of a target version is deployed to a machine of the data center, closing all machine traffic in the data center, that is, all machines in the data center do not provide services any more, and after the deployment of the application of the target version by all machines in the data center is completed, opening all machine traffic in the data center, that is, all machines in the data center provide services with the application of the target version.
2. And AB deployment, taking a data center in the current batch as an example, when the application of the target version is deployed to the machine of the data center, dividing all machines in the data center into two groups A and B, when the application of the target version is deployed to the machine of the group A, firstly closing the machine flow of the group A, after the machine of the group A is deployed with the application of the target version, then opening the machine flow of the group A, then closing the machine flow of the group B, and after the machine of the group B is deployed with the application of the target version, then opening the machine flow of the group B, and finally completing the machine deployment of the data center.
3. Blue-green deployment, taking a data center in the current batch as an example, defining the original machine of the data center as a blue group, taking a batch of new machines, deploying the application of a target version on the new machines, and defining the application as a green group; and starting the traffic of the green group of machines, namely enabling the machines of the green group of machines to provide services according to the target version of the application, observing for a period of time, and if the green group of machines provide the services normally, closing the traffic of the blue group of machines, and recycling the blue group of machines.
4. Canary deployment, taking one data center in the current batch as an example, is similar to the AB deployment, except that the canary deployment is only divided into two groups, namely a group a and a group B, and the canary deployment is divided into N groups, wherein N is an integer greater than or equal to 3.
5. And (3) performing custom gray deployment, taking a data center in the current batch as an example, defining a machine planned to be deployed in the custom gray deployment, so as to obtain the machine planned to be deployed in the data center according to the custom gray deployment, then closing the flow of the deployed machine, after the deployment of the application of the target version on the machine planned to be deployed is completed, starting the flow of the machine planned to be deployed, and if the machine is not in the range of the planned deployment, not deploying the application of the target version.
In this embodiment, the application of the target version may be the application of the latest version, or may be an application of any previous version.
Compared with the prior art, the method and the device have the advantages that the machines of each data center are divided into a plurality of batches, the deployment configuration of each data center in the current batch is detected, the attached configuration at least comprises the deployment strategy, and then the target version of the application is deployed on the machines of each data center according to the deployment strategy of each data center, so that the automatic deployment of the application is realized, a general, fault-tolerant and stable application deployment scheme is provided, the deployment configuration of each data center can be set according to requirements, and the method and the device are more flexible.
A second embodiment of the present invention relates to an application deployment method. The second embodiment is an improvement on the first embodiment, and the main improvement lies in that: in the embodiment, the judgment of whether the application needs to be shut down for deployment is added.
A specific flow of the application deployment method according to this embodiment is shown in fig. 2.
Step 201, step 204, and step 205 are substantially the same as steps 101 to 103, and are not described herein again, but mainly differ in that step 202 and step 203 are added, which are specifically as follows:
step 202, judging whether the application of the target version to be deployed needs to be stopped for deployment. If yes, go to step 203; if not, go to step 204.
Specifically, for some applications, which need to be deployed for shutdown, the applications are preset to be deployed for shutdown, and step 203 is performed; otherwise, step 204 is entered to detect the deployment configuration of each data center in the current batch.
And step 203, closing the machine flow of each data center, and deploying the target version of the application on the machines of each data center according to batches.
Specifically, the machine traffic of each data center is closed, that is, all the machine traffic of each batch is closed, then the target version of the application is deployed on the machines of each data center according to the sequence of the batches, after the deployment of the target version of the application on the machines of each data center of the current batch is completed, the machine traffic of each data center of the current batch is opened, and then the target version of the application is deployed on the machines of each data center of the next batch.
Compared with the first embodiment, in the embodiment, if the application to be deployed with the target version needs to be shutdown and deployed, the machine flow of each data center is closed, and the application of the target version is deployed on the machines of each data center in batches, that is, whether shutdown and deployment are needed can be judged according to the deployment requirement of the application. .
The third embodiment of the present invention relates to an application deployment method, and the third embodiment is an improvement on the first embodiment, and the main improvements are: in this embodiment, the number of deployment failures is determined additionally.
A specific flow of the application deployment method according to this embodiment is shown in fig. 3.
Step 301 and step 302 are substantially the same as step 101 and step 102, and are not described herein again, the main difference is that step 304 and step 305 are added, which are specifically as follows:
step 303, deploying the target version of the application on the machines of each data center according to the deployment strategy of each data center, and recording the number of machines which fail to deploy the target version of the application.
Specifically, when the target version of the application is deployed on the machines of each data center according to the deployment strategy of each data center, the failure of deploying the target version of the application on the machines due to external influence is received, and the number of the machines with the failure of deploying the target version of the application is recorded; external influences such as network reasons, hardware reasons, etc.
Step 304, judging whether the number of the machines which fail in deploying the application of the target version reaches a deployment failure frequency threshold value; if yes, go to step 305; if not, the process is ended directly.
Specifically, the deployment configuration further includes a deployment failure time threshold, and whether the number of recorded application-failed machines of the deployment target version reaches the deployment failure time threshold is determined, if yes, step 305 is performed; if not, the number of the machines which fail to deploy the application of the target version is smaller than the threshold of the failure times of deployment, the whole application release process is not influenced, and the process is directly finished.
The number of machines failing to deploy the application of the target version may be one data center, one batch, or a cumulative number of machines failing to deploy the application of the target version.
Step 305, stopping deploying the target version of the application on the machines of the data centers.
Specifically, when the number of machines failing to deploy the target version of the application reaches the deployment failure number threshold, it is indicated that the target version of the application has a problem, and the deployment of the target version of the application on the machines of each data center is stopped.
Compared with the first embodiment, the embodiment records the number of the machines which fail in deploying the application of the target version, so that individual machines which fail in deploying can be ignored, and the whole application release process is prevented from being influenced; meanwhile, when the number of the machines with failed deployment reaches the threshold of the failure times of deployment, the deployment of the application of the target version on the machines of each data center can be stopped in time, and whether the application of the target version has problems or not is checked, so that the rapid repair is facilitated. This embodiment can be used as an improvement over the second embodiment, and can achieve the same technical effects.
A fourth embodiment of the present invention relates to an application deployment method. The fourth embodiment is an improvement on the first embodiment, and the main improvements are as follows: a flow control policy can be employed to deploy a target version of an application on machines of each data center in accordance with a deployment policy of each data center.
A specific flow of the application deployment method according to this embodiment is shown in fig. 4.
Step 401 and step 402 are substantially the same as step 101 and step 102, and are not described herein again, but mainly differ in that:
step 403, deploying the application of the target version on the machine of each data center according to the deployment strategy of each data center by using the flow control strategy.
Specifically, the deployment configuration further includes a flow control policy, when the target version of the application is deployed on the machine of each data center according to the deployment policy of each data center, taking one data center as an example, when the target version of the application is deployed on the machine of the data center, the machine flow of the data center needs to be closed first, at this time, the machine flow can be closed by using the flow control policy, and after the machine of the data center finishes deploying the target version of the application, the machine flow is opened by using the flow control policy.
In this embodiment, the flow control policy is any one of the following: the method comprises the steps of a Nginx flow control strategy, an Openresty flow control strategy, an Rpc flow control strategy and a flow proportion control strategy, wherein the Nginx flow control strategy and the Openresty flow control strategy are used for closing or opening machine flow by controlling a memory of a machine; the Rpc flow control strategy is also to close or open the machine flow by modifying the memory of the machine, and the flow proportional control strategy is to close or open the machine flow by a preset load directional strategy.
In addition, the deployment configuration may further include the number of parallel deployments, so that the number of parallel deployments of the application of the target version can be set in the machine deployment of the data center.
Compared with the first embodiment, the deployment configuration further includes a flow control policy, so that the target version of the application can be deployed on the machines of each data center according to the deployment policy of each data center by using the flow control policy. The present embodiment can be used as an improvement over the second or third embodiment, and can achieve the same technical effects.
A fifth embodiment of the present invention relates to an application deployment method. The fifth embodiment is an improvement on the first embodiment, and the main improvements are as follows: version rollback verification is added.
A specific flow of the application deployment method according to this embodiment is shown in fig. 5.
Step 501, step 502 and step 506 are substantially the same as steps 101 to 103, and are not described herein again, and the main difference is that steps 503 to 505 are added, specifically as follows:
step 503, determining whether the current batch is a batch in a preset order. If yes, go to step 504; if not, go to step 506.
Specifically, it is determined whether the current batch is a batch in a preset order, if yes, go to step 504; if not, step 506 is entered to deploy the target version of the application on the machines of the data centers according to the deployment strategy of the data centers.
Step 504, deploying the target version of the application on the machine of each data center according to the deployment strategy of each data center, and rolling back the preset application on at least one machine from the target version to the previous version.
Specifically, the target version of the application is deployed on the machines of each data center according to the deployment policy of each data center, the specific deployment manner is similar to step 103 in the first embodiment, and is not described herein again, and the application on at least one preset machine is backed from the target version to the previous version. The preset at least one machine can be any one or more machines in the data center.
And 505, if the application of the at least one machine is successfully rolled back from the target version to the last version, redeploying the application of the target version in the at least one machine.
Specifically, whether the rollback of the application of the at least one machine from the target version to the previous version is successful is judged, if so, the rollback of the version is effective, and the application of the target version is deployed on the at least one machine again.
In this embodiment, the batch in the preset order is the first batch of the multiple batches, so that the version rollback verification is performed in the first batch, and the function of the version rollback verification can be exerted to the maximum extent.
Compared with the first embodiment, in the embodiment, at least one machine is selected from batches in a preset sequence for version rollback verification, and whether the application of the target version is deployed is successful can be verified firstly; and secondly, whether the version rollback verification is effective can be verified, so that the version rollback can be performed quickly in time when the application has problems. The present embodiment can be used for improvement of the second to fourth embodiments, and can achieve the same technical effects.
A sixth embodiment of the present invention relates to an application deployment method. The sixth embodiment is an improvement on the first embodiment, and the main improvements are as follows: and carrying out version management on the configuration of the application.
A specific flow of the application deployment method according to this embodiment is shown in fig. 6.
Steps 601 to 603 are substantially the same as steps 101 to 103, and are not described herein again, the main difference is that step 604 is added, which is as follows:
step 604, storing the application of the target version and the application configuration corresponding to the application of the target version in a preset file server.
In particular, the application configuration of an application may be managed using a version management tool, which may be a svn, git, or like tool. After the target version of application is deployed on the machines of the data centers according to the deployment strategy of the data centers, storing the target version of application and the application configuration corresponding to the target version of application into a preset file server, namely storing the installation package of the application of each version and the corresponding application configuration into the preset file server, so as to quickly perform version rollback when the target version of application has problems; meanwhile, the configuration problem of the application can be positioned more quickly. The application configurations applied to different environments can be distinguished by using different branches, for example, an internal test environment, a pre-release environment, an external test environment, a formal production environment and the like, so that the application configurations of different environments can be isolated, and the application configurations of different environments are prevented from being confused; meanwhile, the modification of the application configuration each time can be recorded, so that the change of any application configuration can be conveniently traced.
Compared with the first embodiment, the present embodiment also performs version management on application configuration of an application, so as to quickly locate an application version with a configuration error. The present embodiment can be used as an improvement over the second to fifth embodiments, and can achieve the same technical effects.
A seventh embodiment of the present invention relates to an application deployment apparatus, where the application deployment apparatus may be a server, and may be capable of deploying an application of a target version on a machine of each data center, where the machine may be the server, and one data center generally includes multiple machines, and the application deployment is one of steps of an entire application distribution process, and before the application deployment, the application deployment apparatus further includes: the steps of pulling the trunk code, compiling and constructing the code, verifying and testing, packaging and the like are not described in detail herein. The application deployment apparatus comprises at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the application deployment method of any one of the first to sixth embodiments.
Where the memory and processor are connected by a bus, the bus may comprise any number of interconnected buses and bridges, the buses connecting together one or more of the various circuits of the processor and the memory. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processor.
The processor is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory may be used to store data used by the processor in performing operations.
An eighth embodiment of the present invention relates to an application deployment system, including the application deployment apparatus of the seventh embodiment and at least one data center; each data center includes at least one machine.
Since the first to sixth embodiments correspond to the present embodiment, the present embodiment can be implemented in cooperation with the first to sixth embodiments. The related technical details mentioned in the first to sixth embodiments are still valid in this embodiment, and the technical effects achieved in the first to sixth embodiments can also be achieved in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment.
Compared with the prior art, the method and the device have the advantages that the machines of each data center are divided into a plurality of batches, the deployment configuration of each data center in the current batch is detected, the attached configuration at least comprises the deployment strategy, and then the target version of the application is deployed on the machines of each data center according to the deployment strategy of each data center, so that the automatic deployment of the application is realized, a general, fault-tolerant and stable application deployment scheme is provided, the deployment configuration of each data center can be set according to requirements, and the method and the device are more flexible.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples of practicing the invention, and that various changes in form and detail may be made therein without departing from the spirit and scope of the invention in practice.

Claims (11)

1. An application deployment method, comprising:
dividing machines of each data center into a plurality of batches;
under the condition that the application of a target version to be deployed does not need to be shut down for deployment, detecting the deployment configuration of each data center in the current batch, wherein the deployment configuration at least comprises a deployment strategy;
deploying a target version of the application on machines of each of the data centers according to the deployment policy of each of the data centers;
wherein the deployment configuration comprises a flow control policy; deploying the application of the target version on the machine of each data center according to the deployment strategy of each data center specifically comprises:
closing the flow of the data centers by adopting the flow control strategy, and deploying the application of a target version on the machine of each data center according to the deployment strategy of each data center;
and after the deployment of the application of the target version is finished, opening the flow of the data center by adopting the flow control strategy.
2. The application deployment method according to claim 1, further comprising, before the detecting the deployment configuration of each of the data centers in the current batch:
judging whether the application of the target version to be deployed needs to be stopped for deployment or not;
if the application of the target version to be deployed does not need to be deployed in a halt mode, entering the step of detecting the deployment configuration of each data center in the current batch;
if the application of the target version to be deployed needs to be stopped for deployment, machine traffic of each data center is closed, and the application of the target version is deployed on the machines of each data center according to batches.
3. The application deployment method of claim 1 wherein the deployment configuration further comprises a deployment failure number threshold;
when the application of the target version is deployed on the machines of the data centers according to the deployment strategy of the data centers, recording the number of machines which fail to deploy the application of the target version;
and when the number of the machines which fail to deploy the application of the target version reaches the threshold of the failure times of deployment, stopping deploying the application of the target version on the machines of each data center.
4. The application deployment method of claim 1, wherein the flow control policy is any one of: a Nginx flow control policy, an openness flow control policy, an Rpc flow control policy, and a flow proportion control policy.
5. The application deployment method according to claim 1, further comprising, before the deploying a target version of the application on the machines of the data centers according to the deployment policy of the data centers:
judging whether the current batch is a batch in a preset order;
if the current batch is a batch in a preset sequence, deploying the application of a target version on the machine of each data center according to the deployment strategy of each data center, and backing the application on at least one preset machine from the target version to a previous version;
if the application of the at least one machine is successfully rolled back from the target version to the last version, redeploying the application of the target version in the at least one machine;
if the current batch is not a batch in a preset sequence, the step of deploying the target version of the application on the machine of each data center according to the deployment strategy of each data center is carried out.
6. The application deployment method of claim 5, wherein the batch in the preset order is a first batch of the plurality of batches.
7. The application deployment method according to claim 1, further comprising, after the deploying a target version of the application on the machines of the data centers according to the deployment policy of the data centers:
and storing the application of the target version and the application configuration corresponding to the application of the target version to a preset file server.
8. The application deployment method of claim 1, wherein the deployment policy is a shutdown deployment or a grayscale deployment.
9. The application deployment method of claim 8, wherein the grayscale deployment is any one of:
AB deployment, canary deployment, blue-green deployment and custom gray deployment.
10. The application deployment method of claim 9, wherein the deployment policy is a custom grayscale deployment;
the deploying, on a machine of each of the data centers, the application of a target version according to the deployment policy of each of the data centers includes:
according to the user-defined gray level deployment, obtaining planned deployment machines in each data center, and closing the flow of the planned deployment machines;
deploying a target version of the application on the planned deployment machine, and turning on machine traffic of the planned deployment.
11. An application deployment apparatus, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the application deployment method of any one of claims 1 to 10.
CN201910116621.9A 2019-02-15 2019-02-15 Application deployment method and device Active CN109918090B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910116621.9A CN109918090B (en) 2019-02-15 2019-02-15 Application deployment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910116621.9A CN109918090B (en) 2019-02-15 2019-02-15 Application deployment method and device

Publications (2)

Publication Number Publication Date
CN109918090A CN109918090A (en) 2019-06-21
CN109918090B true CN109918090B (en) 2022-11-04

Family

ID=66961559

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910116621.9A Active CN109918090B (en) 2019-02-15 2019-02-15 Application deployment method and device

Country Status (1)

Country Link
CN (1) CN109918090B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181443B (en) * 2019-07-01 2023-04-07 中国移动通信集团浙江有限公司 Automatic service deployment method and device and electronic equipment
CN112446714A (en) * 2020-12-11 2021-03-05 上海中通吉网络技术有限公司 Server upgrading method, device and equipment for express after-sale work order processing system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060245354A1 (en) * 2005-04-28 2006-11-02 International Business Machines Corporation Method and apparatus for deploying and instantiating multiple instances of applications in automated data centers using application deployment template
CN102368718B (en) * 2011-06-27 2013-11-06 奇智软件(北京)有限公司 Monitoring program method and system thereof
CN103546387A (en) * 2012-07-11 2014-01-29 神州数码信息系统有限公司 Software flow control method
CN106470243A (en) * 2016-09-12 2017-03-01 济南浪潮高新科技投资发展有限公司 A kind of deployment system of data center and method
CN107632834A (en) * 2017-09-08 2018-01-26 北京小度信息科技有限公司 Self-defined application dispositions method, device, equipment and computer-readable recording medium
CN109240708B (en) * 2018-07-02 2019-11-05 北京百度网讯科技有限公司 Using dispositions method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109918090A (en) 2019-06-21

Similar Documents

Publication Publication Date Title
CN109791516B (en) Monitoring and control unit for use in autonomous systems with self-X characteristics
US8423829B2 (en) Failure analysis apparatus, method
CN109918090B (en) Application deployment method and device
CN110489086A (en) Process executes control method, device, computer equipment and storage medium
US20100312541A1 (en) Program test device and program
CN111199353A (en) Test method and test system
CN111506358B (en) Method and device for updating container configuration
CN114237754A (en) Data loading method and device, electronic equipment and storage medium
CN103154755B (en) Test apparatus for generating reference scan chain test data, test system and method
US6539338B1 (en) Self-diagnostic testing of a network interface adapter
CN112858876A (en) Self-adaptive chip automatic testing method
CN113127331B (en) Test method and device based on fault injection and computer equipment
KR101252358B1 (en) Apparatus and method for testing plc command
CN114356769A (en) Software learning method, device, equipment and storage medium
CN113672260A (en) CPU initialization method for processor
US20200349304A1 (en) Method, apparatus, device, and medium for implementing simulator
JP5591588B2 (en) Plant monitoring apparatus and updating method thereof
WO2003058444A1 (en) Method and system for rollback of software system upgrade
CN117192343B (en) Chip testing method based on auxiliary system, electronic equipment and medium
CN109783291A (en) SSD test method, device and system based on SATA protocol direct fault location
AU2023201696B2 (en) Method and device for determining coverage in HIL testing, and storage medium
CN112256554B (en) Method and equipment for testing based on scene test cases
CN114474149B (en) Automatic test method, device, server and readable storage medium
US10593419B1 (en) Failing read count diagnostics for memory built-in self-test
CN117389906A (en) Automatic regression testing method and system based on full-link abnormal injection

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