CN110597682A - Application deployment method and device, computer equipment and storage medium - Google Patents

Application deployment method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110597682A
CN110597682A CN201910648310.7A CN201910648310A CN110597682A CN 110597682 A CN110597682 A CN 110597682A CN 201910648310 A CN201910648310 A CN 201910648310A CN 110597682 A CN110597682 A CN 110597682A
Authority
CN
China
Prior art keywords
deployment
array
nodes
arrays
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.)
Granted
Application number
CN201910648310.7A
Other languages
Chinese (zh)
Other versions
CN110597682B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910648310.7A priority Critical patent/CN110597682B/en
Publication of CN110597682A publication Critical patent/CN110597682A/en
Application granted granted Critical
Publication of CN110597682B publication Critical patent/CN110597682B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • 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 application belongs to the technical field of information security, and relates to an application deployment method, an application deployment device, computer equipment and a storage medium, wherein the application deployment method comprises the following steps: acquiring a current application deployment mode, and carrying out quantization processing on the current application deployment mode to obtain a current deployment array; acquiring the number M of nodes of preset application deployment and the number N of clusters of M nodes expected to be distributed; acquiring a plurality of deployment modes of M nodes, respectively carrying out quantization processing on the plurality of deployment modes of the M nodes to obtain a plurality of deployment arrays, and sequencing the plurality of deployment arrays of the M nodes; acquiring a standard deployment array from a plurality of deployment array queues according to the cluster number N; comparing the current deployment array with the standard deployment array, and judging whether the ordering relation between the current deployment array and the standard deployment array meets a preset condition or not; and if so, sending alarm information and adjusting the current deployment mode. The invention can improve the high availability of application deployment.

Description

Application deployment method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of information security technologies, and in particular, to an application deployment method and apparatus, a computer device, and a storage medium.
Background
In the prior art, with the maturity and development of micro service frameworks, services are split according to different dimensions, one request often involves multiple different application nodes, and in order to ensure high availability of the services, one application is deployed on multiple servers, but if the servers share one physical machine or storage, once the physical machine is down or the storage device is abnormal, all service systems are not available. Usually, when the application is deployed, operation and maintenance personnel plan a deployment scheme and a deployment server in advance, and the operation and maintenance personnel are required to manually check and judge the deployment position of the application, so that the time consumption is long, and errors are easy to occur; moreover, due to the complexity of micro-service deployment, the operation and maintenance difficulty is gradually increased, and it is difficult for operation and maintenance personnel to manually check and ensure the high availability of application deployment; therefore, the existing application deployment mode has the problem of low high availability.
Disclosure of Invention
An object of an embodiment of the present application is to provide an application deployment method, so as to solve the problem in the prior art that application deployment is high in availability and low in availability.
In order to solve the above technical problem, an embodiment of the present application provides an application deployment method, which adopts the following technical solutions:
acquiring a current application deployment mode, and carrying out quantization processing on the current application deployment mode to obtain a current deployment array;
acquiring the number M of nodes deployed by a preset application and the number N of clusters expected to be distributed by the M nodes;
acquiring a plurality of deployment modes of the M nodes, respectively carrying out quantization processing on the plurality of deployment modes of the M nodes to obtain a plurality of corresponding deployment arrays, and sequencing the plurality of deployment arrays of the M nodes;
acquiring a standard deployment array from the sequenced deployment array queues according to the cluster number N;
comparing the current deployment array with the standard deployment array, and judging whether the ordering relation between the current deployment array and the standard deployment array meets a preset condition or not;
and if so, sending alarm information and adjusting the current deployment mode.
Further, the step of obtaining the multiple deployment modes of the M nodes, respectively performing quantization processing on the multiple deployment modes of the M nodes to obtain corresponding multiple deployment arrays, and sorting the multiple deployment arrays of the M nodes includes:
acquiring a plurality of deployment modes of M nodes sequentially deployed in 1-M clusters, and quantifying the deployment modes of the M nodes sequentially deployed in 1-M clusters to obtain a plurality of corresponding deployment arrays;
acquiring the array length of each deployment array;
calculating the array variance of each deployment array;
acquiring a maximum element value in each deployment array;
and sequencing the deployment arrays according to the array length, the array variance and the maximum element value in the deployment arrays of each deployment array.
Further, the step of sorting the deployment arrays according to the array length, the array variance, and the maximum element value in the deployment arrays of each deployment array specifically includes:
sequentially comparing the array lengths of the plurality of deployment arrays with each other;
if the array lengths of the deployment arrays are the same, comparing the array variances of the deployment arrays, and sorting according to the array variances and the sizes;
if the array lengths of the deployment arrays are different, comparing the maximum element values in the deployment arrays; if the maximum element values in the deployment array are different in size, sorting the maximum element values according to the size of the maximum element values in the deployment array; and if the maximum element values in the deployment array are the same, sorting the deployment array according to the array length of the deployment array from small to large.
Further, the step of obtaining the standard deployment array from the sorted deployment array queues according to the cluster number N includes:
and acquiring the deployment array with the minimum group difference in the deployment arrays of the M nodes deployed on the N clusters from the sequenced deployment arrays, and determining the deployment array with the minimum group difference in the deployment arrays of the M nodes deployed on the N clusters as a standard deployment array.
Further, the step of comparing the current deployment array with the standard deployment array and determining whether the ordering relationship between the current deployment array and the standard deployment array meets a preset condition includes:
acquiring a sequencing sequence number of a current deployment array and a standard deployment array in a sequencing queue;
comparing the sequencing sequence numbers of the current deployment array and the standard deployment array;
and if the current deployment array is arranged. And before the standard deployment array, confirming that the current deployment array meets a preset condition.
In order to solve the above technical problem, an embodiment of the present application further provides an application deployment apparatus, which adopts the following technical solutions:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a current application deployment mode and carrying out quantization processing on the current application deployment mode to obtain a current deployment array;
the second acquisition module is used for acquiring the number M of nodes of preset application deployment and the number N of clusters expected to be distributed by the M nodes;
the sequencing module is used for acquiring a plurality of deployment modes of the M nodes, respectively carrying out quantization processing on the plurality of deployment modes of the M nodes to obtain a plurality of corresponding deployment arrays, and sequencing the plurality of deployment arrays of the M nodes;
a third obtaining module, configured to obtain a standard deployment array from the sorted multiple deployment array queues according to the cluster number N;
the judging module is used for comparing the current deployment array with the standard deployment array and judging whether the ordering relation between the current deployment array and the standard deployment array meets a preset condition or not;
and the alarm module is used for sending alarm information and adjusting the current deployment mode if the requirement is met.
Further, the sorting module comprises:
the first obtaining submodule is used for obtaining a plurality of deployment modes of M nodes sequentially deployed in 1 to M clusters, and quantifying the plurality of deployment modes of the M nodes sequentially deployed in 1 to M clusters respectively to obtain a plurality of corresponding deployment arrays;
the second acquisition submodule is used for acquiring the array length of each deployment array;
the calculation submodule is used for calculating the array variance of each deployment array;
the third obtaining submodule is used for obtaining the maximum element value in each deployment array;
and the sequencing submodule is used for sequencing the deployment arrays according to the array length, the array variance and the maximum element value in the deployment arrays of each deployment array.
Further, the sorting sub-module comprises:
the first comparison subunit is used for sequentially comparing the array lengths of the plurality of deployment arrays with one another;
the second comparison subunit is used for comparing the array variance of the deployment array if the array lengths of the deployment array are the same, and sorting the deployment array according to the size of the array variance and the size;
the third comparison subunit is used for comparing the maximum element value in the deployment array if the array lengths of the deployment array are different; if the maximum element values in the deployment array are different in size, sorting the maximum element values according to the size of the maximum element values in the deployment array; and if the maximum element values in the deployment array are the same, sorting the deployment array according to the array length of the deployment array from small to large.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which adopts the following technical solutions: the application deployment method comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of the application deployment method of the embodiment when executing the computer program.
In order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solutions:
the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the application deployment method described in the above embodiments.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects: acquiring a current application deployment mode, and carrying out quantization processing on the current application deployment mode to obtain a current deployment array; acquiring the number M of nodes deployed by a preset application and the number N of clusters expected to be distributed by the M nodes, wherein the N is less than or equal to M; acquiring a plurality of deployment modes of the M nodes, respectively carrying out quantization processing on the plurality of deployment modes of the M nodes to obtain a plurality of corresponding deployment arrays, and sequencing the plurality of deployment arrays of the M nodes; acquiring a standard deployment array from the sequenced deployment array queues according to the cluster number N; comparing the current deployment array with the standard deployment array, and judging whether the ordering relation between the current deployment array and the standard deployment array meets a preset condition or not; and if the current deployment mode is met, sending alarm information and adjusting the current deployment mode. The method comprises the steps of obtaining a standard deployment array, namely a standard deployment mode, by obtaining the number M of application nodes and the number N of expected deployment clusters, detecting the current deployment mode, comparing the current deployment mode with the standard deployment mode, alarming if preset conditions are met, judging that the high availability of the current deployment mode is low, carrying out automatic migration adjustment, stopping alarming after the current deployment mode is adjusted to be not met by the preset conditions, judging the uniformity of the current deployment mode, and realizing application deployment adjustment. Thereby improving the high availability of current application deployments.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of an application deployment method of the present application;
FIG. 3 is a flow diagram for one embodiment of step 203 of FIG. 2;
FIG. 4 is a flow diagram of one embodiment of step 305 of FIG. 3;
FIG. 5 is a flow diagram for one embodiment of step 204 of FIG. 2;
FIG. 6 is a flow diagram for one embodiment of step 205 of FIG. 2;
FIG. 7 is a schematic block diagram of one embodiment of an application deployment apparatus in accordance with the present application;
FIG. 8 is a block diagram illustrating one embodiment of the sequencing module of FIG. 7;
FIG. 9 is a block diagram of one embodiment of the sort sub-module of FIG. 8;
FIG. 10 is a schematic block diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the application deployment method provided in the embodiment of the present application is generally executed by a server/terminal device, and accordingly, the application deployment apparatus is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continuing reference to FIG. 2, a flowchart of one embodiment of an application deployment method in accordance with the present application is shown. The application deployment method comprises the following steps:
step 201, obtaining a current application deployment mode, and performing quantization processing on the current application deployment mode to obtain a current deployment array.
In this embodiment, the electronic device (e.g., the server/terminal device shown in fig. 1) on which the application deployment method operates. The current deployment mode is a deployment mode in which the application is already deployed currently. The current deployment array may be formed according to the number of application deployment nodes and the number of clusters, or obtained by correspondingly quantizing the application deployment mode. The node here corresponds to a server, and the cluster is a group of mutually independent computers interconnected through a high-speed network, which constitute a group and are managed in a single system mode. A client interacts with a cluster, which appears as a stand-alone server. The cluster configuration is for improved availability and scalability. The current deployment array is convenient for a user to know the number of nodes on which the application is currently deployed and the number of clusters on which the nodes are respectively distributed, so that the application deployment is more data-based, and the application deployment condition is convenient to analyze. For example, a user wants to deploy the application on 8 nodes, and expects to deploy the 8 nodes on 4 clusters respectively; and the user is unknown to the number of clusters in the system, so the 8 nodes are input into the system, the system randomly deploys the 8 nodes on a plurality of clusters, the specific number of the clusters to be deployed is unknown, and whether the application deployment is uniform or reasonable is also unknown. Only when the system waits for automatic detection, identification and return of the current deployment mode of the current application, and the current deployment mode is subjected to quantization processing to obtain a current deployment array, the user knows the deployment condition of the application, and the user can obtain the current deployment mode of the application through a display screen and the like. However, the current application deployment situation obtained by the user is not necessarily that 8 nodes desired by the user are distributed on 4 clusters, for example, the obtained current deployment array is [1,1,6], [1,1,6] the deployment array indicates that the application is deployed on 3 clusters, and 1 node is deployed on 1 cluster, and 6 nodes are deployed on the other 1 cluster. Such a deployment approach may be unreasonable because when the cluster in which 6 nodes are deployed is damaged, that is, 6 nodes are unavailable, and only the remaining 2 nodes are available, such an application deployment approach has a low high availability ratio.
Step 202, acquiring the number M of nodes deployed by a preset application and the number N of clusters expected to be distributed by the M nodes.
In this embodiment, the number M of nodes deployed by the preset application is input by the user in advance according to the application requirement, and the value of M is an integer greater than or equal to 2. The cluster number N is also preset and input by a user according to needs, and the value of N is less than or equal to M. The value of the cluster number N is generally set by the user according to the application node number M, and it is considered that M nodes are at least deployed on N clusters. For example, when M is 8, N is 4; meaning that the application is deployed on 8 nodes, and the 8 nodes that the user desires are deployed on at least 4 clusters. The node number M and the cluster number N can be set according to the high-availability high-low requirement of the system and input into the system.
Step 203, obtaining a plurality of deployment modes of the M nodes, respectively performing quantization processing on the plurality of deployment modes of the M nodes to obtain a plurality of corresponding deployment arrays, and sorting the plurality of deployment arrays of the M nodes.
In this embodiment, the multiple deployment manners may be a sum of all non-repeating deployment manners obtained by deploying the M nodes in different cluster numbers. The deployment arrays respectively obtained by quantizing the deployment modes of the M nodes may also be obtained by dequantizing the deployment modes according to a requirement that the M nodes are uniformly distributed according to numbers, are distributed on different clusters as much as possible when the nodes are deployed by applying the same application, and are not reduced too quickly when a cluster fails or storage equipment is abnormal. After obtaining a plurality of deployment arrays, sequencing the deployment arrays, and further obtaining a sequencing queue of the deployment arrays corresponding to all deployment modes to be deployed. It should be noted that, when the operation and maintenance are performed, as long as the initial application deployment information is input when the application starts to be deployed, the system automatically reads the deployment information and enumerates all deployment possibilities of the application deployment, that is, the multiple deployment manners in step 203. The condition that the single-point cluster capability does not decrease too fast may mean that the constituent elements in each deployment array are sorted from left to right according to the number of nodes deployed on each cluster from small to large.
And step 204, acquiring a standard deployment array from the sequenced deployment array queues according to the cluster number N.
In this embodiment, the standard deployment array may be a deployment array with the smallest set of differences, which is deployed in a deployment array formed by the number N of clusters, for example, M nodes are deployed at least on N clusters, and when the length of the array is N, the array with the smallest variance is the dimension standard that we want to find, that is, the standard deployment array. The standard deployment array deploys a uniform or non-uniform, reasonable or unreasonable, low high availability or high availability boundary for the application.
Step 205, comparing the current deployment array with the standard deployment array, and determining whether the ordering relationship between the current deployment array and the standard deployment array meets a preset condition.
In this embodiment, the preset condition may be that the position of the current deployment array in the sorted deployment array queue is before the position of the standard array in the queue. Specifically, the current deployment array is compared with the standard deployment array, and the current deployment array and the standard deployment array are sorted to obtain a sorting result. And if the current deployment array is arranged behind the standard deployment array, determining that the current deployment array does not meet the condition.
In another embodiment, an alarm threshold is generated according to the expected cluster number, if the current deployment mode meets the alarm threshold, the application deployment is not uniform, and if the current deployment mode does not meet the alarm threshold, the application deployment is within an acceptable range.
And step 206, if yes, sending alarm information and adjusting the current deployment information.
The alarm information may be referred to as alarm information or prompt information. And if the current deployment array meets the preset condition, sending alarm information to the user to prompt the user that the current application deployment mode is not uniform and does not meet the expected deployment standard. After sending the alarm information, the system may automatically deploy the node to another cluster, that is, the system may automatically migrate the server to the existing cluster. Further, if the user needs to adjust, a cluster can be built, or nodes are migrated to other clusters to obtain a new current deployment array of the application, then the new current deployment array is compared with the standard deployment array, if the new current deployment array still does not meet the preset condition, the alarm information continues to be sent, and the alarm information does not stop being sent until the current deployment array of the application is behind the standard array. And further, the application deployment is uniform, and the high availability of the application deployment is improved.
In a possible embodiment of the present invention, after the user receives the alarm information, the user can choose to disregard the alarm information. It should be noted that, if the user disregards the alarm information, the deployment mode of the application may not need to be adjusted.
In another embodiment of the present invention, when a physical machine is down or a storage device is abnormal, it is detected that the high availability of the application is affected by the uneven deployment of the current application, and an alarm message may also be sent and automatically migrated, or it is waited for the user to autonomously select whether to migrate.
In the embodiment of the invention, the standard deployment array, namely the standard deployment mode, is obtained by obtaining the number M of the application nodes and the number N of the expected deployment clusters, the current deployment mode is detected to be compared with the standard deployment mode, if the preset condition is met, an alarm is given, the high availability of the current deployment mode is judged to be low, the automatic migration adjustment is carried out, the alarm is stopped after the current deployment mode is adjusted to be not met by the preset condition, the uniformity of the current deployment mode is judged, and the application deployment adjustment is realized. Thereby improving the high availability of current application deployments. Therefore, operation and maintenance personnel do not need to manually check the uniformity of application deployment, the operation and maintenance cost is greatly reduced, and large-area unavailability of service due to the problem of deployment can be avoided when a fault occurs.
In some alternative implementations of the present embodiment, with continued reference to fig. 3, fig. 3 is a flowchart of one specific implementation of step 203 in fig. 2; in step 201, obtaining a plurality of deployment manners of the M nodes, respectively quantizing the plurality of deployment manners of the M nodes to obtain a plurality of corresponding deployment arrays, and sorting the plurality of deployment arrays of the M nodes, the electronic device may further perform the following steps:
step 301, obtaining a plurality of deployment modes in which M nodes are sequentially deployed in 1 to M clusters, and quantizing the plurality of deployment modes in which the M nodes are sequentially deployed in 1 to M clusters to obtain a plurality of corresponding deployment arrays.
Step 302, obtain the array length of each deployment array.
Step 303, calculate the array variance of each deployment array.
Step 304, obtain the maximum element value in each deployment array.
Step 305, a plurality of deployment arrays are sorted according to the array length, the array variance and the maximum element value of each deployment array.
The deployment modes of the M nodes sequentially deployed in the 1 to M clusters may be all deployment modes obtained by deploying the M nodes on the 1 cluster, all deployment modes obtained by deploying the M nodes on the 2 clusters, all deployment modes obtained by deploying the M nodes on the 3 clusters, …, and a sum of all deployment modes obtained by deploying the M nodes on the M clusters. The array length is the number of clusters deployed by M nodes, for example, if M nodes are deployed on 4 clusters, the array length of all the deployment arrays deployed on the 4 clusters is 4. The constituent elements in each deployment array are sorted from left to right according to the number of nodes deployed on each cluster from small to large. The array variance may be a variance of each deployment array. Smaller array variance for deployment arrays deployed on the same cluster number indicates more uniform node deployment in the deployment array. The maximum element value in each deployment array may be the last element in the deployment array sorted from left to right according to the number of nodes deployed on each cluster from small to large. It should be noted that when the number of M nodes is greater than 1 or less than the total number of nodes, there are multiple deployment manners, and each deployment manner is different. And finally, sequencing all the deployment arrays of the M nodes which are sequentially deployed on the 1-M clusters according to the array length, the array variance and the maximum element value in the deployment arrays of each deployment array.
In the embodiment of the present invention, it is assumed that an application needs to deploy M nodes, which are distributed over at least N clusters, and all schemes [ k (i) ], where M is an array, where the array is worth summing up to M, and the values in the array are ordered. In this embodiment, the number M of nodes may be an integer greater than or equal to 2.
Illustratively, when the number of nodes M is 8, deployment arrays, array variances, array lengths, and maximum element values in the deployment arrays corresponding to all deployment modes obtained by deploying 8 nodes in 1 to 8 clusters are as follows:
1) when 8 nodes are deployed on 1 cluster, 1 deployment mode exists, and the deployment array, the array variance, the array length and the array maximum element value obtained by quantizing the 1 deployment mode are as follows:
[8]:0.0:1:8;
2) when 8 nodes are deployed on 2 clusters, 4 deployment modes are provided, and deployment arrays, array variances, array lengths and array maximum element values obtained by quantizing the 4 deployment modes are as follows:
[1,7]:9.0:2:7;
[2,6]:4.0:2:6;
[3,5]:1.0:2:5;
[4,4]:0.0:2:4;
3) when 8 nodes are deployed on 3 clusters, 5 deployment modes exist, and deployment arrays, array variances, array lengths and array maximum element values obtained by quantizing the 5 deployment modes are as follows:
[1,1,6]:5.555555555555556:3:6;
[1,2,5]:2.8888888888888893:3:5;
[1,3,4]:1.5555555555555554:3:4;
[2,2,4]:0.8888888888888888:3:4;
[2,3,3]:0.22222222222222224:3:3;
4) when 8 nodes are deployed on 4 clusters, 5 deployment modes exist, and deployment arrays, array variances, array lengths and array maximum element values obtained by quantizing the 5 deployment modes are as follows:
[1,1,1,5]:3.0:4:5;
[1,1,2,4]:1.5:4:4;
[1,1,3,3]:1.0:4:3;
[1,2,2,3]:0.5:4:3;
[2,2,2,2]:0.0:4:2;
5) when 8 nodes are deployed on 5 clusters, 3 deployment modes exist, and deployment arrays, array variances, array lengths and array maximum element values obtained by quantizing the 3 deployment modes are as follows:
[1,1,1,1,4]:1.44:5:4;
[1,1,1,2,3]:0.64:5:3;
[1,1,2,2,2]:0.24:5:2;
6) when 8 nodes are deployed on 6 clusters, 2 deployment modes exist, and deployment arrays, array variances, array lengths and array maximum element values obtained by quantizing the 2 deployment modes are as follows:
[1,1,1,1,1,3]:0.5555555555555556:6:3;
[1,1,1,1,2,2]:0.22222222222222224:6:2;
7) when 8 nodes are deployed on 7 clusters, 1 deployment mode exists, and deployment arrays, array variances, array lengths and array maximum element values obtained by quantizing the 1 deployment modes are as follows:
[1,1,1,1,1,1,2]:0.12244897959183675:7:2;
8) when 8 nodes are deployed on 8 clusters, 1 deployment mode exists, and deployment arrays, array variances, array lengths and array maximum element values obtained by quantizing the 1 deployment modes are as follows:
[1,1,1,1,1,1,1,1]:0.0:8:1。
as can be seen from the above, when 8 nodes are sequentially deployed on 1 to 8 clusters, all the obtained deployment manners are 22, that is, M nodes are sequentially deployed in a plurality of deployment manners of 1 to M clusters, and quantization is performed to obtain a plurality of corresponding deployment arrays.
In this embodiment, when the number of application deployment nodes input by the user is obtained, all deployment possibilities, that is, all deployment modes, of the application deployment nodes can be automatically obtained. The system is convenient to adjust the application deployment so as to improve the high availability of the application deployment.
In some alternative implementations, with continued reference to FIG. 4, FIG. 4 is a flow chart of one embodiment of step 305 of FIG. 3; in step 305, in sorting the deployment arrays according to the array length, the array variance, and the maximum element value in the deployment array of each deployment array, the electronic device may perform the following steps:
step 401, comparing the array lengths of the deployment arrays with each other in sequence.
And step 402, if the array lengths of the deployment arrays are the same, comparing the array variances of the deployment arrays, and sorting the deployment arrays according to the array variances.
Step 403, if the array lengths of the deployment arrays are different, comparing the maximum element values in the deployment arrays; if the maximum element values in the deployment array are different in size, sorting the maximum element values according to the size of the maximum element values in the deployment array; and if the maximum element values in the deployment array are the same, sorting the deployment array according to the array length of the deployment array from small to large.
All deployment arrays of the M nodes deployed on the 1 to M clusters may be ordered according to steps 401, 402, 403.
Exemplary, for example: the number of nodes M is 8, and then, 8 nodes are sequentially deployed on 1 to 8 clusters to obtain a plurality of deployment array sorting sequence numbers, deployment array, array variance, array length, and deployment array maximum element value sorting as follows:
1、[8]:0.0:1:8;
2、[1,7]:9.0:2:7;
3、[2,6]:4.0:2:6;
4、[1,1,6]:5.555555555555556:3:6;
5、[3,5]:1.0:2:5;
6、[1,2,5]:2.8888888888888893:3:5;
7、[1,1,1,5]:3.0:4:5;
8、[4,4]:0.0:2:4;
9、[1,3,4]:1.5555555555555554:3:4;
10、[2,2,4]:0.8888888888888888:3:4;
11、[1,1,2,4]:1.5:4:4;
12、[1,1,1,1,4]:1.44:5:4;
13、[2,3,3]:0.22222222222222224:3:3;
14、[1,1,3,3]:1.0:4:3;
15、[1,2,2,3]:0.5:4:3;
16、[1,1,1,2,3]:0.64:5:3;
17、[1,1,1,1,1,3]:0.5555555555555556:6:3;
18、[2,2,2,2]:0.0:4:2;
19、[1,1,2,2,2]:0.24:5:2;
20、[1,1,1,1,2,2]:0.22222222222222224:6:3;
21、[1,1,1,1,1,1,2]:0.12244897959183675:7:2;
22、[1,1,1,1,1,1,1,1]:0.0:8:1。
as can be seen from the above, an array corresponding to all the possible deployment manners in which the M nodes are deployed on the 1 to M clusters is further obtained, where the array is 22 deployment arrays corresponding to 22 deployment manners in which the 8 nodes are deployed on the 1 to 8 clusters. In this embodiment, the number M of nodes may be an integer greater than or equal to 2.
In this embodiment, all deployment modes of the application deployment node number can be quantized and then subjected to high-availability sequencing to obtain a sequencing queue. This allows high availability between each deployment approach. Therefore, the high availability of the current deployment mode can be conveniently judged, the deployment mode of the current application can be conveniently adjusted, and the high availability of the application deployment can be further improved.
In some alternative implementations, with continued reference to FIG. 5, FIG. 5 is a flow chart of one embodiment of step 204 of FIG. 2; in step 204, in obtaining the standard deployment array from the sorted deployment array queues according to the cluster number N, the electronic device may perform the following steps:
step 501, obtaining a deployment array with the smallest set difference in deployment arrays, in which M nodes are deployed on N clusters, from the sorted deployment arrays, and determining the deployment array with the smallest set difference in deployment arrays, in which M nodes are deployed on N clusters, as a standard deployment array.
In this embodiment, the number N of clusters is the number of clusters that a user desires to deploy, and may also be referred to as the minimum requirement when the system is deployed. For example, it is desirable that 8 nodes are deployed on 4 clusters, and the deployment array obtained by sorting the obtained deployment array according to the sorting policy in steps 401, 402, and 403, and the corresponding array variance, array length, and maximum element value in the deployment array are specifically:
[1,1,1,5]:3.0:4:5;
[1,1,2,4]:1.5:4:4;
[1,1,3,3]:1.0:4:3;
[1,2,2,3]:0.5:4:3;
[2,2,2,2]:0.0:4:2;
therefore, if the array variance of [2,2,2,2] in all the deployment arrays in which 8 nodes are deployed on 4 clusters is minimum, then [2,2, 2] is used as the standard deployment array. And [2,2,2,2] is used as a dividing line for judging whether the plurality of arranged arrays are arranged uniformly or not, wherein the arranged arrays are non-uniform or unreasonable before [2,2,2,2], and are uniform or reasonable after [2,2,2,2 ].
In the embodiment of the present invention, when the expected number of clusters is obtained, the standard deployment manner can be quickly obtained, and then the conditions of all the deployment manners in the sorting queue obtained by sorting in steps 401, 402, and 403 and the standard deployment manner are obtained, so as to determine the high availability of the current application deployment. The later adjustment is convenient, and the high availability of the application deployment is improved.
In some alternative implementations, with continued reference to FIG. 6, FIG. 6 is a flow chart of one embodiment of step 205 of FIG. 2; in step 205, in comparing the current deployment array with the standard deployment array and determining whether the ordering relationship between the current deployment array and the standard deployment array satisfies a preset condition, the electronic device may perform the following steps:
step 601, obtaining the sorting sequence numbers of the current deployment array and the standard deployment array in the sorting queue.
Step 602, compare the sequence numbers of the current deployment array and the standard deployment array.
Step 603, if the current deployment array is arranged before the standard deployment array, determining that the current deployment array meets a preset condition.
Specifically, after the standard deployment array is determined, the arrangement sequence numbers of the current application deployment and the standard deployment array in the deployment array queue sorted in steps 401, 402, and 403 are obtained. If the sequence number of the current deployment array in the sorting queue is before the standard deployment array, the sorting relation between the current deployment array and the standard deployment array meets a preset condition, that is, the deployment of the current deployment array is uneven or unreasonable, and the deployment of the current application is high in availability. If the sequence number of the current deployment array in the sorting queue is behind the standard deployment array, the sorting relation between the current deployment array and the standard deployment array does not meet the preset condition, that is, the current deployment array is uniformly or reasonably deployed, and the current application deployment has high availability.
In one embodiment of the invention, the array variance, the array length and the maximum element value in the deployment array of the current deployment array are obtained; and comparing the array variance and the array length of the current deployment array, the array variance and the array length of the standard deployment array and the maximum element value of the deployment array, and sequencing the current deployment array and the standard deployment array.
And judging whether the ordering relation between the current deployment array and the standard deployment array meets a preset condition or not according to the ordering result, and if the current deployment array is arranged in front of the standard deployment array, indicating that the current deployment mode meets the preset condition.
Specifically, the current deployment array and the standard deployment array are sorted in the following manner: comparing the array length of the current deployment array with the array length of the standard deployment array; if the array lengths of the current deployment array and the standard deployment array are the same, comparing the array variances of the current deployment array and the standard deployment array, and sorting according to the array variance and the size; if the lengths of the current deployment array and the standard deployment array are different, comparing the maximum element values in the current deployment array and the standard deployment array, and sorting according to the maximum element values in the current deployment array and the standard deployment array; and if the maximum element values of the current deployment array and the standard deployment array are the same, comparing the array lengths of the current deployment array and the standard deployment array, and sequencing according to the array length of the deployment array and from small to large to obtain a sequencing result.
For example, the current deployment array and its array length, the maximum element value in the deployment array is [1,3,4 ]: 1.5555555555555554: 3: 4; the standard deployment array and the array length thereof, the maximum element value in the deployment array is [1,1,2,2,2]: 0.24: 5: 2. then, according to the above sorting manner of the current deployment array and the standard deployment array, a current deployment array [1,3,4] can be obtained: 1.5555555555555554: 3: 4 in the standard deployment array [1,1,2,2,2]: 0.24: 5: before 2, it may be determined that the current deployment mode satisfies the preset condition. Step 206 may be performed to send an alert message.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 7, as an implementation of the method shown in fig. 2, the present application provides an embodiment of an application deployment apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
FIG. 7 is a schematic block diagram illustrating one embodiment of an application deployment apparatus according to the present application, as shown in FIG. 7; the application deployment apparatus described in this embodiment includes: the device comprises a first obtaining module 11, a second obtaining module 12, a sorting module 13, a third obtaining module 14, a judging module 15 and an alarm module 16. Wherein the content of the first and second substances,
the first obtaining module 11 is configured to obtain a current application deployment mode, and perform quantization processing on the current application deployment mode to obtain a current deployment array.
The second obtaining module 12 is configured to obtain the number M of nodes of a preset application deployment and the number N of clusters that the M nodes are expected to distribute.
The sorting module 13 is configured to obtain multiple deployment manners of the M nodes, perform quantization processing on the multiple deployment manners of the M nodes to obtain corresponding multiple deployment arrays, and sort the multiple deployment arrays of the M nodes.
The third obtaining module 14 is configured to obtain a standard deployment array from the sorted multiple deployment array queues according to the cluster number N.
The judging module 15 is configured to compare the current deployment array with the standard deployment array, and judge whether a sorting relation between the current deployment array and the standard deployment array meets a preset condition; and the alarm module 16 is used for sending alarm information and adjusting the current deployment information if the requirement is met.
In the embodiment of the invention, the standard deployment array, namely the standard deployment mode, is obtained by obtaining the number M of the application nodes and the number N of the expected deployment clusters, the current deployment mode is detected to be compared with the standard deployment mode, if the current deployment mode does not meet the preset condition, the current application deployment mode is judged to be uneven, the high availability of the current deployment mode is judged to be low, an alarm is given, automatic migration adjustment is carried out until the current application deployment mode meets the preset condition, the current deployment mode is judged to be even, and the high availability of the current application deployment mode is further improved. Therefore, operation and maintenance personnel do not need to manually check the uniformity of application deployment, the operation and maintenance cost is greatly reduced, and large-area unavailability of service due to the problem of deployment can be avoided when a fault occurs.
Referring to fig. 8, fig. 8 is a schematic structural diagram of one embodiment of the sorting module 13 shown in fig. 7; the sorting module 13 includes: a first obtaining submodule 131, a third obtaining submodule 134, a calculating submodule 133, a third obtaining submodule 134 and a sorting submodule 135.
The first obtaining submodule 131 is configured to obtain multiple deployment manners in which M nodes are sequentially deployed in 1 to M clusters, and quantize the multiple deployment manners in which the M nodes are sequentially deployed in 1 to M clusters, respectively, to obtain corresponding multiple deployment arrays.
The third obtaining submodule 134 is configured to obtain an array length of each deployment array.
The calculation submodule 133 is configured to calculate an array variance of each deployment array.
And a third obtaining submodule 134, configured to obtain a maximum element value in each deployment array.
The sorting submodule 135 is configured to sort the deployment arrays according to the array length, the array variance, and the maximum element value in the deployment array of each deployment array.
Referring to FIG. 9, FIG. 9 is a block diagram illustrating one embodiment of the sort sub-module 135 of FIG. 8; the ordering sub-module 135 includes a first comparison sub-unit 1351, a second comparison sub-unit 1352, a third comparison sub-unit 1353, wherein,
a first comparing subunit 1351, configured to compare array lengths of the multiple deployment arrays with each other in sequence;
the second comparing subunit 1352 is configured to compare the array variances of the deployed arrays if the array lengths of the deployed arrays are the same, and sort the deployed arrays according to the sizes of the array variances.
A third comparing subunit 1353, configured to compare the size of the maximum element value in the deployment array if the array lengths of the deployment arrays are different; if the maximum element values in the deployment array are different in size, sorting the maximum element values according to the size of the maximum element values in the deployment array; and if the maximum element values in the deployment array are the same, sorting the deployment array according to the array length of the deployment array from small to large.
In some optional implementation manners of this embodiment, the third obtaining module 14 is further configured to obtain, from the sorted deployment arrays, a deployment array with the smallest set of differences among the deployment arrays in which the M nodes are deployed on the N clusters, and determine the deployment array with the smallest set of differences among the deployment arrays in which the M nodes are deployed on the N clusters as the standard deployment array.
In some optional implementation manners of this embodiment, the determining module 15 is further configured to obtain a sorting sequence number of the current deployment array and the standard deployment array in the sorting queue; comparing the sequencing sequence numbers of the current deployment array and the standard deployment array; and if the current deployment array is arranged before the standard deployment array, confirming that the current deployment array meets a preset condition.
In another embodiment, the determining module 15 is further configured to obtain an array variance, an array length, and a maximum element value in the deployment array of the current deployment array; and comparing the array variance and the array length of the current deployment array, the array variance and the array length of the standard deployment array and the maximum element value of the deployment array, and sequencing the current deployment array and the standard deployment array.
And judging whether the ordering relation between the current deployment array and the standard deployment array meets a preset condition or not according to the ordering result, and if the current deployment array is arranged in front of the standard deployment array, indicating that the current deployment mode meets the preset condition.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 10, fig. 10 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 6 comprises a memory 61, a processor 62, a network interface 63 communicatively connected to each other via a system bus. It is noted that only a computer device 6 having components 61-63 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable gate array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 61 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 61 may be an internal storage unit of the computer device 6, such as a hard disk or a memory of the computer device 6. In other embodiments, the memory 61 may also be an external storage device of the computer device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash Card (FlashCard), and the like, which are provided on the computer device 6. Of course, the memory 61 may also comprise both an internal storage unit of the computer device 6 and an external storage device thereof. In this embodiment, the memory 61 is generally used for storing an operating system installed in the computer device 6 and various types of application software, such as program codes of methods and the like. Further, the memory 61 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 62 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 62 is typically used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is configured to execute the program code stored in the memory 61 or process data, for example, execute the program code of the application deployment method.
The network interface 63 may comprise a wireless network interface or a wired network interface, and the network interface 63 is typically used for establishing a communication connection between the computer device 6 and other electronic devices.
The present application further provides another embodiment, which is to provide a computer-readable storage medium storing an application deployment program, which is executable by at least one processor to cause the at least one processor to perform the steps of the application deployment method as described above.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. An application deployment method, comprising the steps of:
acquiring a current application deployment mode, and carrying out quantization processing on the current application deployment mode to obtain a current deployment array;
acquiring the number M of nodes deployed by a preset application and the number N of clusters expected to be distributed by the M nodes;
acquiring a plurality of deployment modes of the M nodes, respectively carrying out quantization processing on the plurality of deployment modes of the M nodes to obtain a plurality of corresponding deployment arrays, and sequencing the plurality of deployment arrays of the M nodes;
acquiring a standard deployment array from the sequenced deployment array queues according to the cluster number N;
comparing the current deployment array with the standard deployment array, and judging whether the ordering relation between the current deployment array and the standard deployment array meets a preset condition or not;
and if so, sending alarm information and adjusting the current deployment mode.
2. The application deployment method according to claim 1, wherein the step of obtaining the plurality of deployment manners of the M nodes, quantizing the plurality of deployment manners of the M nodes to obtain a plurality of corresponding deployment arrays, and sorting the plurality of deployment arrays of the M nodes comprises:
acquiring a plurality of deployment modes of M nodes sequentially deployed in 1-M clusters, and quantifying the deployment modes of the M nodes sequentially deployed in 1-M clusters to obtain a plurality of corresponding deployment arrays;
acquiring the array length of each deployment array;
calculating the array variance of each deployment array;
acquiring a maximum element value in each deployment array;
and sequencing the deployment arrays according to the array length, the array variance and the maximum element value in the deployment arrays of each deployment array.
3. The application deployment method of claim 2, wherein the step of ordering the plurality of deployment arrays according to the array length, the array variance, and the maximum element value in the deployment arrays of each deployment array specifically comprises:
sequentially comparing the array lengths of the plurality of deployment arrays with each other;
if the array lengths of the deployment arrays are the same, comparing the array variances of the deployment arrays, and sorting according to the array variances and the sizes;
if the array lengths of the deployment arrays are different, comparing the maximum element values in the deployment arrays; if the maximum element values in the deployment array are different in size, sorting the maximum element values according to the size of the maximum element values in the deployment array; and if the maximum element values in the deployment array are the same, sorting the deployment array according to the array length of the deployment array from small to large.
4. The application deployment method of claim 2, wherein the step of obtaining the standard deployment array from the sorted deployment array queues according to the cluster number N comprises:
and acquiring the deployment array with the minimum group difference in the deployment arrays of the M nodes deployed on the N clusters from the sequenced deployment arrays, and determining the deployment array with the minimum group difference in the deployment arrays of the M nodes deployed on the N clusters as a standard deployment array.
5. The application deployment method according to any one of claims 1 to 4, wherein the step of comparing the current deployment array with the standard deployment array and determining whether the ordering relationship between the current deployment array and the standard deployment array satisfies a preset condition comprises:
acquiring a sequencing sequence number of a current deployment array and a standard deployment array in a sequencing queue;
comparing the sequencing sequence numbers of the current deployment array and the standard deployment array;
and if the current deployment array is arranged before the standard deployment array, confirming that the current deployment array meets a preset condition.
6. An application deployment apparatus, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a current application deployment mode and carrying out quantization processing on the current application deployment mode to obtain a current deployment array;
the second acquisition module is used for acquiring the number M of nodes of preset application deployment and the number N of clusters expected to be distributed by the M nodes;
the sequencing module is used for acquiring a plurality of deployment modes of the M nodes, respectively carrying out quantization processing on the plurality of deployment modes of the M nodes to obtain a plurality of corresponding deployment arrays, and sequencing the plurality of deployment arrays of the M nodes;
a third obtaining module, configured to obtain a standard deployment array from the sorted multiple deployment array queues according to the cluster number N;
the judging module is used for comparing the current deployment array with the standard deployment array and judging whether the ordering relation between the current deployment array and the standard deployment array meets a preset condition or not;
and the alarm module is used for sending alarm information and adjusting the current deployment mode if the requirement is met.
7. The application deployment device of claim 6, wherein the ranking module comprises:
the first obtaining submodule is used for obtaining a plurality of deployment modes of M nodes sequentially deployed in 1 to M clusters, and quantifying the plurality of deployment modes of the M nodes sequentially deployed in 1 to M clusters respectively to obtain a plurality of corresponding deployment arrays;
the second acquisition submodule is used for acquiring the array length of each deployment array;
the calculation submodule is used for calculating the array variance of each deployment array;
the third obtaining submodule is used for obtaining the maximum element value in each deployment array;
and the sequencing submodule is used for sequencing the deployment arrays according to the array length, the array variance and the maximum element value in the deployment arrays of each deployment array.
8. The application deployment device of claim 7, wherein the ordering submodule comprises:
the first comparison subunit is used for sequentially comparing the array lengths of the plurality of deployment arrays with one another;
the second comparison subunit is used for comparing the array variance of the deployment array if the array lengths of the deployment array are the same, and sorting the deployment array according to the size of the array variance and the size;
the third comparison subunit is used for comparing the maximum element value in the deployment array if the array lengths of the deployment array are different; if the maximum element values in the deployment array are different in size, sorting the maximum element values according to the size of the maximum element values in the deployment array; and if the maximum element values in the deployment array are the same, sorting the deployment array according to the array length of the deployment array from small to large.
9. A computer device comprising a memory in which a computer program is stored and a processor which, when executing the computer program, carries out the steps of the application deployment method of any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the application deployment method according to any one of claims 1 to 5.
CN201910648310.7A 2019-07-18 2019-07-18 Application deployment method and device, computer equipment and storage medium Active CN110597682B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910648310.7A CN110597682B (en) 2019-07-18 2019-07-18 Application deployment method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910648310.7A CN110597682B (en) 2019-07-18 2019-07-18 Application deployment method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110597682A true CN110597682A (en) 2019-12-20
CN110597682B CN110597682B (en) 2022-07-12

Family

ID=68852834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910648310.7A Active CN110597682B (en) 2019-07-18 2019-07-18 Application deployment method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110597682B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114172911A (en) * 2021-10-29 2022-03-11 青岛海享智科技有限公司 Group control system control method, apparatus and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003073278A2 (en) * 2002-02-22 2003-09-04 Mission Critical Linux, Inc. Clustering infrastructure system and method
US20110145790A1 (en) * 2009-12-15 2011-06-16 International Business Machines Corporation Deployment and deployment planning as a service
CN105740133A (en) * 2016-01-29 2016-07-06 浙江大学 Service call topology based distributed application performance monitoring method
CN108009016A (en) * 2016-10-31 2018-05-08 华为技术有限公司 A kind of balancing resource load control method and colony dispatching device
CN109271170A (en) * 2018-09-05 2019-01-25 杭州数梦工场科技有限公司 A kind of distributed system dispositions method, system, electronic equipment and storage medium
CN109683917A (en) * 2018-12-18 2019-04-26 江苏满运软件科技有限公司 For the method for being deployed in application server, equipment and medium will to be applied

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003073278A2 (en) * 2002-02-22 2003-09-04 Mission Critical Linux, Inc. Clustering infrastructure system and method
US20110145790A1 (en) * 2009-12-15 2011-06-16 International Business Machines Corporation Deployment and deployment planning as a service
CN105740133A (en) * 2016-01-29 2016-07-06 浙江大学 Service call topology based distributed application performance monitoring method
CN108009016A (en) * 2016-10-31 2018-05-08 华为技术有限公司 A kind of balancing resource load control method and colony dispatching device
CN109271170A (en) * 2018-09-05 2019-01-25 杭州数梦工场科技有限公司 A kind of distributed system dispositions method, system, electronic equipment and storage medium
CN109683917A (en) * 2018-12-18 2019-04-26 江苏满运软件科技有限公司 For the method for being deployed in application server, equipment and medium will to be applied

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
盛乐标等: "Kubernetes高可用集群的部署实践", 《电脑知识与技术》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114172911A (en) * 2021-10-29 2022-03-11 青岛海享智科技有限公司 Group control system control method, apparatus and medium

Also Published As

Publication number Publication date
CN110597682B (en) 2022-07-12

Similar Documents

Publication Publication Date Title
CN111414334B (en) File fragment uploading method, device, equipment and storage medium based on cloud technology
CN109918205B (en) Edge equipment scheduling method, system, device and computer storage medium
CN108696581B (en) Distributed information caching method and device, computer equipment and storage medium
CN112650576B (en) Resource scheduling method, device, equipment, storage medium and computer program product
CN110753112A (en) Elastic expansion method and device of cloud service
CN109800204B (en) Data distribution method and related product
CN105205174A (en) File processing method and device for distributed system
CN115277566B (en) Load balancing method and device for data access, computer equipment and medium
CN110677464A (en) Edge node device, content distribution system, method, computer device, and medium
CN110620681A (en) Network connection timeout time setting method, device, equipment and medium
WO2015106710A1 (en) Contact information processing method, apparatus, and system
CN110807050B (en) Performance analysis method, device, computer equipment and storage medium
CN111858040A (en) Resource scheduling method and device
CN113242301B (en) Method, device, computer equipment and storage medium for selecting true server
CN110597682B (en) Application deployment method and device, computer equipment and storage medium
CN113220342A (en) Centralized configuration method and device, electronic equipment and storage medium
CN114327846A (en) Cluster capacity expansion method and device, electronic equipment and computer readable storage medium
CN108833532B (en) Service processing method, device and system based on Internet of things
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN114995914A (en) Picture data processing method and device, computer equipment and storage medium
CN113138772B (en) Construction method and device of data processing platform, electronic equipment and storage medium
CN107231268B (en) Method and device for testing website performance
CN113055199B (en) Gateway access method and device and gateway equipment
CN112632192A (en) Node maintenance method and device, computer equipment and medium
CN112559131A (en) Method, device and equipment for updating container mirror image and computer readable storage medium

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